Commit e876826f authored by Hamdi Allam's avatar Hamdi Allam

fix etl test

parent f2fec932
......@@ -157,7 +157,7 @@ func LoadConfig(log log.Logger, path string) (Config, error) {
}
if conf.Chain.Preset != 0 {
preset, ok := presetConfigs[conf.Chain.Preset]
preset, ok := Presets[conf.Chain.Preset]
if !ok {
return conf, fmt.Errorf("unknown preset: %d", conf.Chain.Preset)
}
......
......@@ -12,9 +12,9 @@ type Preset struct {
// In the future, presets can just be onchain config and fetched on initialization
// Mapping of L2 chain ids to their preset chain configurations
var presetConfigs = map[int]Preset{
var Presets = map[int]Preset{
10: {
Name: "Optimism Mainnet",
Name: "Optimism",
ChainConfig: ChainConfig{
L1Contracts: L1Contracts{
AddressManager: common.HexToAddress("0xdE1FCfB0851916CA5101820A69b13a4E276bd81F"),
......@@ -79,7 +79,7 @@ var presetConfigs = map[int]Preset{
L1StartingHeight: 8410981,
},
},
7777777: { // Zora mainnet
7777777: {
Name: "Zora",
ChainConfig: ChainConfig{
L1Contracts: L1Contracts{
......
......@@ -51,10 +51,12 @@ func TestL1ETLConstruction(t *testing.T) {
client.On("GethEthClient").Return(nil)
return &testSuite{
db: db,
client: client,
start: testStart,
contracts: config.L1Contracts{},
db: db,
client: client,
start: testStart,
// utilize sample l1 contract configuration (optimism)
contracts: config.Presets[10].ChainConfig.L1Contracts,
}
},
assertion: func(etl *L1ETL, err error) {
......
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