You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A: The code in the section does not compile.
A: Following does not compile either:
pragma solidity ^0.4.16;
contract B {
uint a = 3;
}
contract A {
B b;
}
Getter Functions: https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#getter-functions
A: First set of code does not compile because of this line: C c = new C() - keyword new doesn't work. (from previous section)
A: Second set of code does not compile because: this.data()
A: Third set of code does not compile:
ERROR: StructDefinition_id(10): us_prop.fullname == "Complex.Data" : Installing the Solidity Compiler #2 child : type == "mapping(uint256 => uint256)" : can not get type properties
-Abstract contracts https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#abstract-contracts
A: ERROR: FuncDef_id(6): too few children (2) - first code
A: ERROR: FuncDef_id(6): too few children (2)- second set
Q: Why does compiler try to read this as number: { return "miaow";}
Error is: ERROR: strtobin: can not recognize num = "miaow" (1)
Contracts can be created “from outside” via Ethereum transactions or from within Solidity contracts.
IDEs, such as Remix, make the creation process seamless using UI elements.
Creating contracts programatically on Ethereum is best done via using the JavaScript API web3.js. As of today it has a method called web3.eth.Contract to facilitate contract creation.
A: Ethereum stuff: we don't have Remix, web3.js. Are we gonna have something like web3.js?
If a contract wants to create another contract, the source code (and the binary) of the created contract has to be known to the creator. This means that cyclic creation dependencies are impossible.
A: Is this supported?
When trying to selfdestruct, this is the error:
ERROR: MakeFunctionCallCore_id(14): can not get func visibility
Sending Ether via calls.
A: Doesn't compile
ERROR: dec_id_is_event: can not get "attributes.referencedDeclaration"
LOG: FunctionCall_id(14): TAG1
ERROR: MakeFunctionCallCore_id(13): unknown name: "FunctionCall"
Calling any function not marked view or pure.
Using low-level calls.
Using inline assembly that contains certain opcodes.
A: Do we support these?
c) Note
If invalid explicit type conversions are used, state modifications are possible even though a view function was called. You can switch the compiler to use STATICCALL when calling such functions and thus prevent modifications to the state on the level of the EVM by addingpragma experimental "v0.5.0";
e) Libraries - first set of code https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#libraries
A: Do we have it?
A: It doesn't compile because: struct Data { mapping(uint => bool) flags; }
is not supported, error is:
ERROR: StructDefinition_id(6): us_prop.fullname == "C.Data" : #0 child : type == "mapping(uint256 => bool)" : can not get type properties
A: Is having a mapping inside a struct supported?
A: for:
`pragma solidity ^0.4.16;
contract C {
struct Data {
mapping(uint => bool) flags;
}
}`
This is the error: ERROR: StructDefinition_id(6): us_prop.fullname == "C.Data" : #0 child : type == "mapping(uint256 => bool)" : can not get type properties
In the worst case, the fallback function can only rely on 2300 gas being available (for example when send or transfer is used), leaving not much room to perform other operations except basic logging. The following operations will consume more gas than the 2300 gas stipend:
Writing to storage
Creating a contract
Calling an external function which consumes a large amount of gas
Sending Ether
A: Is this true for Array?
Note
Even though the fallback function cannot have arguments, one can still use msg.data to retrieve any payload supplied with the call.
A: can't use msg.data
Contracts that receive Ether directly (without a function call, i.e. using send or transfer) but do not define a fallback function throw an exception, sending back the Ether (this was different before Solidity v0.4.0). So if you want your contract to receive Ether, you have to implement a fallback function.
A: send does not work:
ERROR: FunctionCall_MemberAccess_of_address: unknown member_name == "send"
A contract without a payable fallback function can receive Ether as a recipient of a coinbase transaction (aka miner block reward) or as a destination of a selfdestruct.
A contract cannot react to such Ether transfers and thus also cannot reject them. This is a design choice of the EVM and Solidity cannot work around it.
It also means that this.balance can be higher than the sum of some manual accounting implemented in a contract (i.e. having a counter updated in the fallback function).
A: does not work
The text was updated successfully, but these errors were encountered:
1. Does not compile in Array compiler
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#creating-contracts
A: The code in the section does not compile.
A: Following does not compile either:
Getter Functions:
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#getter-functions
A: First set of code does not compile because of this line:
C c = new C()
- keywordnew
doesn't work. (from previous section)A: Second set of code does not compile because:
this.data()
A: Third set of code does not compile:
ERROR: StructDefinition_id(10): us_prop.fullname == "Complex.Data" : Installing the Solidity Compiler #2 child : type == "mapping(uint256 => uint256)" : can not get type properties
Function Modifiers
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#function-modifiers
A: ERROR: FunctionCall_MemberAccess_of_address: children->size() == 1
A: A: Function Modifiers do work -
This does compile:
Constant State Variables
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#constant-state-variables
A: ERROR: VarDec_id(4): type == "string memory" is not supported yet
A: Initializing with arithmetic like this
uint constant x = 8**3
; doesn't seem to workView functions
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#view-functions
A: Doesn't compile because
now
doesn't work. Without it, it compiles.https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#pure-functions
A: don't support
A: Do we have these global members?
A: Do we support inline assembly?
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#events
-Inheritance
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#inheritance
A: multiple inheritance -not supported
A: Since multiple inheritance is not supported, maybe we can state here something about the single inheritance?
Arguments for base constructors
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#arguments-for-base-constructors
A: ERROR: FuncDef_id(28): ModifierInvocation has too many children (2)
Multiple Inheritance and Linearization
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#multiple-inheritance-and-linearization
Inheriting Different Kinds of Members of the Same Name
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#inheriting-different-kinds-of-members-of-the-same-name
-Abstract contracts
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#abstract-contracts
A: ERROR: FuncDef_id(6): too few children (2) - first code
A: ERROR: FuncDef_id(6): too few children (2)- second set
Q: Why does compiler try to read this as number:
{ return "miaow";}
Error is: ERROR: strtobin: can not recognize num = "miaow" (1)
2. Questions
a) Creating contracts
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#creating-contracts
A: Ethereum stuff: we don't have Remix, web3.js. Are we gonna have something like web3.js?
A: Can a contract create another contract?
b) View functions
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#view-functions
A: events not supported
A: Is this supported?
A: Is this supported?
When trying to
selfdestruct
, this is the error:ERROR: MakeFunctionCallCore_id(14): can not get func visibility
A: Doesn't compile
ERROR: dec_id_is_event: can not get "attributes.referencedDeclaration"
LOG: FunctionCall_id(14): TAG1
ERROR: MakeFunctionCallCore_id(13): unknown name: "FunctionCall"
A: Do we support these?
c) Note
A: Is this true for Array.IO?
d) Interfaces
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#interfaces
A: Do we have it?
e) Libraries - first set of code
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#libraries
A: Do we have it?
A: It doesn't compile because:
struct Data { mapping(uint => bool) flags; }
is not supported, error is:
ERROR: StructDefinition_id(6): us_prop.fullname == "C.Data" : #0 child : type == "mapping(uint256 => bool)" : can not get type properties
f) Libraries - second set of code
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#libraries
A: Is having a mapping inside a struct supported?
A: for:
This is the error: ERROR: StructDefinition_id(6): us_prop.fullname == "C.Data" : #0 child : type == "mapping(uint256 => bool)" : can not get type properties
g) Using For
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#using-for
A: Does call a function from a library work?
Because the following does not compile:
3. Errors
TokenCreator creator;
A: ERROR: VarDec_id(3): unknown type "contract TokenCreator"
Fallback functions
https://github.com/arrayio/array-io-solidity/blob/master/contracts.rst#fallback-function
A: Is this true for Array?
A: can't use
msg.data
A:
send
does not work:ERROR: FunctionCall_MemberAccess_of_address: unknown member_name == "send"
A: does not work
The text was updated successfully, but these errors were encountered: