event Sent(address from, address to, uint amount);
A:
The address type is a 160-bit value that does not allow any arithmetic operations.
The keyword public automatically generates a function that allows you to access the current value of the state variable from outside of the contract.
The line event Sent(address from, address to, uint amount); declares a so-called “event” which is emitted in the last line of the function send. User interfaces (as well as server applications of course) can listen for those events being emitted on the blockchain without much cost. As soon as it is emitted, the listener will also receive the arguments from, to and amount, which makes it easy to track transactions. In order to listen for this event, you would use
Coin.Sent().watch({}, '', function(error, result) {
if (!error) {
console.log("Coin transfer: " + result.args.amount +
" coins were sent from " + result.args.from +
" to " + result.args.to + ".");
console.log("Balances now:\n" +
"Sender: " + Coin.balances.call(result.args.from) +
"Receiver: " + Coin.balances.call(result.args.to));
}
})
Note how the automatically generated function balances is called from the user interface.
A: We have no 'events'.
Memory is more costly the larger it grows (it scales quadratically).
A:
It has a maximum size of 1024 elements and contains words of 256 bits. Access to the stack is limited to the top end in the following way: It is possible to copy one of the topmost 16 elements to the top of the stack or swap the topmost element with one of the 16 elements below it.
A:
The instruction set of the EVM is kept minimal in order to avoid incorrect implementations which could cause consensus problems. All instructions operate on the basic data type, 256-bit words.
A:
It is possible to store data in a specially indexed data structure that maps all the way up to the block level. This feature called logs is used by Solidity in order to implement events.
A:
Since some part of the log data is stored in bloom filters,
A:
Storage https://github.com/arrayio/array-io-solidity/blob/master/introduction-to-smart-contracts.rst#storage
(up to, but not including, version 0.5.0). A: The source code is written for Solidity version 0.4.21 and lower - for ArrayIO
It is possible to store UTF-8 encoded data in string variables. A:
Subcurrency Example https://github.com/arrayio/array-io-solidity/blob/master/introduction-to-smart-contracts.rst#subcurrency-example
event Sent(address from, address to, uint amount); A:
The address type is a 160-bit value that does not allow any arithmetic operations.
The keyword public automatically generates a function that allows you to access the current value of the state variable from outside of the contract.
The line event Sent(address from, address to, uint amount); declares a so-called “event” which is emitted in the last line of the function send. User interfaces (as well as server applications of course) can listen for those events being emitted on the blockchain without much cost. As soon as it is emitted, the listener will also receive the arguments from, to and amount, which makes it easy to track transactions. In order to listen for this event, you would use Coin.Sent().watch({}, '', function(error, result) { if (!error) { console.log("Coin transfer: " + result.args.amount + " coins were sent from " + result.args.from + " to " + result.args.to + "."); console.log("Balances now:\n" + "Sender: " + Coin.balances.call(result.args.from) + "Receiver: " + Coin.balances.call(result.args.to)); } })
Note how the automatically generated function balances is called from the user interface. A: We have no 'events'.
Accounts https://github.com/arrayio/array-io-solidity/blob/master/introduction-to-smart-contracts.rst#accounts
Regardless of whether or not the account stores code, the two types are treated equally by the EVM. A:
Furthermore, every account has a balance in Ether (in “Wei” to be exact) which can be modified by sending transactions that include Ether. A:
Transactions https://github.com/arrayio/array-io-solidity/blob/master/introduction-to-smart-contracts.rst#transactions-1
Storage, Memory and the Stack https://github.com/arrayio/array-io-solidity/blob/master/introduction-to-smart-contracts.rst#storage-memory-and-the-stack
(Memory) .... can be addressed at byte level, A:
Memory is more costly the larger it grows (it scales quadratically). A:
It has a maximum size of 1024 elements and contains words of 256 bits. Access to the stack is limited to the top end in the following way: It is possible to copy one of the topmost 16 elements to the top of the stack or swap the topmost element with one of the 16 elements below it. A:
Instruction Set https://github.com/arrayio/array-io-solidity/blob/master/introduction-to-smart-contracts.rst#instruction-set
The instruction set of the EVM is kept minimal in order to avoid incorrect implementations which could cause consensus problems. All instructions operate on the basic data type, 256-bit words. A:
Calls are limited to a depth of 1024, A:
Delegatecall / Callcode and Libraries https://github.com/arrayio/array-io-solidity/blob/master/introduction-to-smart-contracts.rst#delegatecall--callcode-and-libraries A: We don't have it
Logs https://github.com/arrayio/array-io-solidity/blob/master/introduction-to-smart-contracts.rst#logs
It is possible to store data in a specially indexed data structure that maps all the way up to the block level. This feature called logs is used by Solidity in order to implement events. A:
Since some part of the log data is stored in bloom filters, A:
Self-destruct https://github.com/arrayio/array-io-solidity/blob/master/introduction-to-smart-contracts.rst#self-destruct A: Don't have this operation