arrayio / array-io-solidity

Docs for Array.IO Solidity implementation
0 stars 0 forks source link

Units and Globally Available Variables - all differences #6

Open ghost opened 6 years ago

ghost commented 6 years ago

In Units and Globally Available Variables, all bellow is not supported in Array:

  1. Ether Units https://github.com/arrayio/array-io-solidity/blob/master/units-and-global-variables.rst#ether-units

  2. Time Units https://github.com/arrayio/array-io-solidity/blob/master/units-and-global-variables.rst#time-units

  3. In Block and Transaction Properties, following code: https://github.com/arrayio/array-io-solidity/blob/master/units-and-global-variables.rst#block-and-transaction-properties

  1. In Mathematical and Cryptographic Functions (from keccak256(...) until the next subsection): https://github.com/arrayio/array-io-solidity/blob/master/units-and-global-variables.rst#mathematical-and-cryptographic-functions

keccak256(...)returns (bytes32): compute the Ethereum-SHA-3 (Keccak-256) hash of the (tightly packed) arguments sha256(...) returns (bytes32): compute the SHA-256 hash of the (tightly packed) arguments sha3(...) returns (bytes32): alias to keccak256 ripemd160(...) returns (bytes20):

compute RIPEMD-160 hash of the (tightly packed) arguments ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) returns (address): recover the address associated with the public key from elliptic curve signature or return zero on error (example usage) In the above, “tightly packed” means that the arguments are concatenated without padding. This means that the following are all identical: keccak256("ab", "c") keccak256("abc") keccak256(0x616263) keccak256(6382179) keccak256(97, 98, 99) If padding is needed, explicit type conversions can be used: keccak256("\x00\x12")is the same as keccak256(uint16(0x12)). Note that constants will be packed using the minimum number of bytes required to store them. This means that, for example, keccak256(0) == keccak256(uint8(0)) andkeccak256(0x12345678) == keccak256(uint32(0x12345678)). It might be that you run into Out-of-Gas for sha256, ripemd160 or ecrecover on a private blockchain. The reason for this is that those are implemented as so-called precompiled contracts and these contracts only really exist after they received the first message (although their contract code is hardcoded). Messages to non-existing contracts are more expensive and thus the execution runs into an Out-of-Gas error. A workaround for this problem is to first send e.g. 1 Wei to each of the contracts before you use them in your actual contracts. This is not an issue on the official or test net.

  1. In Address Related: https://github.com/arrayio/array-io-solidity/blob/master/units-and-global-variables.rst#address-related

<address>.call(...) returns (bool): issue low-level CALL, returns false on failure, forwards all available gas, adjustable <address>.callcode(...) returns (bool): issue low-level CALLCODE, returns false on failure, forwards all available gas, adjustable <address>.delegatecall(...) returns (bool): issue low-level DELEGATECALL, returns false on failure, forwards all available gas, adjustable

  1. Contract Related https://github.com/arrayio/array-io-solidity/blob/master/units-and-global-variables.rst#contract-related