Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
feat: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Nov 29, 2023
1 parent 2e31257 commit b1ebb21
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions testutils/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b1ebb21

Please sign in to comment.