MCPcopy Create free account
hub / github.com/circlefin/arc-node / insert

Function insert

scripts/genesis/genesis.ts:162–167  ·  view source on GitHub ↗
([account, alloc]: [string, GenesisAccountAlloc])

Source from the content-addressed store, hash-verified

160
161 const allocs: Record<Address, GenesisAccountAlloc> = {}
162 const insert = ([account, alloc]: [string, GenesisAccountAlloc]) => {
163 if (account in allocs) {
164 throw new Error(`Duplicate account: ${account}`)
165 }
166 allocs[schemaAddress.parse(account)] = alloc
167 }
168
169 Object.entries(await buildNativeFiatTokenGenesisAllocs(ctx, nativeFiatToken)).forEach(insert)
170 Object.entries(await buildProtocolConfigGenesisAllocs(ctx, protocolConfig)).forEach(insert)

Callers 1

buildGenesisFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected