From 8597b16980006b2fbe51cf4f3c4e1da114b6b402 Mon Sep 17 00:00:00 2001 From: egonspace Date: Fri, 16 Aug 2024 14:49:07 +0900 Subject: [PATCH] fix: not load NCPExit contract --- wemix/bind/structs.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wemix/bind/structs.go b/wemix/bind/structs.go index 6b96eb697580..8a5039457007 100644 --- a/wemix/bind/structs.go +++ b/wemix/bind/structs.go @@ -36,8 +36,8 @@ type GovContracts struct { BallotStorageImp *BallotStorageImp EnvStorage *EnvStorage EnvStorageImp *EnvStorageImp - NCPExit *NCPExit - NCPExitImp *NCPExitImp + NCPExit *NCPExit // not used; only used for deploying gov contracts + NCPExitImp *NCPExitImp // not used; only used for deploying gov contracts address struct { Registry common.Address Gov common.Address @@ -76,9 +76,8 @@ func NewGovContracts(backend bind.ContractBackend, registry common.Address) (*Go return nil, errors.Wrap(err, DOMAIN_BallotStorage) } else if gov.address.EnvStorage, gov.EnvStorage, gov.EnvStorageImp, err = newUUPSContracts(cfg, DOMAIN_EnvStorage, NewEnvStorage, NewEnvStorageImp); err != nil { return nil, errors.Wrap(err, DOMAIN_EnvStorage) - } else if gov.address.NCPExit, gov.NCPExit, gov.NCPExitImp, err = newUUPSContracts(cfg, DOMAIN_NCPExit, NewNCPExit, NewNCPExitImp); err != nil { - return nil, errors.Wrap(err, DOMAIN_NCPExit) } else { + // NCPExit and NCPExitImp are not loaded. It can be nil at the block that is gov contracts were deployed in return gov, nil } }