Developers
Contents
Developers¶
Compile and Run¶
Download¶
Download source code via git
git clone https://github.com/double-a-chain-cloud/double-a-chain.git
Install Golang¶
Reference: Go Download and install
Compile¶
cd /path/to/double-a-chain
make geth
If you want to use cross-compile, like compiling on
Mac
forLinux
, usemake geth-linux
,make geth-linux-amd64
, etc. After compilation is completed, the generated binary is in the folderbuild/bin
.
Run¶
By running ./build/bin/geth --help
, we can get all option info. Specific usage can refer to Command-line Options
Network¶
The program will connect to mainnet
after it starts. If you want to connect the Testnet, you can add the option --testnet
to the command when starting.
Deployment¶
Configure systemd management settings as follows.
Hardware¶
Minimum requirement
8core
16g
ssd iops>5k
Recommended
16core
32g
ssd iops>5k
Network & Port
External IP Address
Port TCP/UDP 32668
Chain Node¶
config.toml
[Eth]
SyncMode = "snap"
TrieCleanCacheRejournal= 300000000000
Use snap sync in the config. If full needed, change this line. The default setting for SyncMode is snap; full is also available if needed.
SyncMode = "snap"
Or
SyncMode = "full"
Start bash¶
To show full detail help info of all flags, type geth help or geth -h
run.sh
#!/usr/bin/env bash
/data/Double-A Chain/geth-linux-amd64 \
--config /data/Double-A Chain/config.toml \
--logpath /data/Double-A Chain/logs \&1
if you need to use it as archive node, add:
--syncmode full \
--gcmode archive \
Then:
#!/usr/bin/env bash
/data/Double-A Chain/geth-linux-amd64 \
If no network flags were provided, the node would connect the Double-A Chain-Mainnet by default. If you want to connect to Double-A Chain -Testnet, add:
--testnet
Systemd Configuration¶
[Unit]
Description=Double-A Chain chain service
[Service]
Type=simple
ExecStart=/bin/sh /data/Double-A Chain/run.sh
Restart=on-failure
RestartSec=5s
LimitNOFILE=65536
[Install]
On-chain Interaction¶
Double-A Chain is compatible with Ethereum’s ecosystem support all Ethereum’s RPC API and DK.
RPC¶
Example:
curl -s -H 'content-type:application/json' -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' http://localhost:8545
Developer SDK¶
Use Ethereum
SDK library such as web3j
,web3js
, etc for development.
Get Chain Info¶
const Web3 = require('web3')
async function getChainId() {
const web3 = new Web3('https://http-mainnet.Double-A Chainchain.com')
let chainId = await web3.eth.getChainId()
console.log(`chain id: ${chainId}`)
return chainId
}
Generate Account¶
const Web3Accounts = require('web3-eth-accounts')
let account = new Web3Accounts().create()
//do not do this on prd env
console.log(`account generated. address: ${account.address}, private key: ${account.privateKey}`)
Build Transaction¶
const Web3 = require('web3')
async function transfer(fromAccount, to, value){
const web3 = new Web3('https://http-mainnet.Double-A Chainchain.com')
let chainId = await web3.eth.getChainId()
let nonce = await web3.eth.getTransactionCount(fromAccount.address)
let gasPrice = await web3.eth.getGasPrice()
let unsigned = {
from: fromAccount.address,
to,
value: web3.utils.numberToHex(web3.utils.toWei(value, 'ether')),
gasPrice,
nonce,
chainId,
}
unsigned.gas = await web3.eth.estimateGas(unsigned)
let signed = await fromAccount.signTransaction(unsigned)
return signed
}
Contract¶
Double-A Chain
uses EVM
for contract execution. See Solidity for detail.
Remix¶
Remix IDE is an open-source web and desktop application. It fosters a fast development cycle and has rich plugins with intuitive GUIs. The Remix is used for the entire contract development journey and is a playground for learning and teaching.
Create a new file in file explorer. Edit contract info on the right side.
Compile contract
Click compiler button, switch UI
Select the contract you want to compile
Set compile flags
Click compile button Deploy contract to Double-A Chain via wallet such as MetaMask.
Config network info in Metamask
Back to
Remix
. · Switch environment · Select contract · click deploy button
Truffle¶
Use Truffle to compile and deploy the contract.
Install Node.js See Installing Node.js for detail.
Install Truffle
npm install -g truffle
Run truffle version
after installation is finished. If the command line displays a message like below, the installation is successful.
Truffle v5.1.36 (core: 5.1.36)
Solidity v0.5.16 (solc-js)
Node v10.22.1
Web3.js v1.2.1
Create project First, create a folder for the project.
mkdir Example
cd Example
Then, initialize the project via Truffle
truffle init
After initialization is complete, the following file structure is generated within the project.
|-- contracts //folder for contracts
|-- migrations //folder for deployment scripts
|-- test //folder for test scripts
|-- truffle-config.js //truffle config file
Configure info for Truffle
const HDWalletProvider = require('@truffle/hdwallet-provider');
const fs = require('fs');
const mnemonic = fs.readFileSync(".secret").toString().trim();
module.exports = {
networks: {
testnet: {
provider: () => new HDWalletProvider(mnemonic, 'https://http-testnet.Double-A Chainchain.com'),
network_id: 256
},
mainnet: {
provider: () => new HDWalletProvider(mnemonic, 'https://http-mainnet.Double-A Chainchain.com'),
network_id: 128
}
},
// Set default mocha options here, use special reporters etc.
mocha: {
// timeout: 100000
},
// Configure your compilers
compilers: {
solc: {
// version: "0.5.1", // Fetch exact version from solc-bin (default: truffle's version)
// docker: true, // Use "0.5.1" you've installed locally with docker (default: false)
// settings: { // See the solidity docs for advice about optimization and evmVersion
// optimizer: {
// enabled: false,
// runs: 200
// },
// evmVersion: "byzantium"
// }
},
},
};
Create contract put custom contracts into folder contracts
and modify deployment script in folder migrations
.
Deploy the contract. Run the deployment command.
truffle migrate --network testnet
The output should be as below.
2_example_migration.js
======================
Deploying 'ExampleToken'
------------------------
> transaction hash: 0x91e50594a63bc6f4c299f3f445868571678be306b835bddce6dff5c7a5ddf9dc
> Blocks: 2 Seconds: 4
> contract address: 0x54D2049715FC8De1361D7350de90eb05F0f6CA84
> block number: 375304
> block timestamp: 1608016637
> account: 0x03D32B774295D740ffEe43b20fcC0a53acC576e6
> balance: 878.909609236165318643
> gas used: 1056044 (0x101d2c)
> gas price: 20 gwei
> value sent: 0 ETH
> total cost: 0.02112088 ETH
> Saving migration to chain.
> Saving artifacts
-------------------------------------
> Total cost: 0.02112088 ETH
Summary
=======
> Total deployments: 1
> Final cost: 0.02112088 ETH
Contract deployment completed.
Finally, the contract deployment is complete.
Private Chain¶
Private chain construction¶
Prepare validator account(s)
According to the number of miner nodes, prepare corresponding validator account(s).
You can create a new account by the command geth account new
, and then put the password to a text file. For example:
./geth account new --datadir data
echo {your-password} > password.txt
After creating an account, you may see the address of the new account.
Or you can also look to the UTC-**
file under the data/keystore
path to find it, e.g.
c70DaecFA436538A93C406C3AC4ADaa5936b31da
Genesis.json configuration¶
{
"config": {
"chainId": 512,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"muirGlacierBlock": 0,
"congress": {
"period": 3,
"epoch": 200
}
},
"nonce": "0x0",
"timestamp": "0x622896c0",
"extraData":"0x0000000000000000000000000000000000000000000000000000000000000000652fe4b807f1c5c2eb793982862dcfc6e1a1f1a56288053c1c6cc78e08ff20b6a1d8aa21e40f4fbedcc6a10461a8cf084177a48e766b3bcbfcc2b1768f69562284c12d41402277202a16e9e7f495c6232e85113217c5630a5cc94b910ac3a73a58d55a283c3ef7f392e5d7f69afa586966fd2749867172cccad3ad525b3bf60da648f54fc7d0898da83612f88deccc7c6ab468778ec56e2b46fae079642f2bfa328047ad9ba6a63a051d168ea3ae22db609a6e2e792673c2d22d8aaac34eb6d20048207c5acec0a97650480dd8caf523bc4fd522ba544d2ffa744d6c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x2625a00",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"0000000000000000000000000000000000000000": {
"balance": "0x1"
},
"0000000000000000000000000000000000000001": {
"balance": "0x1"
},
"0000000000000000000000000000000000000002": {
"balance": "0x1"
},
"0000000000000000000000000000000000000003": {
"balance": "0x1"
},
"0000000000000000000000000000000000000004": {
"balance": "0x1"
},
"0000000000000000000000000000000000000005": {
"balance": "0x1"
},
"0000000000000000000000000000000000000006": {
"balance": "0x1"
},
"0000000000000000000000000000000000000007": {
"balance": "0x1"
},
"0000000000000000000000000000000000000008": {
"balance": "0x1"
},
"0000000000000000000000000000000000000009": {
"balance": "0x1"
},
"000000000000000000000000000000000000000a": {
"balance": "0x1"
},
"000000000000000000000000000000000000000b": {
"balance": "0x1"
},
"000000000000000000000000000000000000000c": {
"balance": "0x1"
},
"000000000000000000000000000000000000000d": {
"balance": "0x1"
},
"000000000000000000000000000000000000000e": {
"balance": "0x1"
},
"000000000000000000000000000000000000000f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000010": {
"balance": "0x1"
},
"0000000000000000000000000000000000000011": {
"balance": "0x1"
},
"0000000000000000000000000000000000000012": {
"balance": "0x1"
},
"0000000000000000000000000000000000000013": {
"balance": "0x1"
},
"0000000000000000000000000000000000000014": {
"balance": "0x1"
},
"0000000000000000000000000000000000000015": {
"balance": "0x1"
},
"0000000000000000000000000000000000000016": {
"balance": "0x1"
},
"0000000000000000000000000000000000000017": {
"balance": "0x1"
},
"0000000000000000000000000000000000000018": {
"balance": "0x1"
},
"0000000000000000000000000000000000000019": {
"balance": "0x1"
},
"000000000000000000000000000000000000001a": {
"balance": "0x1"
},
"000000000000000000000000000000000000001b": {
"balance": "0x1"
},
"000000000000000000000000000000000000001c": {
"balance": "0x1"
},
"000000000000000000000000000000000000001d": {
"balance": "0x1"
},
"000000000000000000000000000000000000001e": {
"balance": "0x1"
},
"000000000000000000000000000000000000f000": {
"balance": "0x0",
"code":"0x60806040526004361061013f5760003560e01c80636969a25c116100b6578063a224cee71161006f578063a224cee71461053b578063a406fcb7146105b6578063a43569b314610781578063afeea115146109c4578063b6c88519146109d9578063d6c0edad14610c9e5761013f565b80636969a25c146103975780638a11d7c9146103c157806398e3b6261461043d5780639de7025814610470578063a0798862146104d5578063a1ff4655146105085761013f565b806340550a1c1161010857806340550a1c1461020d57806340a141ff146102405780634b3d500b146102755780635dd095901461029f5780636233be5d146102d25780636846992a146102e75761013f565b8062362a77146101445780631303f7cf1461018b578063158ef93e146101b25780631b5e358c146101c75780633a061bd3146101f8575b600080fd5b34801561015057600080fd5b506101776004803603602081101561016757600080fd5b50356001600160a01b0316610ca6565b604080519115158252519081900360200190f35b34801561019757600080fd5b506101a0610f78565b60408051918252519081900360200190f35b3480156101be57600080fd5b50610177610f7e565b3480156101d357600080fd5b506101dc610f87565b604080516001600160a01b039092168252519081900360200190f35b34801561020457600080fd5b506101dc610f8d565b34801561021957600080fd5b506101776004803603602081101561023057600080fd5b50356001600160a01b0316610f93565b34801561024c57600080fd5b506102736004803603602081101561026357600080fd5b50356001600160a01b0316610fee565b005b34801561028157600080fd5b506101dc6004803603602081101561029857600080fd5b5035611047565b3480156102ab57600080fd5b50610273600480360360208110156102c257600080fd5b50356001600160a01b031661106e565b3480156102de57600080fd5b506101dc6110c4565b3480156102f357600080fd5b506102736004803603604081101561030a57600080fd5b810190602081018135600160201b81111561032457600080fd5b82018360208201111561033657600080fd5b803590602001918460208302840111600160201b8311171561035757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050913592506110ca915050565b3480156103a357600080fd5b506101dc600480360360208110156103ba57600080fd5b5035611311565b3480156103cd57600080fd5b506103f4600480360360208110156103e457600080fd5b50356001600160a01b031661131e565b6040516001600160a01b03861681526020810185600281111561041357fe5b60ff1681526020018481526020018381526020018281526020019550505050505060405180910390f35b34801561044957600080fd5b506101776004803603602081101561046057600080fd5b50356001600160a01b03166116e4565b34801561047c57600080fd5b50610485611736565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104c15781810151838201526020016104a9565b505050509050019250505060405180910390f35b3480156104e157600080fd5b50610177600480360360208110156104f857600080fd5b50356001600160a01b0316611799565b34801561051457600080fd5b506102736004803603602081101561052b57600080fd5b50356001600160a01b03166119cb565b34801561054757600080fd5b506102736004803603602081101561055e57600080fd5b810190602081018135600160201b81111561057857600080fd5b82018360208201111561058a57600080fd5b803590602001918460208302840111600160201b831117156105ab57600080fd5b509092509050611a1a565b3480156105c257600080fd5b50610177600480360360c08110156105d957600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561060357600080fd5b82018360208201111561061557600080fd5b803590602001918460018302840111600160201b8311171561063657600080fd5b919390929091602081019035600160201b81111561065357600080fd5b82018360208201111561066557600080fd5b803590602001918460018302840111600160201b8311171561068657600080fd5b919390929091602081019035600160201b8111156106a357600080fd5b8201836020820111156106b557600080fd5b803590602001918460018302840111600160201b831117156106d657600080fd5b919390929091602081019035600160201b8111156106f357600080fd5b82018360208201111561070557600080fd5b803590602001918460018302840111600160201b8311171561072657600080fd5b919390929091602081019035600160201b81111561074357600080fd5b82018360208201111561075557600080fd5b803590602001918460018302840111600160201b8311171561077657600080fd5b509092509050611d7a565b34801561078d57600080fd5b506107b4600480360360208110156107a457600080fd5b50356001600160a01b03166122b2565b60405180806020018060200180602001806020018060200186810386528b818151815260200191508051906020019080838360005b838110156108015781810151838201526020016107e9565b50505050905090810190601f16801561082e5780820380516001836020036101000a031916815260200191505b5086810385528a5181528a516020918201918c019080838360005b83811015610861578181015183820152602001610849565b50505050905090810190601f16801561088e5780820380516001836020036101000a031916815260200191505b5086810384528951815289516020918201918b019080838360005b838110156108c15781810151838201526020016108a9565b50505050905090810190601f1680156108ee5780820380516001836020036101000a031916815260200191505b5086810383528851815288516020918201918a019080838360005b83811015610921578181015183820152602001610909565b50505050905090810190601f16801561094e5780820380516001836020036101000a031916815260200191505b50868103825287518152875160209182019189019080838360005b83811015610981578181015183820152602001610969565b50505050905090810190601f1680156109ae5780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b3480156109d057600080fd5b5061048561267d565b3480156109e557600080fd5b50610177600480360360a08110156109fc57600080fd5b810190602081018135600160201b811115610a1657600080fd5b820183602082011115610a2857600080fd5b803590602001918460018302840111600160201b83111715610a4957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610a9b57600080fd5b820183602082011115610aad57600080fd5b803590602001918460018302840111600160201b83111715610ace57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610b2057600080fd5b820183602082011115610b3257600080fd5b803590602001918460018302840111600160201b83111715610b5357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610ba557600080fd5b820183602082011115610bb757600080fd5b803590602001918460018302840111600160201b83111715610bd857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610c2a57600080fd5b820183602082011115610c3c57600080fd5b803590602001918460018302840111600160201b83111715610c5d57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506126dd945050505050565b610273612882565b600033816001600160a01b038416600090815260016020526040902054600160a01b900460ff166002811115610cd857fe5b1415610d21576040805162461bcd60e51b815260206004820152601360248201527215985b1a59185d1bdc881b9bdd08195e1a5cdd606a1b604482015290519081900360640190fd5b6001600160a01b03838116600090815260016020526040902054811690821614610d7c5760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600554604080516394522b6d60e01b8152905143926001600160a01b0316916394522b6d916004808301926020929190829003018186803b158015610dc057600080fd5b505afa158015610dd4573d6000803e3d6000fd5b505050506040513d6020811015610dea57600080fd5b50516001600160a01b038516600090815260016020526040902060080154011115610e465760405162461bcd60e51b815260040180806020018281038252605c815260200180613467605c913960600191505060405180910390fd5b6001600160a01b03831660009081526001602052604090206006015480610eb4576040805162461bcd60e51b815260206004820152601a60248201527f596f7520646f6e2774206861766520616e792070726f66697473000000000000604482015290519081900360640190fd5b6001600160a01b03841660009081526001602052604081206006810191909155436008909101558015610f19576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610f17573d6000803e3d6000fd5b505b816001600160a01b0316846001600160a01b03167f51a69b4502f660774c9339825c7b5adbf0b8622289134647e29728ec5d9b3bb98342604051808381526020018281526020019250505060405180910390a36001925050505b919050565b60045481565b60005460ff1681565b61f00181565b61f00081565b6000805b600254811015610fe557826001600160a01b031660028281548110610fb857fe5b6000918252602090912001546001600160a01b03161415610fdd576001915050610f73565b600101610f97565b50600092915050565b3361f0011461103b576040805162461bcd60e51b815260206004820152601460248201527350756e69736820636f6e7472616374206f6e6c7960601b604482015290519081900360640190fd5b61104481612a22565b50565b6003818154811061105457fe5b6000918252602090912001546001600160a01b0316905081565b3361f001146110bb576040805162461bcd60e51b815260206004820152601460248201527350756e69736820636f6e7472616374206f6e6c7960601b604482015290519081900360640190fd5b61104481612b30565b61f00281565b33411461110b576040805162461bcd60e51b815260206004820152600a6024820152694d696e6572206f6e6c7960b01b604482015290519081900360640190fd5b4360009081526007602090815260408083206001845290915290205460ff161561117c576040805162461bcd60e51b815260206004820152601a60248201527f56616c696461746f727320616c72656164792075706461746564000000000000604482015290519081900360640190fd5b60005460ff166111c2576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081a5b9a5d081e595d60a21b604482015290519081900360640190fd5b808043816111cc57fe5b0615611212576040805162461bcd60e51b815260206004820152601060248201526f426c6f636b2065706f6368206f6e6c7960801b604482015290519081900360640190fd5b43600090815260076020908152604080832060018085529252909120805460ff191690911790558251611283576040805162461bcd60e51b815260206004820152601460248201527356616c696461746f722073657420656d7074792160601b604482015290519081900360640190fd5b82516112969060029060208601906132e0565b507feacea8f3c22f06c0b18306bdb04d0a967255129e8ce0094debb0a0ff89d006b5836040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156112f95781810151838201526020016112e1565b505050509050019250505060405180910390a1505050565b6002818154811061105457fe5b600080600080600061132e613345565b6001600160a01b03878116600090815260016020908152604091829020825160c0810190935280549384168352919290830190600160a01b900460ff16600281111561137657fe5b600281111561138157fe5b8152602001600182016040518060a0016040529081600082018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561142e5780601f106114035761010080835404028352916020019161142e565b820191906000526020600020905b81548152906001019060200180831161141157829003601f168201915b50505050508152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114d05780601f106114a5576101008083540402835291602001916114d0565b820191906000526020600020905b8154815290600101906020018083116114b357829003601f168201915b5050509183525050600282810180546040805160206001841615610100026000190190931694909404601f810183900483028501830190915280845293810193908301828280156115625780601f1061153757610100808354040283529160200191611562565b820191906000526020600020905b81548152906001019060200180831161154557829003601f168201915b505050918352505060038201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156115f65780601f106115cb576101008083540402835291602001916115f6565b820191906000526020600020905b8154815290600101906020018083116115d957829003601f168201915b505050918352505060048201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561168a5780601f1061165f5761010080835404028352916020019161168a565b820191906000526020600020905b81548152906001019060200180831161166d57829003601f168201915b50505050508152505081526020016006820154815260200160078201548152602001600882015481525050905080600001518160200151826060015183608001518460a00151955095509550955095505091939590929450565b6000805b600354811015610fe557826001600160a01b03166003828154811061170957fe5b6000918252602090912001546001600160a01b0316141561172e576001915050610f73565b6001016116e8565b6060600280548060200260200160405190810160405280929190818152602001828054801561178e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611770575b505050505090505b90565b60003361f002146117ea576040805162461bcd60e51b815260206004820152601660248201527550726f706f73616c20636f6e7472616374206f6e6c7960501b604482015290519081900360640190fd5b60005460ff16611830576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081a5b9a5d081e595d60a21b604482015290519081900360640190fd5b60016001600160a01b038316600090815260016020526040902054600160a01b900460ff16600281111561186057fe5b141561186e57506001610f73565b61187782612c54565b60026001600160a01b038316600090815260016020526040902054600160a01b900460ff1660028111156118a757fe5b141561196857600654604080516363e1d45160e01b81526001600160a01b038581166004830152915191909216916363e1d4519160248083019260209291908290030181600087803b1580156118fc57600080fd5b505af1158015611910573d6000803e3d6000fd5b505050506040513d602081101561192657600080fd5b5051611968576040805162461bcd60e51b815260206004820152600c60248201526b18db19585b8819985a5b195960a21b604482015290519081900360640190fd5b6001600160a01b038216600081815260016020908152604091829020805460ff60a01b1916600160a01b179055815142815291517f8bef9a500ef702fa4b7c82318f7b750176b75d33c8897ad10a35e5e5e41613629281900390910190a2919050565b3361f0021461103b576040805162461bcd60e51b815260206004820152601660248201527550726f706f73616c20636f6e7472616374206f6e6c7960501b604482015290519081900360640190fd5b60005460ff1615611a68576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b600580546001600160a01b031990811661f002179091556006805490911661f00117905560005b81811015611d68576000838383818110611aa557fe5b905060200201356001600160a01b03166001600160a01b03161415611b11576040805162461bcd60e51b815260206004820152601960248201527f496e76616c69642076616c696461746f72206164647265737300000000000000604482015290519081900360640190fd5b611b35838383818110611b2057fe5b905060200201356001600160a01b0316610f93565b611b84576002838383818110611b4757fe5b835460018101855560009485526020948590200180546001600160a01b0319166001600160a01b0395909202939093013593909316929092179055505b611ba8838383818110611b9357fe5b905060200201356001600160a01b03166116e4565b611bf7576003838383818110611bba57fe5b835460018101855560009485526020948590200180546001600160a01b0319166001600160a01b0395909202939093013593909316929092179055505b6000600181858585818110611c0857fe5b6001600160a01b0360209182029390930135831684528301939093526040909101600020541691909114159050611cbd57828282818110611c4557fe5b905060200201356001600160a01b031660016000858585818110611c6557fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b0316815260200190815260200160002060000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b600060016000858585818110611ccf57fe5b602090810292909201356001600160a01b031683525081019190915260400160002054600160a01b900460ff166002811115611d0757fe5b1415611d60576001806000858585818110611d1e57fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff60a01b1916600160a01b836002811115611d5a57fe5b02179055505b600101611a8f565b50506000805460ff1916600117905550565b6000805460ff16611dc1576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081a5b9a5d081e595d60a21b604482015290519081900360640190fd5b6001600160a01b038c16611e12576040805162461bcd60e51b8152602060048201526013602482015272496e76616c696420666565206164647265737360681b604482015290519081900360640190fd5b611f218b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8f018190048102820181019092528d815292508d91508c908190840183828082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b908190840183828082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a908190840183828082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a91508990819084018382808284376000920191909152506126dd92505050565b611f68576040805162461bcd60e51b815260206004820152601360248201527224b73b30b634b2103232b9b1b934b83a34b7b760691b604482015290519081900360640190fd5b6005546040805163416259d960e11b81523360048201819052915191926001600160a01b0316916382c4b3b291602480820192602092909190829003018186803b158015611fb557600080fd5b505afa158015611fc9573d6000803e3d6000fd5b505050506040513d6020811015611fdf57600080fd5b5051612032576040805162461bcd60e51b815260206004820152601c60248201527f596f75206d75737420626520617574686f72697a656420666972737400000000604482015290519081900360640190fd5b6001600160a01b038181166000908152600160205260409020548116908e1614612085576001600160a01b03818116600090815260016020526040902080546001600160a01b031916918f169190911790555b6040518060a001604052808d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8e018190048102820181019092528c815291810191908d908d9081908401838280828437600092019190915250505090825250604080516020601f8c018190048102820181019092528a815291810191908b908b9081908401838280828437600092019190915250505090825250604080516020601f8a0181900481028201810190925288815291810191908990899081908401838280828437600092019190915250505090825250604080516020601f88018190048102820181019092528681529181019190879087908190840183828082843760009201829052509390945250506001600160a01b0384168152600160208181526040909220845180519190920193506121e3928492019061337f565b5060208281015180516121fc926001850192019061337f565b506040820151805161221891600284019160209091019061337f565b506060820151805161223491600384019160209091019061337f565b506080820151805161225091600484019160209091019061337f565b509050508c6001600160a01b0316816001600160a01b03167fb8421f65501371f54d58de1937ff1e1ccdb76423ef6f84acea1814a0f6362ca0426040518082815260200191505060405180910390a35060019c9b505050505050505050505050565b60608060608060606122c2613345565b6001600160a01b03878116600090815260016020908152604091829020825160c0810190935280549384168352919290830190600160a01b900460ff16600281111561230a57fe5b600281111561231557fe5b8152602001600182016040518060a0016040529081600082018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156123c25780601f10612397576101008083540402835291602001916123c2565b820191906000526020600020905b8154815290600101906020018083116123a557829003601f168201915b50505050508152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124645780601f1061243957610100808354040283529160200191612464565b820191906000526020600020905b81548152906001019060200180831161244757829003601f168201915b5050509183525050600282810180546040805160206001841615610100026000190190931694909404601f810183900483028501830190915280845293810193908301828280156124f65780601f106124cb576101008083540402835291602001916124f6565b820191906000526020600020905b8154815290600101906020018083116124d957829003601f168201915b505050918352505060038201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561258a5780601f1061255f5761010080835404028352916020019161258a565b820191906000526020600020905b81548152906001019060200180831161256d57829003601f168201915b505050918352505060048201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561261e5780601f106125f35761010080835404028352916020019161261e565b820191906000526020600020905b81548152906001019060200180831161260157829003601f168201915b50505091909252505050815260068201546020808301919091526007830154604080840191909152600890930154606092830152928201518051938101519281015191810151608090910151939b929a50909850965090945092505050565b6060600380548060200260200160405190810160405280929190818152602001828054801561178e576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611770575050505050905090565b600060468651111561272f576040805162461bcd60e51b8152602060048201526016602482015275092dcecc2d8d2c840dadedcd2d6cae440d8cadccee8d60531b604482015290519081900360640190fd5b610bb885511115612787576040805162461bcd60e51b815260206004820152601760248201527f496e76616c6964206964656e74697479206c656e677468000000000000000000604482015290519081900360640190fd5b608c845111156127d7576040805162461bcd60e51b8152602060048201526016602482015275092dcecc2d8d2c840eecac4e6d2e8ca40d8cadccee8d60531b604482015290519081900360640190fd5b608c83511115612825576040805162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840cadac2d2d840d8cadccee8d60631b604482015290519081900360640190fd5b61011882511115612876576040805162461bcd60e51b8152602060048201526016602482015275092dcecc2d8d2c840c8cae8c2d2d8e640d8cadccee8d60531b604482015290519081900360640190fd5b50600195945050505050565b3341146128c3576040805162461bcd60e51b815260206004820152600a6024820152694d696e6572206f6e6c7960b01b604482015290519081900360640190fd5b43600090815260076020908152604080832083805290915290205460ff1615612933576040805162461bcd60e51b815260206004820152601960248201527f426c6f636b20697320616c726561647920726577617264656400000000000000604482015290519081900360640190fd5b60005460ff16612979576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081a5b9a5d081e595d60a21b604482015290519081900360640190fd5b4360009081526007602090815260408083208380528252808320805460ff1916600190811790915533808552925282205490913491600160a01b900460ff1660028111156129c357fe5b14156129d0575050612a20565b6129db816000612d27565b6040805182815242602082015281516001600160a01b038516927f7dc4e5df59513708dca355b8706273a5df7b810a4cec8019f2a4b9bb166a1a04928290030190a250505b565b6001600160a01b03811660009081526001602052604090206006810154815460ff60a01b1916600160a11b17909155612a5a82612b30565b60035460011015612b2c57612a6e82612ecd565b600554604080516315ea278160e01b81526001600160a01b038581166004830152915191909216916315ea27819160248083019260209291908290030181600087803b158015612abd57600080fd5b505af1158015612ad1573d6000803e3d6000fd5b505050506040513d6020811015612ae757600080fd5b50506040805182815242602082015281516001600160a01b038516927fa26de7ab324eac08c596549f421e5c8741213d237d2e9a2c9c0ebde0a7a849fe928290030190a25b5050565b60006001600160a01b038216600090815260016020526040902054600160a01b900460ff166002811115612b6057fe5b1480612b6f5750600254600110155b15612b7957611044565b6001600160a01b0381166000908152600160205260409020600601548015612c0e57612ba58183612d27565b600454612bb8908263ffffffff61300316565b6004556001600160a01b038216600090815260016020526040902060070154612be7908263ffffffff61300316565b6001600160a01b038316600090815260016020526040812060078101929092556006909101555b6040805182815242602082015281516001600160a01b038516927fe294e9d73f8eee23e21b2e1567960625a6b5d339cb127b55d0d09473a9951235928290030190a25050565b60005b600354811015612ca157816001600160a01b031660038281548110612c7857fe5b6000918252602090912001546001600160a01b03161415612c995750611044565b600101612c57565b50600380546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b0383166001600160a01b031990911681179091556040805142815290517f1e3310ad6891b30e03874ec3d1422a6386c5da63d9faf595f5d99eeaf443b99a9181900360200190a250565b81612d3157612b2c565b6000612d3c82613066565b905080612d495750612b2c565b60008080612d5d868563ffffffff61310716565b9050612d7f612d72828663ffffffff61314916565b879063ffffffff6131a216565b925060005b600254811015612e5e57600060028281548110612d9d57fe5b6000918252602090912001546001600160a01b0316905060026001600160a01b038216600090815260016020526040902054600160a01b900460ff166002811115612de457fe5b14158015612e045750866001600160a01b0316816001600160a01b031614155b15612e55576001600160a01b038116600090815260016020526040902060060154612e35908463ffffffff61300316565b6001600160a01b0382166000908152600160205260409020600601559250825b50600101612d84565b50600083118015612e7757506001600160a01b03821615155b15612ec5576001600160a01b038216600090815260016020526040902060060154612ea8908463ffffffff61300316565b6001600160a01b0383166000908152600160205260409020600601555b505050505050565b60005b60035481108015612ee357506003546001105b15612b2c5760038181548110612ef557fe5b6000918252602090912001546001600160a01b0383811691161415612ffb57600354600019018114612f8857600380546000198101908110612f3357fe5b600091825260209091200154600380546001600160a01b039092169183908110612f5957fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b6003805480612f9357fe5b6000828152602090819020820160001990810180546001600160a01b03191690559091019091556040805142815290516001600160a01b038516927f7521e44559c870c316e84e60bc4785d9c034a8ab1d6acdce8134ac03f946c6ed928290030190a2612b2c565b600101612ed0565b60008282018381101561305d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b600080805b6002548110156131005760006002828154811061308457fe5b6000918252602090912001546001600160a01b0316905060026001600160a01b038216600090815260016020526040902054600160a01b900460ff1660028111156130cb57fe5b141580156130eb5750846001600160a01b0316816001600160a01b031614155b156130f7576001909201915b5060010161306b565b5092915050565b600061305d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506131e4565b60008261315857506000613060565b8282028284828161316557fe5b041461305d5760405162461bcd60e51b81526004018080602001828103825260218152602001806134c36021913960400191505060405180910390fd5b600061305d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613286565b600081836132705760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561323557818101518382015260200161321d565b50505050905090810190601f1680156132625780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161327c57fe5b0495945050505050565b600081848411156132d85760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561323557818101518382015260200161321d565b505050900390565b828054828255906000526020600020908101928215613335579160200282015b8281111561333557825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613300565b506133419291506133f9565b5090565b6040805160c0810182526000808252602082015290810161336461341d565b81526020016000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106133c057805160ff19168380011785556133ed565b828001600101855582156133ed579182015b828111156133ed5782518255916020019190600101906133d2565b5061334192915061344c565b61179691905b808211156133415780546001600160a01b03191681556001016133ff565b6040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b61179691905b80821115613341576000815560010161345256fe596f75206d757374207761697420656e6f75676820626c6f636b7320746f20776974686472617720796f75722070726f66697473206166746572206c6174657374207769746864726177206f6620746869732076616c696461746f72536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77596f7520617265206e6f742074686520666565207265636569766572206f6620746869732076616c696461746f72a264697066735822122074fbfd1e5cf6ffb9e4d2707c200cd0b51e9b262d9166c8b62348a8fd2b1897db64736f6c63430006010033"
},
"000000000000000000000000000000000000F001": {
"balance": "0x0",
"code":"0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806363e1d4511161007157806363e1d451146101365780638129fc1c1461015c578063d93d2cb914610166578063e0d8ea5314610183578063ea7221a11461018b578063f62af26c146101b1576100a9565b8063158ef93e146100ae5780631b5e358c146100ca57806332f3c17f146100ee5780633a061bd3146101265780636233be5d1461012e575b600080fd5b6100b66101ce565b604080519115158252519081900360200190f35b6100d26101d7565b604080516001600160a01b039092168252519081900360200190f35b6101146004803603602081101561010457600080fd5b50356001600160a01b03166101dd565b60408051918252519081900360200190f35b6100d26101f8565b6100d26101fe565b6100b66004803603602081101561014c57600080fd5b50356001600160a01b0316610204565b610164610431565b005b6101646004803603602081101561017c57600080fd5b50356104b4565b610114610921565b610164600480360360208110156101a157600080fd5b50356001600160a01b0316610927565b6100d2600480360360208110156101c757600080fd5b5035610d2b565b60005460ff1681565b61f00181565b6001600160a01b031660009081526002602052604090205490565b61f00081565b61f00281565b6000805460ff1661024b576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081a5b9a5d081e595d60a21b604482015290519081900360640190fd5b3361f000146102a1576040805162461bcd60e51b815260206004820152601860248201527f56616c696461746f727320636f6e7472616374206f6e6c790000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260026020526040902054156102d9576001600160a01b0382166000908152600260205260408120555b6001600160a01b0382166000908152600260208190526040909120015460ff168015610306575060035415155b15610429576003546001600160a01b038316600090815260026020526040902060010154600019909101146103d0576003805460009190600019810190811061034b57fe5b60009182526020808320909101546001600160a01b038681168452600290925260409092206001015460038054929093169350839291811061038957fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790558583168252600290526040808220600190810154949093168252902001555b60038054806103db57fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038416825260029081905260408220600181019290925501805460ff191690555b506001919050565b60005460ff161561047f576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b600080546001805461f0026001600160a01b0319909116178155610100600160a81b031990911662f000001760ff1916179055565b3341146104f5576040805162461bcd60e51b815260206004820152600a6024820152694d696e6572206f6e6c7960b01b604482015290519081900360640190fd5b4360009081526005602052604090205460ff161561054e576040805162461bcd60e51b8152602060048201526011602482015270105b1c9958591e48191958dc99585cd959607a1b604482015290519081900360640190fd5b60005460ff16610594576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081a5b9a5d081e595d60a21b604482015290519081900360640190fd5b8080438161059e57fe5b06156105e4576040805162461bcd60e51b815260206004820152601060248201526f426c6f636b2065706f6368206f6e6c7960801b604482015290519081900360640190fd5b436000908152600560205260409020805460ff1916600117905560035461060a5761091d565b60005b6003548110156108f257600160009054906101000a90046001600160a01b03166001600160a01b0316632897183d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561066557600080fd5b505afa158015610679573d6000803e3d6000fd5b505050506040513d602081101561068f57600080fd5b5051600154604080516344c1aa9960e01b815290516001600160a01b03909216916344c1aa9991600480820192602092909190829003018186803b1580156106d657600080fd5b505afa1580156106ea573d6000803e3d6000fd5b505050506040513d602081101561070057600080fd5b50518161070957fe5b04600260006003848154811061071b57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205411156108b157600160009054906101000a90046001600160a01b03166001600160a01b0316632897183d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561079457600080fd5b505afa1580156107a8573d6000803e3d6000fd5b505050506040513d60208110156107be57600080fd5b5051600154604080516344c1aa9960e01b815290516001600160a01b03909216916344c1aa9991600480820192602092909190829003018186803b15801561080557600080fd5b505afa158015610819573d6000803e3d6000fd5b505050506040513d602081101561082f57600080fd5b50518161083857fe5b04600260006003848154811061084a57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400181205460038054939091039260029291908590811061088757fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556108ea565b600060026000600384815481106108c457fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020555b60010161060d565b506040517f181d51be54e8e8eaca6eae0eab32d4162099236bd519e7238d015d0870db464190600090a15b5050565b60035490565b334114610968576040805162461bcd60e51b815260206004820152600a6024820152694d696e6572206f6e6c7960b01b604482015290519081900360640190fd5b60005460ff166109ae576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081a5b9a5d081e595d60a21b604482015290519081900360640190fd5b4360009081526004602052604090205460ff1615610a06576040805162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c1d5b9a5cda195960821b604482015290519081900360640190fd5b436000908152600460209081526040808320805460ff191660011790556001600160a01b0384168352600291829052909120015460ff16610ab157600380546001600160a01b0383166000818152600260208190526040822060018082018690558086019096557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90940180546001600160a01b0319168417905591905201805460ff191690911790555b6001600160a01b03808216600090815260026020908152604091829020805460019081019091555482516344c1aa9960e01b815292519316926344c1aa99926004808201939291829003018186803b158015610b0c57600080fd5b505afa158015610b20573d6000803e3d6000fd5b505050506040513d6020811015610b3657600080fd5b50516001600160a01b03821660009081526002602052604090205481610b5857fe5b06610be25760008054604080516340a141ff60e01b81526001600160a01b0385811660048301529151610100909304909116926340a141ff9260248084019382900301818387803b158015610bac57600080fd5b505af1158015610bc0573d6000803e3d6000fd5b5050506001600160a01b03821660009081526002602052604081205550610ce9565b600160009054906101000a90046001600160a01b03166001600160a01b031663cb1ea7256040518163ffffffff1660e01b815260040160206040518083038186803b158015610c3057600080fd5b505afa158015610c44573d6000803e3d6000fd5b505050506040513d6020811015610c5a57600080fd5b50516001600160a01b03821660009081526002602052604090205481610c7c57fe5b06610ce95760008054604080516305dd095960e41b81526001600160a01b038581166004830152915161010090930490911692635dd095909260248084019382900301818387803b158015610cd057600080fd5b505af1158015610ce4573d6000803e3d6000fd5b505050505b6040805142815290516001600160a01b038316917f770e0cca42c35d00240986ce8d3ed438be04663c91dac6576b79537d7c180f1e919081900360200190a250565b60038181548110610d3857fe5b6000918252602090912001546001600160a01b031690508156fea264697066735822122027981a8cadfb724386bcc7da5c5bdb7579d3540b7628b5fd548a32061759d13764736f6c63430006010033"
},
"000000000000000000000000000000000000F002": {
"balance": "0x0",
"code":"0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806382c4b3b2116100ad578063cb1ea72511610071578063cb1ea7251461041c578063d24806eb14610424578063d51cade814610447578063d63e6ce7146104cc578063e823c814146104d45761012c565b806382c4b3b21461035157806394522b6d14610377578063a224cee71461037f578063a3dcb4d2146103ef578063a4c4d922146103f75761012c565b806332ed5b12116100f457806332ed5b12146102075780633a061bd3146102f557806344c1aa99146102fd5780634c6b25b1146103055780636233be5d146103495761012c565b8063158ef93e1461013157806315ea27811461014d5780631b5e358c146101735780631db5ade8146101975780632897183d146101ed575b600080fd5b6101396104dc565b604080519115158252519081900360200190f35b6101396004803603602081101561016357600080fd5b50356001600160a01b03166104e5565b61017b61059a565b604080516001600160a01b039092168252519081900360200190f35b6101c3600480360360408110156101ad57600080fd5b506001600160a01b0381351690602001356105a0565b604080516001600160a01b0390941684526020840192909252151582820152519081900360600190f35b6101f56105d9565b60408051918252519081900360200190f35b6102246004803603602081101561021d57600080fd5b50356105df565b60405180896001600160a01b03166001600160a01b03168152602001888152602001878152602001866001600160a01b03166001600160a01b031681526020018515151515815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b838110156102b357818101518382015260200161029b565b50505050905090810190601f1680156102e05780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390f35b61017b6106bf565b6101f56106c5565b6103226004803603602081101561031b57600080fd5b50356106cb565b6040805161ffff948516815292909316602083015215158183015290519081900360600190f35b61017b6106f8565b6101396004803603602081101561036757600080fd5b50356001600160a01b03166106fe565b6101f5610713565b6103ed6004803603602081101561039557600080fd5b810190602081018135600160201b8111156103af57600080fd5b8201836020820111156103c157600080fd5b803590602001918460208302840111600160201b831117156103e257600080fd5b509092509050610719565b005b61017b6108a8565b6101396004803603604081101561040d57600080fd5b508035906020013515156108b7565b6101f5611069565b6101396004803603604081101561043a57600080fd5b508035906020013561106f565b6101396004803603606081101561045d57600080fd5b6001600160a01b03823516916020810135151591810190606081016040820135600160201b81111561048e57600080fd5b8201836020820111156104a057600080fd5b803590602001918460018302840111600160201b831117156104c157600080fd5b5090925090506111c6565b6101f56114dc565b6101f56114e2565b60005460ff1681565b60003361f0001461053d576040805162461bcd60e51b815260206004820152601860248201527f56616c696461746f727320636f6e7472616374206f6e6c790000000000000000604482015290519081900360640190fd5b6001600160a01b038216600081815260086020908152604091829020805460ff19169055815142815291517f4e0b191f7f5c32b1b5e3704b68874b1a3980147cae00be8ece271bfb5b92c07a9281900390910190a2506001919050565b61f00181565b600b6020908152600092835260408084209091529082529020805460018201546002909201546001600160a01b03909116919060ff1683565b60045481565b600960209081526000918252604091829020805460018083015460028085015460038601546004870180548a516101009782161597909702600019011693909304601f81018990048902860189019099528885526001600160a01b03958616989397919695811695600160a01b90910460ff169490939092918301828280156106a95780601f1061067e576101008083540402835291602001916106a9565b820191906000526020600020905b81548152906001019060200180831161068c57829003601f168201915b5050505050908060050154908060060154905088565b61f00081565b60035481565b600a6020526000908152604090205461ffff8082169162010000810490911690600160201b900460ff1683565b61f00281565b60086020526000908152604090205460ff1681565b60055481565b60005460ff1615610767576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b600c80546001600160a01b03191661f00017905560005b8181101561084b57600083838381811061079457fe5b905060200201356001600160a01b03166001600160a01b03161415610800576040805162461bcd60e51b815260206004820152601960248201527f496e76616c69642076616c696461746f72206164647265737300000000000000604482015290519081900360640190fd5b60016008600085858581811061081257fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff191691151591909117905560010161077e565b505062093a80600190815560186002819055603060035560045561708060055562a066806006556000805460ff1916909117905550600780546001600160a01b03191673c70daecfa436538a93c406c3ac4adaa5936b31da179055565b6007546001600160a01b031681565b600c5460408051631015428760e21b815233600482015290516000926001600160a01b0316916340550a1c916024808301926020929190829003018186803b15801561090257600080fd5b505afa158015610916573d6000803e3d6000fd5b505050506040513d602081101561092c57600080fd5b5051610970576040805162461bcd60e51b815260206004820152600e60248201526d56616c696461746f72206f6e6c7960901b604482015290519081900360640190fd5b6000838152600960205260409020600101546109c8576040805162461bcd60e51b8152602060048201526012602482015271141c9bdc1bdcd85b081b9bdd08195e1a5cdd60721b604482015290519081900360640190fd5b336000908152600b6020908152604080832086845290915290206001015415610a225760405162461bcd60e51b81526004018080602001828103825260238152602001806116746023913960400191505060405180910390fd5b60018054600085815260096020526040902090910154014210610a7f576040805162461bcd60e51b815260206004820152601060248201526f141c9bdc1bdcd85b08195e1c1a5c995960821b604482015290519081900360640190fd5b336000818152600b60209081526040808320878452825291829020426001820181905581546001600160a01b031916851782556002909101805460ff1916871515908117909155835190815291820152815186927f6c59bda68cac318717c60c7c9635a78a0f0613f9887cc18a7157f5745a86d14e928290030190a38115610b2a576000838152600a60205260409020805461ffff8082166001011661ffff19909116179055610b5b565b6000838152600a602052604090208054600161ffff62010000808404821692909201160263ffff0000199091161790555b6000838152600a6020526040902054600160201b900460ff1615610b8157506001611063565b600c54604080516313bce04b60e31b815290516002926001600160a01b031691639de70258916004808301926000929190829003018186803b158015610bc657600080fd5b505afa158015610bda573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610c0357600080fd5b8101908080516040519392919084600160201b821115610c2257600080fd5b908301906020820185811115610c3757600080fd5b82518660208202830111600160201b82111715610c5357600080fd5b82525081516020918201928201910280838360005b83811015610c80578181015183820152602001610c68565b505050509050016040525050505181610c9557fe5b6000858152600a602052604090205491900460010161ffff90911610610ecf576000838152600a60209081526040808320805464ff000000001916600160201b179055600990915290206002015460011415610e5457600083815260096020526040902060030154600160a01b900460ff1615610dbd57600083815260096020818152604080842060030180546001600160a01b03908116865260088452828620805460ff19166001179055600c548987529484529054825163503cc43160e11b81529082166004820152915193169363a079886293602480840194939192918390030190829087803b158015610d8b57600080fd5b505af1158015610d9f573d6000803e3d6000fd5b505050506040513d6020811015610db557600080fd5b50610e4f9050565b600083815260096020818152604080842060030180546001600160a01b03908116865260088452828620805460ff19169055600c548987529490935254815163a1ff465560e01b815290831660048201529051929091169263a1ff46559260248084019382900301818387803b158015610e3657600080fd5b505af1158015610e4a573d6000803e3d6000fd5b505050505b610e91565b60008381526009602052604090206002908101541415610e915760008381526009602052604090206005810154600690910154610e9191906114e8565b60408051428152905184917f90d2e923947d9356c1c04391cb9e2e9c5d4ad6c165a849787b0c7569bbe99e24919081900360200190a2506001611063565b600c54604080516313bce04b60e31b815290516002926001600160a01b031691639de70258916004808301926000929190829003018186803b158015610f1457600080fd5b505afa158015610f28573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610f5157600080fd5b8101908080516040519392919084600160201b821115610f7057600080fd5b908301906020820185811115610f8557600080fd5b82518660208202830111600160201b82111715610fa157600080fd5b82525081516020918201928201910280838360005b83811015610fce578181015183820152602001610fb6565b505050509050016040525050505181610fe357fe5b6000858152600a60205260409020549190046001016201000090910461ffff161061105f576000838152600a6020908152604091829020805464ff000000001916600160201b1790558151428152915185927f36bdb56d707cdf53eadffe319a71ddf97736be67b8caab47b7720201a6b65ca092908290030190a25b5060015b92915050565b60025481565b604080513360601b60208083019190915260348201859052605482018490524260748084019190915283518084039091018152609490920190925280519101206000906110ba61157f565b33815260c0810185905260e081018490524260208083019182526002604080850182815260008781526009855291909120855181546001600160a01b039182166001600160a01b031991821617835595516001830155915192810192909255606085015160038301805460808801511515600160a01b0260ff60a01b1993909416961695909517161790925560a083015180518493926111619260048501929101906115d8565b5060c0820151600582015560e090910151600690910155604080518681526020810186905242818301529051339184917f8bfc061277ae1778974ada10db7f9664ab1d67c455c025c025b438c52c69d1819181900360600190a3506001949350505050565b6001600160a01b03841660009081526008602052604081205460ff161580156111ec5750835b8061121857506001600160a01b03851660009081526008602052604090205460ff168015611218575083155b6112535760405162461bcd60e51b81526004018080602001828103825260408152602001806116976040913960400191505060405180910390fd5b600033868686864260405160200180876001600160a01b03166001600160a01b031660601b8152601401866001600160a01b03166001600160a01b031660601b8152601401851515151560f81b81526001018484808284379190910192835250506040805180830381526020928301909152805191012095505050610bb8861115925061131d915050576040805162461bcd60e51b815260206004820152601060248201526f44657461696c7320746f6f206c6f6e6760801b604482015290519081900360640190fd5b60008181526009602052604090206001015415611381576040805162461bcd60e51b815260206004820152601760248201527f50726f706f73616c20616c726561647920657869737473000000000000000000604482015290519081900360640190fd5b61138961157f565b3381526001600160a01b03871660608201528515156080820152604080516020601f8701819004810282018101909252858152908690869081908401838280828437600092018290525060a0860194855242602080880191825260016040808a018281528b8652600984529420895181546001600160a01b039182166001600160a01b031991821617835594519282019290925593516002850155606089015160038501805460808c01511515600160a01b0260ff60a01b1993909416951694909417161790915594518051879692955061146d94506004860193509101906115d8565b5060c0820151600582015560e09091015160069091015560408051871515815242602082015281516001600160a01b038a1692339286927f1af05d46b8c1ec021d82b7128cff40e91a1c2337deffc010df48eeddef8da56c929181900390910190a45060019695505050505050565b60065481565b60015481565b816114f757600181905561157b565b816001141561150a57600281905561157b565b816002141561151d57600381905561157b565b816003141561153057600481905561157b565b816004141561154357600581905561157b565b816005141561155657600681905561157b565b816006141561157b57600780546001600160a01b0319166001600160a01b0383161790555b5050565b60405180610100016040528060006001600160a01b03168152602001600081526020016000815260200160006001600160a01b031681526020016000151581526020016060815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061161957805160ff1916838001178555611646565b82800160010185558215611646579182015b8281111561164657825182559160200191906001019061162b565b50611652929150611656565b5090565b61167091905b80821115611652576000815560010161165c565b9056fe596f752063616e277420766f746520666f7220612070726f706f73616c20747769636543616e74227420616464206120616c726561647920657869737420647374206f722043616e7422742072656d6f76652061206e6f742070617373656420647374a26469706673582212205f5ad48d3dff782e815b9d653fbb88dcac19a73c5c41385583b68da287201a7264736f6c63430006010033"
},
"c70DaecFA436538A93C406C3AC4ADaa5936b31da": {
"balance": "0x00000000000000000000000000000000000000000026c62ad77dc6020000000000"
},
"261791B077B3308918718Ce1b66C80aa5460b593": {
"balance": "0x000000000000000000000000000000000000000000000000004563918244f40000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
congress
Consensus-related parametersperiod
Block interval time.extraDataUse
to set inital validators. Replacec70DaecFA436538A93C406C3AC4ADaa5936b31da
with your own address. If you want multiple validators, you can replace with stitching them together.alloc
000000000000000000000000000000000000f000 000000000000000000000000000000000000f001 000000000000000000000000000000000000f002
are system contracts. If you wish to compile it yourself, you can configuredeployedBytecode
field after compilation.
Create genesis block¶
After generating the genesis.json
file, execute the following command to create the genesis block.
geth init genesis.json
Multiple nodes¶
Use the same genesis.json
file for initializing the node. Then go to the node command line with the geth attach
command. View the node information via admin.nodeInfo
. Then add the node on other machines with admin.addPeer
,
Mainnet Info¶
Mainnet Info¶
Chain ID¶
512
RPC¶
https://rpc.acuteangle.com
Explorer¶
https://scan.acuteangle.com
P2P Nodes¶
Allow P2P port(default 32668) udp/tcp
The following nodes are default config for bootstrap node in code https://github.com/double-a-chain-cloud/double-a-chain/blob/master/params/bootnodes.go
enode://7bed18c87054f807bc9096501bc78f737363f357af831791bab07c4fa6c5a1a67cdcf0a097dc2cc918262ef04fb1c05c26026df5c11a6a56666f9b1fb4072210@18.178.30.66:32668
enode://d67251dd3b050e555679a8abdc427a4c78a9bae174f2fd3b9163c364d27b6a69688ee067cd3214e8ceb71e6e602fd812797b085ae37ed3bf93b78e2b77ae3306@18.181.40.7:32668
enode://f88bb1f5d0e42cf75ec879212b7c8477d605315d5296fba02bc4600eccf73c64427de46567a320d00985d5bc612168817ba6dff169bd6a4774e112e6db0ff6a2@18.176.66.118:32668
Put these into static node:
[Node.P2P]
StaticNodes = [
"enode://7bed18c87054f807bc9096501bc78f737363f357af831791bab07c4fa6c5a1a67cdcf0a097dc2cc918262ef04fb1c05c26026df5c11a6a56666f9b1fb4072210@18.178.30.66:32668",
"enode://d67251dd3b050e555679a8abdc427a4c78a9bae174f2fd3b9163c364d27b6a69688ee067cd3214e8ceb71e6e602fd812797b085ae37ed3bf93b78e2b77ae3306@18.181.40.7:32668",
"enode://f88bb1f5d0e42cf75ec879212b7c8477d605315d5296fba02bc4600eccf73c64427de46567a320d00985d5bc612168817ba6dff169bd6a4774e112e6db0ff6a2@18.176.66.118:32668"
]
Testnet¶
ARC20¶
ARC20 standard¶
Double-A Chain is fully compatible with the ERC20 standard, and the interfaces and events are as follows:
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// ----------------------------------------------------------------------------
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
EIP Reference: eip-20 Implementation reference: openzeppelin-contracts
ARC721¶
ARC721 standard¶
ARC-721 provides functions like transferring tokens from one account to another, getting the current token balance of an account, getting the owner of a specific token, and the total supply of the token available on the network. Besides these, it also has some other functionalities like to approve that an amount of token from an account can be moved by a third party account. If a Smart Contract implements the following methods and events, it can be called an ARC-721 Non-Fungible Token Contract and, once deployed. It will be responsible for keeping track of the created tokens on Double-A Chain.
Methods¶
function balanceOf(address _owner) external view returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable;
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;
function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
function approve(address _approved, uint256 _tokenId) external payable;
function setApprovalForAll(address _operator, bool _approved) external;
function getApproved(uint256 _tokenId) external view returns (address);
function isApprovedForAll(address _owner, address _operator) external view returns (bool);
Events¶
event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);
event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);
Web3.py Example¶
First,make sure you have installed Web3.py
Python database.
pip install web3
from web3 import Web3
from web3._utils.events import get_event_data
w3 = Web3(Web3.HTTPProvider("https://cloudflare-eth.com"))
ck_token_addr = "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d" # CryptoKitties Contract
acc_address = "0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C" # CryptoKitties Sales Auction
# This is a simplified Contract Application Binary Interface (ABI) of an ARC-721 NFT Contract.
# It will expose only the methods: balanceOf(address), name(), ownerOf(tokenId), symbol(), totalSupply()
simplified_abi = [
{
'inputs': [{'internalType': 'address', 'name': 'owner', 'type': 'address'}],
'name': 'balanceOf',
'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}],
'payable': False, 'stateMutability': 'view', 'type': 'function', 'constant': True
},
{
'inputs': [],
'name': 'name',
'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}],
'stateMutability': 'view', 'type': 'function', 'constant': True
},
{
'inputs': [{'internalType': 'uint256', 'name': 'tokenId', 'type': 'uint256'}],
'name': 'ownerOf',
'outputs': [{'internalType': 'address', 'name': '', 'type': 'address'}],
'payable': False, 'stateMutability': 'view', 'type': 'function', 'constant': True
},
{
'inputs': [],
'name': 'symbol',
'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}],
'stateMutability': 'view', 'type': 'function', 'constant': True
},
{
'inputs': [],
'name': 'totalSupply',
'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}],
'stateMutability': 'view', 'type': 'function', 'constant': True
},
]
6ck_extra_abi = [
{
'inputs': [],
'name': 'pregnantKitties',
'outputs': [{'name': '', 'type': 'uint256'}],
'payable': False, 'stateMutability': 'view', 'type': 'function', 'constant': True
},
{
'inputs': [{'name': '_kittyId', 'type': 'uint256'}],
'name': 'isPregnant',
'outputs': [{'name': '', 'type': 'bool'}],
'payable': False, 'stateMutability': 'view', 'type': 'function', 'constant': True
}
]
ck_contract = w3.eth.contract(address=w3.toChecksumAddress(ck_token_addr), abi=simplified_abi+ck_extra_abi)
name = ck_contract.functions.name().call()
symbol = ck_contract.functions.symbol().call()
kitties_auctions = ck_contract.functions.balanceOf(acc_address).call()
print(f"{name} [{symbol}] NFTs in Auctions: {kitties_auctions}")
pregnant_kitties = ck_contract.functions.pregnantKitties().call()
print(f"{name} [{symbol}] NFTs Pregnants: {pregnant_kitties}")
# Using the Transfer Event ABI to get info about transferred Kitties.
tx_event_abi = {
'anonymous': False,
'inputs': [
{'indexed': False, 'name': 'from', 'type': 'address'},
{'indexed': False, 'name': 'to', 'type': 'address'},
{'indexed': False, 'name': 'tokenId', 'type': 'uint256'}],
'name': 'Transfer',
'type': 'event'
}
# We need the event's signature to filter the logs
event_signature = w3.sha3(text="Transfer(address,address,uint256)").hex()
logs = w3.eth.getLogs({
"fromBlock": w3.eth.blockNumber - 120,
"address": w3.toChecksumAddress(ck_token_addr),
"topics": [event_signature]
})
# Notes:
# - 120 blocks is the max range for CloudFlare Provider
# - If you didn't find any Transfer event you can also try to get a tokenId at:
# https://etherscan.io/address/0x06012c8cf97BEaD5deAe237070F9587f8E7A266d#events
# Click to expand the event's logs and copy its "tokenId" argument
recent_tx = [get_event_data(w3.codec, tx_event_abi, log)["args"] for log in logs]
kitty_id = recent_tx[0]['tokenId'] # Paste the "tokenId" here from the link above
is_pregnant = ck_contract.functions.isPregnant(kitty_id).call()
print(f"{name} [{symbol}] NFTs {kitty_id} is pregnant: {is_pregnant}")
Gas fee¶
Gas price suggestions based on txpool 3 levels: slow, medium, fast;
curl https://tc. www.acuteangle.com//price/prediction
{
"code": 0,
"prices": {
"fast": 29,
"median": 1,
"low": 1
}
}
Txpool¶
To expedite pending transactions.
1)Inadequate nonce:¶
Try to reset to an appropriate value
If there are multiple pending transactions, please wait for earlier transactions to confirm first.
Metatask–setting-advanced–reset account
Metatask–setting–advanced–Customize transaction nonce: resend transaction with pending tx’s nonce and higher gas price.
2)Low gas fee:¶
Set to a higher gas fee and resend
Common Issues¶
Delay on Metamask¶
Slow response when inputting transfer amount, fetching gas price, etc. It is a chrome’s known issue according to the following issue:https://github.com/MetaMask/metamask-extension/issues/10202 To resolve this issue: 1)Use Expand view 2)Move the window to primary monitor if using multiple monitors 3)Use other explorers