This is outdated: The ERC-20 is here: ethereum/EIPs#20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Base contract that all upgradeable contracts should use. | |
* | |
* Contracts implementing this interface are all called using delegatecall from | |
* a dispatcher. As a result, the _sizes and _dest variables are shared with the | |
* dispatcher contract, which allows the called contract to update these at will. | |
* | |
* _sizes is a map of function signatures to return value sizes. Due to EVM | |
* limitations, these need to be populated by the target contract, so the | |
* dispatcher knows how many bytes of data to return from called functions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Open the wallet console: Menu -> Develop -> Toggle console ... | |
// Run the following script | |
_.each(Wallets.find().fetch(), function(item){ | |
if(item.address) | |
Wallets.update(item._id, {$set: {address: item.address.toLowerCase()}}); | |
}); | |
_.each(CustomContracts.find().fetch(), function(item){ | |
if(item.address) | |
CustomContracts.update(item._id, {$set: {address: item.address.toLowerCase()}}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mapping | |
bytes10 + bytes2(0) + <whatever> (bytes20) or bytes20 // | |
0x112233445566778899001122 0000 000000000000112233445566778899001122 | |
MappingWithGrouping | |
bytes6 + <whatever> (max bytes4) or bytes4 + bytes2(0) + <whatever> or bytes20 (max bytes20) | |
0x112233445566 11223344 0000 00000000000000000001122334455667788 |
Pandora and Vanguard orchestration when producing a new block.
Orchestrator
- client written in go. Its responsibility is to orchestrate the Pandora and Vanguard to verify blocks.
Pandora
- modified fork of go-ethereum (geth
). Responsible to create valid execution blocks. P2P is enabled to share txpool and propagate blocks. It requires symbiotic connection with the orchestrator/validator client.
Vanguard
- modified fork of prysm client. Responsible to run consensus algorithm (CASPER) with add execution layer data for shard0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// @dev Verifies that a hash has been signed by the given signer. | |
/// @param hash Any 32 byte hash. | |
/// @param signerAddress Address that should have signed the given hash. | |
/// @param signature Proof that the hash has been signed by signer. | |
/// @return True if the address recovered from the provided signature matches the input signer address. | |
function isValidSignature( | |
bytes32 hash, | |
address signerAddress, | |
bytes memory signature | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Basically "web3" comes from Mist, | |
but "Web3" CAN come from the dapp. | |
A Dapp has 3 ways to use web3. | |
2. and 3. would work when in Mist and outside. | |
*/ | |
// 1. simply use, web3 comes already defined |
eth://inigomontoya.eth
-> callsresolver.addr()
-> shows account page with balance or somethinghttp://inigomontoya.eth
-> callsresolver.a()
-> will resolve a normal DNS ipbzz://inigomontoya.eth
-> callsresolver.multiHash()
-> will resoslve using swarmipfs://inigomontoya.eth
-> callsresolver.multiHash()
-> will resoslve using ipfsinigomontoya.eth
-> will default to swarm and callsresolver.multiHash()
-> will resoslve using swarm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"inputs": [], | |
"payable": false, | |
"stateMutability": "nonpayable", | |
"type": "constructor" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ |
TODO: update web3.js examples ?
- uses BN instead of BigNumber
- added websockets and new events for these providers (web3.currentProvider.on 'connect', 'end', 'error', 'timeout')
- changed
web3.eth.sendRawTransaction
->web3.eth.sendSignedTransaction
- added
web3.eth.subscription
web3.eth.subscription('logs', {address: '0x12', topics: [], fromBlock: ''})
allows onlyfromBlock
, useweb3.eth.getPastLogs
for a specifc range of past blocks.- subscriptions return events like:
- for "logs": "error", "log", "deleted/reverted"
- for syncing: "error", "started", "processing", "ended"
NewerOlder