Seele Doc
Search…
Configurate

Configuration

Brief

  • compiler [TODO] choose which compiler to use
  • transactions object of constructors arranged by contract file name
    • limit mainchain transaction limit
    • depth how many blocks to wait for to count transactions as complete in mainchain
    • privateKey default privatekey to use for all transactions with mainchain
    • fromAddress default address to use for all transactions with mainchain
  • subchain subchain configs:
    • limit subchain transaction limit
    • depth how many blocks to wait for to count transactions as complete in subchain
    • node http-address to use for subchain
  • shard object of http-address of mainchain arranged by shard
    • 1 http-address to use for shard 1 of mainchain
    • 2 http-address to use for shard 2 of mainchain
    • 3 http-address to use for shard 3 of mainchain
    • 4 http-address to use for shard 4 of mainchain
  • constructors
    • "StemRootchain.sol" The constructor for subchain contract
  • addressBook object of contract-address arranged by contract file name
    • "StemRootchain.sol" The subchain address

More

constructors

The "StemRootchain.sol" field in constructors is matched to an array:
  • [0] abi array
  • [1] value array
  • [2] transaction amount when deploy
This is exactly as what seele-cotnract-core requires. Refer to the example in appendix.
  • _subchainName, (bytes32): strings hashed into
  • _genesisInfo, (bytes32[]):
    • filled by anc fill option
  • _staticNodes, (bytes32[]):
  • _creatorDeposit, (uint256):
  • _ops, (address[]):
    • [0] mintAccount (refer to StemCreation.sol)
    • [1] meltAccount (refer to StemCreation.sol)
  • _opsDeposits, (uint256[]):
    • [0]: 0
    • [1]: 0
  • _refundAccounts, (address[]):
    • [0]: "0x0000000000000000000000000000000000000000"
    • [1]: "0x0000000000000000000000000000000000000000"

addressBook

Delete the "StemRootchain.sol" field in addressBook and re-run anc make -d to re-deploy the StemRootchain.sol contract which essentially reuses the other addresses and updates the contract you're now focused on. The "StemRootchain.sol" field will contain the contract-address that all anc action assumes.
Similarly, to change more parameters like challenge period and relay periods, you would change them in the StemRootchain.sol file in your subchain project's ./src directory, then you can delete the "StemCreation.sol" field along with "StemRootchain.sol" field to re-deploy your subchain.

genesis

"rootaccounts": "validators": equal to the constructors

Appendix

1
"StemRootchain.sol": [
2
[
3
{
4
"name": "_subchainName",
5
"type": "bytes32"
6
},
7
{
8
"name": "_genesisInfo",
9
"type": "bytes32[]"
10
},
11
{
12
"name": "_staticNodes",
13
"type": "bytes32[]"
14
},
15
{
16
"name": "_creatorDeposit",
17
"type": "uint256"
18
},
19
{
20
"name": "_ops",
21
"type": "address[]"
22
},
23
{
24
"name": "_opsDeposits",
25
"type": "uint256[]"
26
},
27
{
28
"name": "_refundAccounts",
29
"type": "address[]"
30
}
31
],
32
[
33
"0x416e6e6965",
34
[
35
],
36
[
37
"0x1071052039"
38
],
39
"1",
40
[
41
"0x0adB61076AF511b8bAdb1264477ba4Be3D302D86",
42
"0xfb96c3011d73fecB3F75FFAAac8F02cf83D59298",
43
"0xca35b7d915458ef540ade6068dfe2f44e8fa733c",
44
"0x627306090abab3a6e1400e9345bc60c78a8bef57",
45
"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db",
46
"0x583031d1113ad414f02576bd6afabfb302140225"
47
],
48
[
49
"0",
50
"0",
51
"100",
52
"100",
53
"100",
54
"100"
55
],
56
[
57
"0x0000000000000000000000000000000000000000",
58
"0x0000000000000000000000000000000000000000",
59
"0x3f78b08f45730f59a15319af41ba5a750021c541",
60
"0x3f78b08f45730f59a15319af41ba5a750021c541",
61
"0x3f78b08f45730f59a15319af41ba5a750021c541",
62
"0x3f78b08f45730f59a15319af41ba5a750021c541"
63
]
64
],
65
10000
66
]
Copied!
Last modified 2yr ago