From b1ebb21bbff3ffec5b2a60fe0872799d01be3b20 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 29 Nov 2023 21:20:50 +0800 Subject: [PATCH] feat: update tests --- testutils/suite.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/testutils/suite.go b/testutils/suite.go index 7d9e6abf0..bca81f0fd 100644 --- a/testutils/suite.go +++ b/testutils/suite.go @@ -153,29 +153,13 @@ func (s *ClientTestSuite) setAddress(ownerPrivKey *ecdsa.PrivateKey, name [32]by opts, err := bind.NewKeyedTransactorWithChainID(ownerPrivKey, s.RpcClient.L1ChainID) s.Nil(err) - proposerRole, err := controller.PROPOSERROLE(nil) - s.Nil(err) - - executorRole, err := controller.EXECUTORROLE(nil) - s.Nil(err) - - tx, err := controller.GrantRole(opts, proposerRole, crypto.PubkeyToAddress(ownerPrivKey.PublicKey)) - s.Nil(err) - _, err = rpc.WaitReceipt(context.Background(), s.RpcClient.L1, tx) - s.Nil(err) - - tx, err = controller.GrantRole(opts, executorRole, crypto.PubkeyToAddress(ownerPrivKey.PublicKey)) - s.Nil(err) - _, err = rpc.WaitReceipt(context.Background(), s.RpcClient.L1, tx) - s.Nil(err) - addressManagerABI, err := bindings.AddressManagerMetaData.GetAbi() s.Nil(err) data, err := addressManagerABI.Pack("setAddress", s.RpcClient.L1ChainID.Uint64(), name, address) s.Nil(err) - tx, err = controller.Schedule( + tx, err := controller.Schedule( opts, common.HexToAddress(os.Getenv("ADDRESS_MANAGER_CONTRACT_ADDRESS")), common.Big0,