Commit f5115e27 authored by Kelvin Fichter's avatar Kelvin Fichter

fix: genesis output format

parent 6c69d92e
...@@ -158,7 +158,8 @@ export const loadSurgeryData = async ( ...@@ -158,7 +158,8 @@ export const loadSurgeryData = async (
return { return {
configs, configs,
dump, dump,
genesis: genesisDump, genesis,
genesisDump,
pools, pools,
poolHashCache, poolHashCache,
etherscanDump, etherscanDump,
......
...@@ -50,7 +50,7 @@ export const handlers: { ...@@ -50,7 +50,7 @@ export const handlers: {
return account return account
}, },
[AccountType.PREDEPLOY_WIPE]: (account, data) => { [AccountType.PREDEPLOY_WIPE]: (account, data) => {
const genesisAccount = findAccount(data.genesis, account.address) const genesisAccount = findAccount(data.genesisDump, account.address)
return { return {
...account, ...account,
code: genesisAccount.code, code: genesisAccount.code,
...@@ -58,7 +58,7 @@ export const handlers: { ...@@ -58,7 +58,7 @@ export const handlers: {
} }
}, },
[AccountType.PREDEPLOY_NO_WIPE]: (account, data) => { [AccountType.PREDEPLOY_NO_WIPE]: (account, data) => {
const genesisAccount = findAccount(data.genesis, account.address) const genesisAccount = findAccount(data.genesisDump, account.address)
return { return {
...account, ...account,
code: genesisAccount.code, code: genesisAccount.code,
......
...@@ -17,7 +17,7 @@ const doGenesisSurgery = async ( ...@@ -17,7 +17,7 @@ const doGenesisSurgery = async (
const input = data.dump.slice(data.configs.startIndex, data.configs.endIndex) const input = data.dump.slice(data.configs.startIndex, data.configs.endIndex)
// Insert any accounts in the genesis that aren't already in the state dump. // Insert any accounts in the genesis that aren't already in the state dump.
for (const account of data.genesis) { for (const account of data.genesisDump) {
if (findAccount(input, account.address) === undefined) { if (findAccount(input, account.address) === undefined) {
input.push(account) input.push(account)
} }
......
...@@ -91,7 +91,8 @@ export type SupportedNetworks = 'mainnet' | 'kovan' ...@@ -91,7 +91,8 @@ export type SupportedNetworks = 'mainnet' | 'kovan'
export interface SurgeryDataSources { export interface SurgeryDataSources {
configs: SurgeryConfigs configs: SurgeryConfigs
dump: StateDump dump: StateDump
genesis: StateDump genesis: GenesisFile
genesisDump: StateDump
pools: UniswapPoolData[] pools: UniswapPoolData[]
poolHashCache: PoolHashCache poolHashCache: PoolHashCache
etherscanDump: EtherscanContract[] etherscanDump: EtherscanContract[]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment