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

feat(bindings): update Go contracts bindings #543

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bindings/.githead
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5fa1331f8a03c3bd3769f273faf7c80339368054
c12e2d75fff02dcd1b0f1edaa1781a30a1d4b4e1
2 changes: 1 addition & 1 deletion bindings/gen_assignment_hook.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bindings/gen_guardian_prover.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bindings/gen_taiko_l1.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bindings/gen_taiko_l2.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bindings/gen_taiko_token.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions integration_test/l1_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export SECURITY_COUNCIL=0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f
export TAIKO_TOKEN_PREMINT_RECIPIENT=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
export TAIKO_TOKEN_NAME="Taiko Token Test"
export TAIKO_TOKEN_SYMBOL="TTKOt"
export OPTIMISTIC_TIER_PROVIDER="true"

export SHARED_ADDRESS_MANAGER=0x0000000000000000000000000000000000000000
export PROPOSER=0x0000000000000000000000000000000000000000
Expand Down
54 changes: 0 additions & 54 deletions internal/testutils/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ func (s *ClientTestSuite) SetupTest() {
s.Nil(err)

if balance.Cmp(common.Big0) == 0 {
// Do not verify zk && sgx proofs in tests.
securityConcilPrivKey, err := crypto.ToECDSA(common.FromHex(os.Getenv("L1_SECURITY_COUNCIL_PRIVATE_KEY")))
s.Nil(err)
s.setAddress(securityConcilPrivKey, rpc.StringToBytes32("tier_sgx_and_pse_zkevm"), common.Address{})
s.setAddress(securityConcilPrivKey, rpc.StringToBytes32("tier_sgx"), common.Address{})

ownerPrivKey, err := crypto.ToECDSA(common.FromHex(os.Getenv("L1_CONTRACT_OWNER_PRIVATE_KEY")))
s.Nil(err)

Expand Down Expand Up @@ -131,54 +125,6 @@ func (s *ClientTestSuite) setAllowance(key *ecdsa.PrivateKey) {
s.Nil(err)
}

func (s *ClientTestSuite) setAddress(ownerPrivKey *ecdsa.PrivateKey, name [32]byte, address common.Address) {
var (
salt = RandomHash()
)

controller, err := bindings.NewTaikoTimelockController(
common.HexToAddress(os.Getenv("TIMELOCK_CONTROLLER")),
s.RPCClient.L1,
)
s.Nil(err)

opts, err := bind.NewKeyedTransactorWithChainID(ownerPrivKey, s.RPCClient.L1ChainID)
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(
opts,
common.HexToAddress(os.Getenv("ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS")),
common.Big0,
data,
[32]byte{},
salt,
common.Big0,
)
s.Nil(err)

_, err = rpc.WaitReceipt(context.Background(), s.RPCClient.L1, tx)
s.Nil(err)

tx, err = controller.Execute(
opts,
common.HexToAddress(os.Getenv("ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS")),
common.Big0,
data,
[32]byte{},
salt,
)
s.Nil(err)

_, err = rpc.WaitReceipt(context.Background(), s.RPCClient.L1, tx)
s.Nil(err)
}

func (s *ClientTestSuite) TearDownTest() {
var revertRes bool
s.Nil(s.RPCClient.L1.CallContext(context.Background(), &revertRes, "evm_revert", s.testnetL1SnapshotID))
Expand Down
Loading