Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Hardfork m11 Chain Spec (#368)
Browse files Browse the repository at this point in the history
This patch adds the new chainspec for the m11 hard-fork. This should have the correct values for the new chain, but we should double-check the values.
  • Loading branch information
hayesgm authored Jun 14, 2021
1 parent 0c660ff commit 0d8b3f4
Show file tree
Hide file tree
Showing 4 changed files with 902 additions and 126 deletions.
16 changes: 15 additions & 1 deletion chains/build_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,19 @@ async function setStarports(chainSpec, chainConfig, opts) {

// TODO: Enable use case for new chain with starports in genesis.
// We are missing deployment block info in (eth) deployment info currently.
chainSpec.genesis.runtime.palletCash.starports = [starportAddress];
chainSpec.genesis.runtime.palletCash.starports = [`ETH:${starportAddress}`];
}

async function setGenesisConfig(chainSpec, chainConfig, opts) {
let ethGenesisBlock = chainConfig.eth_genesis_block;

chainSpec.genesis.runtime.palletCash.genesisBlocks = [{
Eth: {
number: ethGenesisBlock.number,
hash: ethGenesisBlock.hash.slice(2),
parent_hash: ethGenesisBlock.parent_hash.slice(2),
}
}];
}

async function setInitialYield(chainSpec, chainConfig, opts) {
Expand Down Expand Up @@ -203,6 +215,8 @@ async function buildSpec(opts) {
await setAssetInfo(chainSpec, chainConfig, opts);
await setReporters(chainSpec, chainConfig, opts);
await setInitialYield(chainSpec, chainConfig, opts);
await setStarports(chainSpec, chainConfig, opts);
await setGenesisConfig(chainSpec, chainConfig, opts);

await writeFile(chain, 'chain-spec.json', JSON.stringify(chainSpec, null, 2));

Expand Down
263 changes: 186 additions & 77 deletions chains/testnet/chain-config.json
Original file line number Diff line number Diff line change
@@ -1,80 +1,189 @@
{
"eth_network": "ropsten",
"base_chain": "testnet",
"websocket": "wss://alice.compound.cash",
"rpc": "https://brr-rpc.compound.cash",
"validators": [
{
"substrate_id": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"eth_address": "0x55413a2d4908d130c908ccf2f298b235bacd427a",
"session_keys": {
"aura": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"grandpa": "5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu"
}
}
],
"reporters": [
"0xfceadafab14d46e20144f48824d0c09b1a03f2bc"
],
"rate_models": {
"Kink_500_2000": {
"Kink": {
"zero_rate": 0,
"kink_rate": 500,
"kink_utilization": 8000,
"full_rate": 2000
}
}
},
"tokens": {
"ZRX": {
"liquidity_factor": 0.5,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"WBTC": {
"ticker": "BTC",
"liquidity_factor": 0.6,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"USDT": {
"ticker": "USD",
"liquidity_factor": 0.7,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"USDC": {
"ticker": "USD",
"liquidity_factor": 0.8,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"DAI": {
"ticker": "DAI",
"liquidity_factor": 0.7,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"BAT": {
"liquidity_factor": 0.6,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"COMP": {
"liquidity_factor": 0.8,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"UNI": {
"liquidity_factor": 0.8,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"ETH": {
"liquidity_factor": 0.8,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
}
"eth_network": "ropsten",
"base_chain": "testnet",
"websocket": "wss://alice.compound.cash",
"rpc": "https://brr-rpc.compound.cash",
"validators": [
{
"substrate_id": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"eth_address": "0x55413a2d4908d130c908ccf2f298b235bacd427a",
"session_keys": {
"aura": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"grandpa": "5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu"
}
},
{
"substrate_id": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
"eth_address": "0xc9B0C3ed4EFA833a7aD5459755a18F9689A0F7aC",
"session_keys": {
"aura": "5Fs76ZYwqmLGev6RUQ4DZUPY7FGc54p6JGtzgp155VGRp7a4",
"grandpa": "5Gb4DLP69jihqxmC4bjPeo7mp3i94mK2Gq29zSTJnPTLRXfS"
}
},
{
"substrate_id": "5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL",
"eth_address": "0x286f2A10c28C966E97a72B8246041FBf636e673e",
"session_keys": {
"aura": "5FpwruP6MCTubcsU1r2CQ27LFDuav28BCtoBKPaJ2wQeCgfp",
"grandpa": "5CRCZ2WYM4c3Tyx7ehoQP3JGJdzjtMsvesp7thJ6N2X4772G"
}
},
{
"substrate_id": "5HMqNs9offzpiebeuzHVwKcJRid1L44KgEKF7jwpYYFM25kY",
"eth_address": "0x4515e1ce5d4C42dA4b0561f52EF12DeE19F9C020",
"session_keys": {
"aura": "5FbRt1pZ2iZV6zB2jPYJbL9A2UjzMLYxT6RsG1Nkj9BJ9aCd",
"grandpa": "5FmZvc7u5uDQBGnuTnRswqS1zrwNB4V6aLnmMbH3ir4Wup17"
}
},
{
"substrate_id": "5DPBrGh51p86PTchMQh6eoxJ8UxEV1JKPH3J1oZBw344iV5B",
"eth_address": "0xAE7504DC36074395485867502aC893C8059B33Aa",
"session_keys": {
"aura": "5ENZpQpdo56HQz3HExorwJmqVcpxJubWY5fLKts1yLrNACRh",
"grandpa": "5E28anh4XiXDdgg7DZ5Wpabcr59H4RVMLqyLkFfe4HWfHpVN"
}
},
{
"substrate_id": "5CrX4SQW2u7NGs7VfGSGtHTZNnL54Mbue5nqX6UmWGNVL8va",
"eth_address": "0xE728a81d17388EC581B64996c687a0F7b98c761b",
"session_keys": {
"aura": "5DLkjvjkcUfTAsfVeg7bPxZBVBf6pCL1G691bgb6uJ1WuDn8",
"grandpa": "5GYyAsBUpS9W9kUp8vPvU4Wp8w5EwewBZsP1cQhBpb7uBLbU"
}
},
{
"substrate_id": "5HETcZQ7NTKLsRzPSW5NVMvYWP4KBJ7T3QKQgEy5mD9izz4Q",
"eth_address": "0x24f7fa621501bd05972cb64Ba8A789cD866D406A",
"session_keys": {
"aura": "5Hbu1nFDJCyawmHQtJ9MrrdT2gobSELHVxV4zo8iiTRCMUzN",
"grandpa": "5EjZPGMXZmqTs8MAKRQMA3zhU3cDVDpMvtpn6HDhgBvb8jHt"
}
},
{
"substrate_id": "5HGR9gLpQnzQGRuEi5cuFPax4eG2cgDGauGXUEV6TnntySQK",
"eth_address": "0xcD61496F004EF9fe14C7DAC14e4Ca9055FD60Ae0",
"session_keys": {
"aura": "5EqxYcT5s2qBLA8CLv2MP77M65ssEmpMvZM7SMcw5kArxcmY",
"grandpa": "5EoY1zcpvr2TSHJK8rd1E7Wp8FXyG3HannhWBZjFE2PJ5XgP"
}
},
{
"substrate_id": "5DaA2RMMqNEUjadFZwd83aW4gLGVxQUzyHNY4Tt6YHpktx4K",
"eth_address": "0x4b59cfe2Ac72096daBbef40B944aCf5ea2df95cb",
"session_keys": {
"aura": "5EEmXKWei8FbQbXUurpEUpQujPzAowyowea1yLVWFMHQuPRt",
"grandpa": "5GdMRFLJkHxLJm7kwmpPhDNDWrDWuEryHY91NEL8dm4xcey5"
}
},
{
"substrate_id": "5DtdLXuQG6e2b6oUzFErfHhjEcoivckDsjtR8bYp1LY6GFEi",
"eth_address": "0x6DF6143de1523Ca35FC8a3DC5Eb40Ec8DEFD2B6e",
"session_keys": {
"aura": "5FReZgJxqwsFB3TCdGaL2LJJN8YGTqVSqsJ9kMeUJSAtnc6S",
"grandpa": "5GWGBmFjs933p9aJcMRxxKjpLEFW5eL52D5Bhx8GjUPCAk7z"
}
},
{
"substrate_id": "5GjUBLqc2WKrDyytidWo6FCbe6kHjqEGBqbHvFR8yrJ1eKFG",
"eth_address": "0x6a61Dc52015945dfC6cD0c42F94A722d5022e3D1",
"session_keys": {
"aura": "5CVB7b5i2rbRmovQcptfittTtrGhQbAVJTc9msJ1xYjZW4YA",
"grandpa": "5ER2WP6kPnmfMVF22f2LQAG88YNGYDZfxtT7UeTm5PEi7jkH"
}
},
{
"substrate_id": "5CnmwrZ47Ln5gGcuu17PRNYZSe3bjHjsUmtDR5VSRXhPaaVf",
"eth_address": "0x814a5aE81F216eb0b8a5Cd22bEFa6F7b94a3Cdf5",
"session_keys": {
"aura": "5HorNjXVJSuh2rUFY1AAHCshCdyfKHixdYTRcdhNFpLuZz6W",
"grandpa": "5DAti1uvQDc6vFf1R4ttXuEFToEKrp9G5pg1w5xXtWmQXQkg"
}
},
{
"substrate_id": "5GrrysmdixVdDGB91HRGMGJJg5hhrpL9CthrJyx7wZY41EiX",
"eth_address": "0xD4a1Ea81cED859316d9331cFeE3236412BFcc8da",
"session_keys": {
"aura": "5DqHX3gMPrkFRz5GMeikhDLJhK3bQcGGgs2TfEQTJP6yhsZZ",
"grandpa": "5Gft4emFFsartppPxgvgDB3i3yEicLfGTnLfYM1rXJwpNEa8"
}
},
{
"substrate_id": "5FABH7DzNNQnFaTiyUFPUfyoTPAYnacmNmC44YPRSnmNgS7e",
"eth_address": "0xfC6adE37C0704450E9FB9A8b94f5832C2975eda8",
"session_keys": {
"aura": "5GsnFXpy9SKEYoCQ7jGWT5wGZHZ8LxLvMvPemJjm3MC6Zr1D",
"grandpa": "5HTGf42P5v6KV89RthpcJSfVwkUmKSD1miswfTxXS5N8p8Go"
}
}
],
"reporters": [
"0xfceadafab14d46e20144f48824d0c09b1a03f2bc"
],
"rate_models": {
"Kink_500_2000": {
"Kink": {
"zero_rate": 0,
"kink_rate": 500,
"kink_utilization": 8000,
"full_rate": 2000
}
}
},
"tokens": {
"ZRX": {
"liquidity_factor": 0.5,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"WBTC": {
"ticker": "BTC",
"liquidity_factor": 0.6,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"USDT": {
"ticker": "USD",
"liquidity_factor": 0.7,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"USDC": {
"ticker": "USD",
"liquidity_factor": 0.8,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"DAI": {
"ticker": "DAI",
"liquidity_factor": 0.7,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"BAT": {
"liquidity_factor": 0.6,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"COMP": {
"liquidity_factor": 0.8,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"UNI": {
"liquidity_factor": 0.8,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
},
"ETH": {
"liquidity_factor": 0.8,
"rate_model": "Kink_500_2000",
"miner_shares": 0.01
}
},
"eth_genesis_block": {
"number": 10438096,
"hash": "0xc7ffc663cb1ec1637e51bb70e0e28b984f52d426ce58aba4399dd941b9340a0b",
"parent_hash": "0x12bb21f4c924e9a05623493063f4e67a383039630ca0e26a6fa0c8a9c7bed171"
}
}
Loading

0 comments on commit 0d8b3f4

Please sign in to comment.