Skip to content

Commit

Permalink
chore: update multisig / bridge ABIs
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Letang <[email protected]>
  • Loading branch information
jeremyletang committed Aug 14, 2024
1 parent f462324 commit 81597c6
Show file tree
Hide file tree
Showing 7 changed files with 1,234 additions and 569 deletions.
4 changes: 2 additions & 2 deletions core/bridges/erc20_asset_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (e ERC20AssetPool) SetBridgeAddress(

newAddressEth := ethcmn.HexToAddress(newAddress)
buf, err := args.Pack([]interface{}{
newAddressEth, nonce.BigInt(), "set_bridge_address",
newAddressEth, nonce.BigInt(), "setBridgeAddress",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down Expand Up @@ -122,7 +122,7 @@ func (e ERC20AssetPool) SetMultiSigControl(

newAddressEth := ethcmn.HexToAddress(newAddress)
buf, err := args.Pack([]interface{}{
newAddressEth, nonce.BigInt(), "set_multisig_control",
newAddressEth, nonce.BigInt(), "setMultisigControl",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down
20 changes: 10 additions & 10 deletions core/bridges/erc20_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (e ERC20Logic) ListAsset(
lifetimeLimit.BigInt(),
withdrawThreshold.BigInt(),
nonce.BigInt(),
"list_asset",
"listAsset",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down Expand Up @@ -182,7 +182,7 @@ func (e ERC20Logic) buildListAssetMessage(
lifetimeLimit.BigInt(),
withdrawThreshold.BigInt(),
nonce.BigInt(),
"list_asset",
"listAsset",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down Expand Up @@ -266,7 +266,7 @@ func (e ERC20Logic) RemoveAsset(

tokenAddressEth := ethcmn.HexToAddress(tokenAddress)
buf, err := args.Pack([]interface{}{
tokenAddressEth, nonce.BigInt(), "remove_asset",
tokenAddressEth, nonce.BigInt(), "removeAsset",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down Expand Up @@ -354,7 +354,7 @@ func (e ERC20Logic) buildWithdrawAssetMessage(
hexEthPartyAddress,
timestamp,
nonce.BigInt(),
"withdraw_asset",
"withdrawAsset",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down Expand Up @@ -447,7 +447,7 @@ func (e ERC20Logic) SetAssetLimits(
lifetimeLimit.BigInt(),
withdrawThreshold.BigInt(),
nonce.BigInt(),
"set_asset_limits",
"setAssetLimits",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down Expand Up @@ -509,7 +509,7 @@ func (e ERC20Logic) buildSetAssetLimitsMessage(
lifetimeLimit.BigInt(),
withdrawThreshold.BigInt(),
nonce.BigInt(),
"set_asset_limits",
"setAssetLimits",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down Expand Up @@ -604,7 +604,7 @@ func (e ERC20Logic) buildWithdrawDelayMessage(
buf, err := args.Pack([]interface{}{
delayBig,
nonce.BigInt(),
"set_withdraw_delay",
"setWithdrawDelay",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down Expand Up @@ -671,7 +671,7 @@ func (e ERC20Logic) GlobalStop(

buf, err := args.Pack([]interface{}{
nonce.BigInt(),
"global_stop",
"globalStop",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down Expand Up @@ -710,7 +710,7 @@ func (e ERC20Logic) GlobalResume(

buf, err := args.Pack([]interface{}{
nonce.BigInt(),
"global_resume",
"globalResume",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down Expand Up @@ -750,7 +750,7 @@ func (e ERC20Logic) VerifyGlobalResume(

buf, err := args.Pack([]interface{}{
nonce.BigInt(),
"global_resume",
"globalResume",
}...)
if err != nil {
return nil, fmt.Errorf("couldn't pack abi message: %w", err)
Expand Down
10 changes: 5 additions & 5 deletions core/bridges/erc20_multisigcontrol.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (e *ERC20MultiSigControl) BurnNonce(
},
})

buf, err := args.Pack([]interface{}{nonce.BigInt(), "burn_nonce"}...)
buf, err := args.Pack([]interface{}{nonce.BigInt(), "burnNonce"}...)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -93,7 +93,7 @@ func (e *ERC20MultiSigControl) SetThreshold(

args := abi.Arguments([]abi.Argument{
{
Name: "new_threshold",
Name: "newThreshold",
Type: typU16,
},
{
Expand All @@ -106,7 +106,7 @@ func (e *ERC20MultiSigControl) SetThreshold(
},
})

buf, err := args.Pack([]interface{}{newThreshold, nonce.BigInt(), "set_threshold"}...)
buf, err := args.Pack([]interface{}{newThreshold, nonce.BigInt(), "setThreshold"}...)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -151,7 +151,7 @@ func (e *ERC20MultiSigControl) AddSigner(
})

newSignerAddr := ethcmn.HexToAddress(newSigner)
buf, err := args.Pack([]interface{}{newSignerAddr, nonce.BigInt(), "add_signer"}...)
buf, err := args.Pack([]interface{}{newSignerAddr, nonce.BigInt(), "addSigner"}...)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -197,7 +197,7 @@ func (e *ERC20MultiSigControl) RemoveSigner(
})

oldSignerAddr := ethcmn.HexToAddress(oldSigner)
buf, err := args.Pack([]interface{}{oldSignerAddr, nonce.BigInt(), "remove_signer"}...)
buf, err := args.Pack([]interface{}{oldSignerAddr, nonce.BigInt(), "removeSigner"}...)
if err != nil {
return nil, err
}
Expand Down
Loading

0 comments on commit 81597c6

Please sign in to comment.