diff --git a/.script/compileSC.sh b/.script/compileSC.sh index 64e6985c..e7cf0076 100644 --- a/.script/compileSC.sh +++ b/.script/compileSC.sh @@ -1,7 +1,7 @@ #!/bin/bash -solc --abi --bin contracts/LiquidStaking.sol -o build -abigen --bin ./build/LiquidStaking.bin --abi ./build/LiquidStaking.abi --pkg=liquidStaking --out=liquidStaking.go +solc --abi --bin contracts/LiquidStakingV2.sol -o build +abigen --bin ./build/LiquidStakingV2.bin --abi ./build/LiquidStakingV2.abi --pkg=liquidStaking --out=liquidStaking.go -solc --abi --bin contracts/TokenWrapper.sol -o build --overwrite -abigen --bin ./build/TokenWrapper.bin --abi ./build/TokenWrapper.abi --pkg=tokenWrapper --out=TokenWrapper.go +solc --abi --bin contracts/TokenWrapperV2.sol -o build --overwrite +abigen --bin ./build/TokenWrapperV2.bin --abi ./build/TokenWrapperV2.abi --pkg=tokenWrapper --out=TokenWrapper.go diff --git a/application/constants/ethereum.go b/application/constants/ethereum.go index 7c3da22f..a3b454e5 100644 --- a/application/constants/ethereum.go +++ b/application/constants/ethereum.go @@ -1,12 +1,12 @@ package constants const ( - LiquidStakingABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"stakeFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unstakeFee\",\"type\":\"uint256\"}],\"name\":\"SetFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minUnstake\",\"type\":\"uint256\"}],\"name\":\"SetMinimumValues\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"name\":\"SetSTokensContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"name\":\"SetUTokensContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unstakeEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unstakeEpochPrevious\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"epochInterval\",\"type\":\"uint256\"}],\"name\":\"SetUnstakeEpoch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unstakingLockTime\",\"type\":\"uint256\"}],\"name\":\"SetUnstakingLockTime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"StakeTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"UnstakeTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"WithdrawUnstakeTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakeUnstakeProps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minUnstake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochInterval\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeEpochPrevious\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakingLockTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"getTotalUnbondedTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unbondingTokens\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"getTotalUnbondingTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unbondingTokens\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_unstakeTimestamp\",\"type\":\"uint256\"}],\"name\":\"getUnstakeEpochMilestone\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unstakeEpochMilestone\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_unstakeTimestamp\",\"type\":\"uint256\"}],\"name\":\"getUnstakeTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unstakeTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeEpochPrevious\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"pauserAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"unstakingLockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochInterval\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"stakeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeFee\",\"type\":\"uint256\"}],\"name\":\"setFees\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minUnstake\",\"type\":\"uint256\"}],\"name\":\"setMinimumValues\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sAddress\",\"type\":\"address\"}],\"name\":\"setSTokensContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"}],\"name\":\"setUTokensContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"unstakeEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeEpochPrevious\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochInterval\",\"type\":\"uint256\"}],\"name\":\"setUnstakeEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"unstakingLockTime\",\"type\":\"uint256\"}],\"name\":\"setUnstakingLockTime\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unStake\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"withdrawUnstakedTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + LiquidStakingABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchingLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"SetBatchingLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"stakeFee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"unstakeFee\",\"type\":\"uint256\"}],\"name\":\"SetFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"minUnstake\",\"type\":\"uint256\"}],\"name\":\"SetMinimumValues\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"name\":\"SetSTokensContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"name\":\"SetUTokensContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"unstakeEpoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"unstakeEpochPrevious\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epochInterval\",\"type\":\"uint256\"}],\"name\":\"SetUnstakeEpoch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"unstakingLockTime\",\"type\":\"uint256\"}],\"name\":\"SetUnstakingLockTime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"StakeTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"UnstakeTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"WithdrawUnstakeTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_batchingLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_sTokens\",\"outputs\":[{\"internalType\":\"contractISTokensV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_uTokens\",\"outputs\":[{\"internalType\":\"contractIUTokensV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"_unstakingAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"_unstakingExpiration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_valueDivisor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"_withdrawCounters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBatchingLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"batchingLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakeUnstakeProps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minUnstake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochInterval\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeEpochPrevious\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakingLockTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"getTotalUnbondedTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unbondingTokens\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"getTotalUnbondingTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unbondingTokens\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_unstakeTimestamp\",\"type\":\"uint256\"}],\"name\":\"getUnstakeEpochMilestone\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unstakeEpochMilestone\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_unstakeTimestamp\",\"type\":\"uint256\"}],\"name\":\"getUnstakeTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"unstakeTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeEpochPrevious\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"pauserAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"unstakingLockTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochInterval\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchingLimit\",\"type\":\"uint256\"}],\"name\":\"setBatchingLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"stakeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeFee\",\"type\":\"uint256\"}],\"name\":\"setFees\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minUnstake\",\"type\":\"uint256\"}],\"name\":\"setMinimumValues\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sAddress\",\"type\":\"address\"}],\"name\":\"setSTokensContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"}],\"name\":\"setUTokensContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"unstakeEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstakeEpochPrevious\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochInterval\",\"type\":\"uint256\"}],\"name\":\"setUnstakeEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"unstakingLockTime\",\"type\":\"uint256\"}],\"name\":\"setUnstakingLockTime\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unStake\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"withdrawUnstakedTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" LiquidStakingAddress = "0xce3f57A8De9AA69da3289871b5FeE5E77fFCF480" LiquidStakingStake = "stake" LiquidStakingUnStake = "unStake" - TokenWrapperABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"GenerateUTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"}],\"name\":\"SetFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"}],\"name\":\"SetMinimumValues\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"name\":\"SetUTokensContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"WithdrawUTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"generateUTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"generateUTokensInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeAdminAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"pauserAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"}],\"name\":\"isBech32Valid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isAddressValid\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"}],\"name\":\"setFees\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"}],\"name\":\"setMinimumValues\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"}],\"name\":\"setUTokensContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"}],\"name\":\"withdrawUTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + TokenWrapperABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"GenerateUTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"accountAddress\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokens\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"finalTokens\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"GenerateUTokensInBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"}],\"name\":\"SetFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"}],\"name\":\"SetMinimumValues\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"name\":\"SetUTokensContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"WithdrawUTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"WithdrawUTokensV2\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_uTokens\",\"outputs\":[{\"internalType\":\"contractIUTokensV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_valueDivisor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controlDigitBytes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dataBytesSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"generateUTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"generateUTokensInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hrpBytes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeAdminAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"pauserAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"}],\"name\":\"isBech32Valid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isAddressValid\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"}],\"name\":\"setFees\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"}],\"name\":\"setMinimumValues\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"}],\"name\":\"setUTokensContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"}],\"name\":\"withdrawUTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" TokenWrapperAddress = "0xA9739b5BdAfe956DEAa8b2e695c7d4f1DF7Bc1D6" TokenWrapperWithdrawUTokens = "withdrawUTokens" ) diff --git a/application/outgoingTx/ethereum.go b/application/outgoingTx/ethereum.go index b65b0277..7f0f36e2 100644 --- a/application/outgoingTx/ethereum.go +++ b/application/outgoingTx/ethereum.go @@ -61,26 +61,31 @@ func sendTxToEth(client *ethclient.Client, toAddress *common.Address, txValue *b return common.Hash{}, err } - gasPrice, err := client.SuggestGasPrice(ctx) + gasTipCap, err := client.SuggestGasTipCap(ctx) if err != nil { return common.Hash{}, err } - tx := types.NewTx(&types.LegacyTx{ - Nonce: nonce, - Value: txValue, - Gas: configuration.GetAppConfig().Ethereum.GasLimit, - GasPrice: gasPrice.Add(gasPrice, big.NewInt(4000000000)), - Data: txData, - To: toAddress, - }) - chainID, err := client.ChainID(ctx) if err != nil { return common.Hash{}, err } - signer := types.NewEIP155Signer(chainID) + //TODO set it as conf parameter + gasFeeCap := big.NewInt(300000000000) + + tx := types.NewTx(&types.DynamicFeeTx{ + ChainID: chainID, + Nonce: nonce, + GasFeeCap: gasFeeCap, + GasTipCap: gasTipCap, + Gas: configuration.GetAppConfig().Ethereum.GasLimit, + To: toAddress, + Value: txValue, + Data: txData, + }) + + signer := types.NewLondonSigner(chainID) caspSignature, v, err := getEthSignature(tx, signer) //Signature is of 64 bytes, need to append V value if err != nil { return common.Hash{}, err diff --git a/ethereum/abi/tokenWrapper/TokenWrapper.go b/ethereum/abi/tokenWrapper/TokenWrapper.go index 1aff7771..3dcaa5a4 100644 --- a/ethereum/abi/tokenWrapper/TokenWrapper.go +++ b/ethereum/abi/tokenWrapper/TokenWrapper.go @@ -4,6 +4,7 @@ package tokenWrapper import ( + "errors" "math/big" "strings" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound @@ -26,20 +28,31 @@ var ( _ = event.NewSubscription ) +// TokenWrapperMetaData contains all meta data concerning the TokenWrapper contract. +var TokenWrapperMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"GenerateUTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"accountAddress\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokens\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"finalTokens\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"GenerateUTokensInBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"}],\"name\":\"SetFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"}],\"name\":\"SetMinimumValues\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"name\":\"SetUTokensContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"WithdrawUTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"WithdrawUTokensV2\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_uTokens\",\"outputs\":[{\"internalType\":\"contractIUTokensV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_valueDivisor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controlDigitBytes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dataBytesSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"generateUTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"generateUTokensInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hrpBytes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeAdminAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"pauserAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"}],\"name\":\"isBech32Valid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isAddressValid\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"}],\"name\":\"setFees\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"}],\"name\":\"setMinimumValues\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"}],\"name\":\"setUTokensContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"}],\"name\":\"withdrawUTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506141db806100206000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80638456cb59116100f9578063cf756fdf11610097578063e3ac914b11610071578063e3ac914b14610981578063e63ab1e91461099f578063e7fa0a32146109bd578063ec1893b414610b09576101c4565b8063cf756fdf14610822578063d37f5598146108b0578063d547741f14610933576101c4565b806391d14854116100d357806391d14854146106db578063a217fddf1461073f578063a53dcd721461075d578063ca15c873146107e0576101c4565b80638456cb59146105885780638f001d4e146105a85780639010d07c14610679576101c4565b80633e118dbe1161016657806351db00e71161014057806351db00e7146104c85780635c975abb14610516578063728a99ee1461053657806378a2f07414610554576101c4565b80633e118dbe146103a55780633f4ba83a146103c3578063428bee9e146103e3576101c4565b806322dd9bc3116101a257806322dd9bc314610279578063248a9ca3146102c75780632f2ff15d1461030957806336568abe14610357576101c4565b80630b78f9c0146101c9578063118c38c71461021757806321bdf9e514610235575b600080fd5b6101ff600480360360408110156101df57600080fd5b810190808035906020019092919080359060200190929190505050610b43565b60405180821515815260200191505060405180910390f35b61021f610cd3565b6040518082815260200191505060405180910390f35b6102776004803603602081101561024b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cf7565b005b6102c56004803603604081101561028f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e04565b005b6102f3600480360360208110156102dd57600080fd5b8101908080359060200190929190505050610f85565b6040518082815260200191505060405180910390f35b6103556004803603604081101561031f57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fa5565b005b6103a36004803603604081101561036d57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061102f565b005b6103ad6110c8565b6040518082815260200191505060405180910390f35b6103cb6110ce565b60405180821515815260200191505060405180910390f35b6104c6600480360360608110156103f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561044057600080fd5b82018360208201111561045257600080fd5b8035906020019184600183028401116401000000008311171561047457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611182565b005b6104fe600480360360408110156104de57600080fd5b8101908080359060200190929190803590602001909291905050506117fd565b60405180821515815260200191505060405180910390f35b61051e6119b9565b60405180821515815260200191505060405180910390f35b61053e6119d0565b6040518082815260200191505060405180910390f35b61055c6119d6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105906119fc565b60405180821515815260200191505060405180910390f35b610661600480360360208110156105be57600080fd5b81019080803590602001906401000000008111156105db57600080fd5b8201836020820111156105ed57600080fd5b8035906020019184600183028401116401000000008311171561060f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611ab0565b60405180821515815260200191505060405180910390f35b6106af6004803603604081101561068f57600080fd5b810190808035906020019092919080359060200190929190505050611c06565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610727600480360360408110156106f157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c38565b60405180821515815260200191505060405180910390f35b610747611c6a565b6040518082815260200191505060405180910390f35b610765611c71565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107a557808201518184015260208101905061078a565b50505050905090810190601f1680156107d25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61080c600480360360208110156107f657600080fd5b8101908080359060200190929190505050611d0f565b6040518082815260200191505060405180910390f35b6108ae6004803603608081101561083857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d36565b005b6108b8611f6c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108f85780820151818401526020810190506108dd565b50505050905090810190601f1680156109255780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61097f6004803603604081101561094957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061200a565b005b610989612094565b6040518082815260200191505060405180910390f35b6109a761209a565b6040518082815260200191505060405180910390f35b610b07600480360360408110156109d357600080fd5b81019080803590602001906401000000008111156109f057600080fd5b820183602082011115610a0257600080fd5b80359060200191846020830284011164010000000083111715610a2457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610a8457600080fd5b820183602082011115610a9657600080fd5b80359060200191846020830284011164010000000083111715610ab857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506120be565b005b610b1161242f565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b6000610b596000801b610b54612457565b611c38565b610bcb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545731000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b610be16064609c5461245f90919063ffffffff16565b83111580610bef5750600083145b8015610c1b5750610c0c6064609c5461245f90919063ffffffff16565b82111580610c1a5750600082145b5b610c8d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545732000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b82609a8190555081609b8190555081837f3be6e637f54f081a2dd12982cfd58481304fc98b604b18fa8ed4aa4e4a9d153260405160405180910390a36001905092915050565b7f751b795d24b92e3d92d1d0d8f2885f4e9c9c269da350af36ae6b49069babf4bf81565b610d0b6000801b610d06612457565b611c38565b610d7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545736000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80609760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167ff745c285f36f88bea6af14d4d0f33dd9350cef7895216c1615b1caaee7857e0c60405160405180910390a250565b610e0c6119b9565b15610e7f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b610eb07f751b795d24b92e3d92d1d0d8f2885f4e9c9c269da350af36ae6b49069babf4bf610eab612457565b611c38565b610f22576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731300000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f2e83836124e5565b905080828473ffffffffffffffffffffffffffffffffffffffff167f572f067f64ae57ed816b7e9b5424a87d97035d68384f149586cba42b4192c9d8426040518082815260200191505060405180910390a4505050565b600060656000838152602001908152602001600020600201549050919050565b610fcc6065600084815260200190815260200160002060020154610fc7612457565b611c38565b611021576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806140c9602f913960400191505060405180910390fd5b61102b8282612601565b5050565b611037612457565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146110ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180614177602f913960400191505060405180910390fd5b6110c48282612695565b5050565b60a05481565b60006111017f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6110fc612457565b611c38565b611173576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545738000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b61117b612729565b6001905090565b61118a6119b9565b156111fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611205612457565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146112a5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731370000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60995482101561131d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731340000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600061146c609d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113b85780601f1061138d576101008083540402835291602001916113b8565b820191906000526020600020905b81548152906001019060200180831161139b57829003601f168201915b5050505050609e8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114535780601f1061142857610100808354040283529160200191611453565b820191906000526020600020905b81548152906001019060200180831161143657829003601f168201915b5050505050609f5485612814909392919063ffffffff16565b905060011515811515146114e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731350000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561157357600080fd5b505afa158015611587573d6000803e3d6000fd5b505050506040513d602081101561159d57600080fd5b8101908080519060200190929190505050905060006115de60646115d0609b54609c54896129629092919063ffffffff16565b612a4290919063ffffffff16565b905060006115f58287612acb90919063ffffffff16565b90508083101561166d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731360000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639dc29fac88836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561170057600080fd5b505af1158015611714573d6000803e3d6000fd5b505050506040513d602081101561172a57600080fd5b810190808051906020019092919050505050846040518082805190602001908083835b60208310611770578051825260208201915060208101905060208303925061174d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020868873ffffffffffffffffffffffffffffffffffffffff167f0f4363f6961ed151f2cf8f720784b70c0f5573f216fc939f67f2a5d12698e02e8442604051808381526020018281526020019250505060405180910390a450505050505050565b60006118136000801b61180e612457565b611c38565b611885576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545733000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60018310156118fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545734000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001821015611973576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545735000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b826098819055508160998190555081837fa94d40347449ea19b873d64ed55c99772194c49791e82be5c2dc24e4c0044fe360405160405180910390a36001905092915050565b6000603360009054906101000a900460ff16905090565b609c5481565b609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611a2f7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611a2a612457565b611c38565b611aa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545737000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611aa9612b53565b6001905090565b6000611bff609d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b4b5780601f10611b2057610100808354040283529160200191611b4b565b820191906000526020600020905b815481529060010190602001808311611b2e57829003601f168201915b5050505050609e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611be65780601f10611bbb57610100808354040283529160200191611be6565b820191906000526020600020905b815481529060010190602001808311611bc957829003601f168201915b5050505050609f5485612814909392919063ffffffff16565b9050919050565b6000611c308260656000868152602001908152602001600020600001612c3f90919063ffffffff16565b905092915050565b6000611c628260656000868152602001908152602001600020600001612c5990919063ffffffff16565b905092915050565b6000801b81565b609e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d075780601f10611cdc57610100808354040283529160200191611d07565b820191906000526020600020905b815481529060010190602001808311611cea57829003601f168201915b505050505081565b6000611d2f60656000848152602001908152602001600020600001612c89565b9050919050565b600060019054906101000a900460ff1680611d555750611d54612c9e565b5b80611d6b575060008054906101000a900460ff16155b611dc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614128602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611e10576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611e18612caf565b611e20612dbd565b611e346000801b611e2f612457565b612ecb565b611e5e7f751b795d24b92e3d92d1d0d8f2885f4e9c9c269da350af36ae6b49069babf4bf85612ecb565b611e887f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a84612ecb565b611e9185610cf7565b611e9c6001806117fd565b5081609c819055506040518060400160405280600681526020017f636f736d6f730000000000000000000000000000000000000000000000000000815250609d9080519060200190611eef929190613ffb565b506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250609e9080519060200190611f3b929190613ffb565b506026609f819055508015611f655760008060016101000a81548160ff0219169083151502179055505b5050505050565b609d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156120025780601f10611fd757610100808354040283529160200191612002565b820191906000526020600020905b815481529060010190602001808311611fe557829003601f168201915b505050505081565b612031606560008481526020019081526020016000206002015461202c612457565b611c38565b612086576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806140f86030913960400191505060405180910390fd5b6120908282612695565b5050565b609f5481565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6120c66119b9565b15612139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b80518251146121b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731310000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6121e17f751b795d24b92e3d92d1d0d8f2885f4e9c9c269da350af36ae6b49069babf4bf6121dc612457565b611c38565b612253576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731320000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080835167ffffffffffffffff8111801561226e57600080fd5b5060405190808252806020026020018201604052801561229d5781602001602082028036833780820191505090505b509050600084519050600092505b80831015612316576122e38584815181106122c257fe5b60200260200101518585815181106122d657fe5b60200260200101516124e5565b8284815181106122ef57fe5b60200260200101818152505061230f600184612acb90919063ffffffff16565b92506122ab565b7fff03029439b5b79825ca34bca1b453f01e01935bdde5210a8af22f19705ca1a38585844260405180806020018060200180602001858152602001848103845288818151815260200191508051906020019060200280838360005b8381101561238c578082015181840152602081019050612371565b50505050905001848103835287818151815260200191508051906020019060200280838360005b838110156123ce5780820151818401526020810190506123b3565b50505050905001848103825286818151815260200191508051906020019060200280838360005b838110156124105780820151818401526020810190506123f5565b5050505090500197505050505050505060405180910390a15050505050565b6000806000806000609a549450609b54935060985492506099549150609c5490509091929394565b600033905090565b60008083141561247257600090506124df565b600082840290508284828161248357fe5b04146124da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806141566021913960400191505060405180910390fd5b809150505b92915050565b6000806125146064612506609a54609c54876129629092919063ffffffff16565b612a4290919063ffffffff16565b90506125298184612ed990919063ffffffff16565b9150609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1985846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156125be57600080fd5b505af11580156125d2573d6000803e3d6000fd5b505050506040513d60208110156125e857600080fd5b8101908080519060200190929190505050505092915050565b6126298160656000858152602001908152602001600020600001612f5c90919063ffffffff16565b1561269157612636612457565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6126bd8160656000858152602001908152602001600020600001612f8c90919063ffffffff16565b15612725576126ca612457565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6127316119b9565b6127a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b6000603360006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6127e7612457565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b60008085905060006128336000875184612fbc9092919063ffffffff16565b9050612848868261312e90919063ffffffff16565b6128575760009250505061295a565b60006128708251600185612fbc9092919063ffffffff16565b9050612885868261312e90919063ffffffff16565b612895576000935050505061295a565b60006128b76001845101600185518751030386612fbc9092919063ffffffff16565b9050858151146128ce57600094505050505061295a565b60006128f36001855101600186516006895103030387612fbc9092919063ffffffff16565b905060006129008261319b565b905060008151141561291b576000965050505050505061295a565b600061292686613374565b905060006129348284613414565b9050600061294b828761312e90919063ffffffff16565b90508099505050505050505050505b949350505050565b6000806000612971868661353c565b915091506000848061297f57fe5b868809905082811115612993576001820391505b808303925060008214156129b5578483816129aa57fe5b049350505050612a3b565b848210612a2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f46756c6c4d6174683a2046554c4c4449565f4f564552464c4f5700000000000081525060200191505060405180910390fd5b612a3583838761358f565b93505050505b9392505050565b6000808211612ab9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060200191505060405180910390fd5b818381612ac257fe5b04905092915050565b600080828401905083811015612b49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b612b5b6119b9565b15612bce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001603360006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612c12612457565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6000612c4e836000018361362c565b60001c905092915050565b6000612c81836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6136af565b905092915050565b6000612c97826000016136d2565b9050919050565b6000612ca9306136e3565b15905090565b600060019054906101000a900460ff1680612cce5750612ccd612c9e565b5b80612ce4575060008054906101000a900460ff16155b612d39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614128602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612d89576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612d916136f6565b612d996137f4565b8015612dba5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680612ddc5750612ddb612c9e565b5b80612df2575060008054906101000a900460ff16155b612e47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614128602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612e97576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612e9f6136f6565b612ea76138f2565b8015612ec85760008060016101000a81548160ff0219169083151502179055505b50565b612ed58282612601565b5050565b600082821115612f51576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b818303905092915050565b6000612f84836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613a0b565b905092915050565b6000612fb4836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613a7b565b905092915050565b606081601f83011015613037576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f736c6963655f6f766572666c6f7700000000000000000000000000000000000081525060200191505060405180910390fd5b818301845110156130b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f736c6963655f6f75744f66426f756e647300000000000000000000000000000081525060200191505060405180910390fd5b60608215600081146130d15760405191506000825260208201604052613122565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561310f57805183526020830192506020810190506130f2565b50868552601f19601f8301166040525050505b50809150509392505050565b600080600190508351835181146001811461314c576000925061318f565b600160208701838101602088015b60028483851001141561318a5780518351146131795760009650600093505b60208301925060208101905061315a565b505050505b50508091505092915050565b6060815167ffffffffffffffff811180156131b557600080fd5b506040519080825280602002602001820160405280156131e45781602001602082028036833780820191505090505b5090506060600080600090505b845181101561336b57600091505b6040518060400160405280602081526020017f71707a7279397838676632747664773073336a6e35346b686365366d7561376c815250518210156132fc576040518060400160405280602081526020017f71707a7279397838676632747664773073336a6e35346b686365366d7561376c815250828151811061327e57fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168582815181106132b757fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156132ef576132fc565b81806001019250506131ff565b6040518060400160405280602081526020017f71707a7279397838676632747664773073336a6e35346b686365366d7561376c815250518214156133455782935050505061336f565b8184828151811061335257fe5b60200260200101818152505080806001019150506131f1565b5050505b919050565b6060815167ffffffffffffffff8111801561338e57600080fd5b506040519080825280602002602001820160405280156133bd5781602001602082028036833780820191505090505b50905060005b825181101561340e578281815181106133d857fe5b602001015160f81c60f81b60f81c60ff168282815181106133f557fe5b60200260200101818152505080806001019150506133c3565b50919050565b6060600061342b836134268686613b63565b613c2e565b90506000815167ffffffffffffffff8111801561344757600080fd5b506040519080825280601f01601f19166020018201604052801561347a5781602001600182028036833780820191505090505b50905060005b8251811015613530576040518060400160405280602081526020017f71707a7279397838676632747664773073336a6e35346b686365366d7561376c8152508382815181106134cb57fe5b6020026020010151815181106134dd57fe5b602001015160f81c60f81b8282815181106134f457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613480565b50809250505092915050565b60008060007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8061356957fe5b84860990508385029250828103915082811015613587576001820391505b509250929050565b60008082600003831690508083816135a357fe5b0492508085816135af57fe5b04945060018182600003816135c057fe5b04018402850194506000600190508084026002038102905080840260020381029050808402600203810290508084026002038102905080840260020381029050808402600203810290508084026002038102905080840260020381029050808602925050509392505050565b60008183600001805490501161368d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806140a76022913960400191505060405180910390fd5b82600001828154811061369c57fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b600080823b905060008111915050919050565b600060019054906101000a900460ff16806137155750613714612c9e565b5b8061372b575060008054906101000a900460ff16155b613780576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614128602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156137d0576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156137f15760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806138135750613812612c9e565b5b80613829575060008054906101000a900460ff16155b61387e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614128602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156138ce576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156138ef5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806139115750613910612c9e565b5b80613927575060008054906101000a900460ff16155b61397c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180614128602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156139cc576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6000603360006101000a81548160ff0219169083151502179055508015613a085760008060016101000a81548160ff0219169083151502179055505b50565b6000613a1783836136af565b613a70578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050613a75565b600090505b92915050565b60008083600101600084815260200190815260200160002054905060008114613b575760006001820390506000600186600001805490500390506000866000018281548110613ac657fe5b9060005260206000200154905080876000018481548110613ae357fe5b9060005260206000200181905550600183018760010160008381526020019081526020016000208190555086600001805480613b1b57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050613b5d565b60009150505b92915050565b60606000613b85613b7c613b7686613d19565b85613c2e565b60006006613e2a565b905060006001613b9483613f03565b1890506000600667ffffffffffffffff81118015613bb157600080fd5b50604051908082528060200260200182016040528015613be05781602001602082028036833780820191505090505b50905060005b6006811015613c2157601f8160050360050284901c16828281518110613c0857fe5b6020026020010181815250508080600101915050613be6565b5080935050505092915050565b60606000825184510167ffffffffffffffff81118015613c4d57600080fd5b50604051908082528060200260200182016040528015613c7c5781602001602082028036833780820191505090505b50905060005b8451811015613cc457848181518110613c9757fe5b6020026020010151828281518110613cab57fe5b6020026020010181815250508080600101915050613c82565b60005b8451811015613d0d57848180600101925081518110613ce257fe5b6020026020010151838380600101945081518110613cfc57fe5b602002602001018181525050613cc7565b82935050505092915050565b60606000600183518451010167ffffffffffffffff81118015613d3b57600080fd5b50604051908082528060200260200182016040528015613d6a5781602001602082028036833780820191505090505b50905060005b8351811015613db6576005848281518110613d8757fe5b6020026020010151901c828281518110613d9d57fe5b6020026020010181815250508080600101915050613d70565b50600081845181518110613dc657fe5b60200260200101818152505060005b8351811015613e2057601f848281518110613dec57fe5b602002602001015116826001865184010181518110613e0757fe5b6020026020010181815250508080600101915050613dd5565b5080915050919050565b606060008285510167ffffffffffffffff81118015613e4857600080fd5b50604051908082528060200260200182016040528015613e775781602001602082028036833780820191505090505b50905060005b8551811015613ebf57858181518110613e9257fe5b6020026020010151828281518110613ea657fe5b6020026020010181815250508080600101915050613e7d565b60005b84811015613ef65785838380600101945081518110613edd57fe5b6020026020010181815250508080600101915050613ec2565b8293505050509392505050565b6000806040518060a00160405280633b6a57b263ffffffff1681526020016326508e6d63ffffffff168152602001631ea119fa63ffffffff168152602001633d4233dd63ffffffff168152602001632a1462b363ffffffff16815250905060006001905060005b8451811015613ff0576000601983901c9050858281518110613f8857fe5b602002602001015160056301ffffff8516901b18925060005b6005811015613fe1576001808284901c161415613fd457848160058110613fc457fe5b602002015163ffffffff16841893505b8080600101915050613fa1565b50508080600101915050613f6a565b508092505050919050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826140315760008555614078565b82601f1061404a57805160ff1916838001178555614078565b82800160010185558215614078579182015b8281111561407757825182559160200191906001019061405c565b5b5090506140859190614089565b5090565b5b808211156140a257600081600090555060010161408a565b509056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220d5bf92b40e695d085d78633521040088f68de0aa0a566d7d99655dd7a9303dce64736f6c63430007060033", +} + // TokenWrapperABI is the input ABI used to generate the binding from. -const TokenWrapperABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"GenerateUTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"}],\"name\":\"SetFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"}],\"name\":\"SetMinimumValues\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"name\":\"SetUTokensContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"accountAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalTokens\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"WithdrawUTokens\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"generateUTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"generateUTokensInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bridgeAdminAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"pauserAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"valueDivisor\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"}],\"name\":\"isBech32Valid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isAddressValid\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"depositFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawFee\",\"type\":\"uint256\"}],\"name\":\"setFees\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minWithdraw\",\"type\":\"uint256\"}],\"name\":\"setMinimumValues\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"uAddress\",\"type\":\"address\"}],\"name\":\"setUTokensContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"toChainAddress\",\"type\":\"string\"}],\"name\":\"withdrawUTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +// Deprecated: Use TokenWrapperMetaData.ABI instead. +var TokenWrapperABI = TokenWrapperMetaData.ABI // TokenWrapperBin is the compiled bytecode used for deploying new contracts. -var TokenWrapperBin = "0x608060405234801561001057600080fd5b50613ea2806100206000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80638456cb59116100b8578063ca15c8731161007c578063ca15c8731461066b578063cf756fdf146106ad578063d547741f1461073b578063e63ab1e914610789578063e7fa0a32146107a7578063ec1893b4146108f357610142565b80638456cb59146104965780638f001d4e146104b65780639010d07c1461058757806391d14854146105e9578063a217fddf1461064d57610142565b80632f2ff15d1161010a5780632f2ff15d1461028757806336568abe146102d55780633f4ba83a14610323578063428bee9e1461034357806351db00e7146104285780635c975abb1461047657610142565b80630b78f9c014610147578063118c38c71461019557806321bdf9e5146101b357806322dd9bc3146101f7578063248a9ca314610245575b600080fd5b61017d6004803603604081101561015d57600080fd5b81019080803590602001909291908035906020019092919050505061092d565b60405180821515815260200191505060405180910390f35b61019d610ace565b6040518082815260200191505060405180910390f35b6101f5600480360360208110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610af2565b005b6102436004803603604081101561020d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bff565b005b6102716004803603602081101561025b57600080fd5b8101908080359060200190929190505050610df8565b6040518082815260200191505060405180910390f35b6102d36004803603604081101561029d57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e18565b005b610321600480360360408110156102eb57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ea2565b005b61032b610f3b565b60405180821515815260200191505060405180910390f35b6104266004803603606081101561035957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156103a057600080fd5b8201836020820111156103b257600080fd5b803590602001918460018302840111640100000000831117156103d457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610fef565b005b61045e6004803603604081101561043e57600080fd5b81019080803590602001909291908035906020019092919050505061166a565b60405180821515815260200191505060405180910390f35b61047e611837565b60405180821515815260200191505060405180910390f35b61049e61184e565b60405180821515815260200191505060405180910390f35b61056f600480360360208110156104cc57600080fd5b81019080803590602001906401000000008111156104e957600080fd5b8201836020820111156104fb57600080fd5b8035906020019184600183028401116401000000008311171561051d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611902565b60405180821515815260200191505060405180910390f35b6105bd6004803603604081101561059d57600080fd5b810190808035906020019092919080359060200190929190505050611a5a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610635600480360360408110156105ff57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a8c565b60405180821515815260200191505060405180910390f35b610655611abe565b6040518082815260200191505060405180910390f35b6106976004803603602081101561068157600080fd5b8101908080359060200190929190505050611ac5565b6040518082815260200191505060405180910390f35b610739600480360360808110156106c357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611aec565b005b6107876004803603604081101561075157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d22565b005b610791611dac565b6040518082815260200191505060405180910390f35b6108f1600480360360408110156107bd57600080fd5b81019080803590602001906401000000008111156107da57600080fd5b8201836020820111156107ec57600080fd5b8035906020019184602083028401116401000000008311171561080e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561086e57600080fd5b82018360208201111561088057600080fd5b803590602001918460208302840111640100000000831117156108a257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611dd0565b005b6108fb6120f6565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b60006109436000801b61093e61211e565b611a8c565b6109b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545731000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6109cb6064609c5461212690919063ffffffff16565b831115806109fa57506000831480156109f957506109f56064609c5461212690919063ffffffff16565b8211155b5b80610a055750600082145b610a77576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545732000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b82609a8190555081609b819055507f3be6e637f54f081a2dd12982cfd58481304fc98b604b18fa8ed4aa4e4a9d15328383604051808381526020018281526020019250505060405180910390a16001905092915050565b7f751b795d24b92e3d92d1d0d8f2885f4e9c9c269da350af36ae6b49069babf4bf81565b610b066000801b610b0161211e565b611a8c565b610b78576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545736000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80609760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167ff745c285f36f88bea6af14d4d0f33dd9350cef7895216c1615b1caaee7857e0c60405160405180910390a250565b610c07611837565b15610c7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b609854811015610cf2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545739000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b610d237f751b795d24b92e3d92d1d0d8f2885f4e9c9c269da350af36ae6b49069babf4bf610d1e61211e565b611a8c565b610d95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731300000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610da183836121ac565b905080828473ffffffffffffffffffffffffffffffffffffffff167f572f067f64ae57ed816b7e9b5424a87d97035d68384f149586cba42b4192c9d8426040518082815260200191505060405180910390a4505050565b600060656000838152602001908152602001600020600201549050919050565b610e3f6065600084815260200190815260200160002060020154610e3a61211e565b611a8c565b610e94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180613d90602f913960400191505060405180910390fd5b610e9e82826122c8565b5050565b610eaa61211e565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180613e3e602f913960400191505060405180910390fd5b610f37828261235c565b5050565b6000610f6e7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610f6961211e565b611a8c565b610fe0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545738000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b610fe86123f0565b6001905090565b610ff7611837565b1561106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6099548210156110e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731340000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000611231609d8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561117d5780601f106111525761010080835404028352916020019161117d565b820191906000526020600020905b81548152906001019060200180831161116057829003601f168201915b5050505050609e8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156112185780601f106111ed57610100808354040283529160200191611218565b820191906000526020600020905b8154815290600101906020018083116111fb57829003601f168201915b5050505050609f54856124db909392919063ffffffff16565b905060011515811515146112ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731350000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561133857600080fd5b505afa15801561134c573d6000803e3d6000fd5b505050506040513d602081101561136257600080fd5b8101908080519060200190929190505050905060006113a36064611395609b54609c54896126299092919063ffffffff16565b61270990919063ffffffff16565b905060006113ba828761279290919063ffffffff16565b905080831015611432576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731360000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b61143a61211e565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16146114da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731370000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639dc29fac88836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561156d57600080fd5b505af1158015611581573d6000803e3d6000fd5b505050506040513d602081101561159757600080fd5b810190808051906020019092919050505050846040518082805190602001908083835b602083106115dd57805182526020820191506020810190506020830392506115ba565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020868873ffffffffffffffffffffffffffffffffffffffff167f0f4363f6961ed151f2cf8f720784b70c0f5573f216fc939f67f2a5d12698e02e8442604051808381526020018281526020019250505060405180910390a450505050505050565b60006116806000801b61167b61211e565b611a8c565b6116f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545733000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001831015611769576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545734000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60018210156117e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545735000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b82609881905550816099819055507fa94d40347449ea19b873d64ed55c99772194c49791e82be5c2dc24e4c0044fe38383604051808381526020018281526020019250505060405180910390a16001905092915050565b6000603360009054906101000a900460ff16905090565b60006118817f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61187c61211e565b611a8c565b6118f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f545737000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6118fb61281a565b6001905090565b600080611a52609d8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561199e5780601f106119735761010080835404028352916020019161199e565b820191906000526020600020905b81548152906001019060200180831161198157829003601f168201915b5050505050609e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a395780601f10611a0e57610100808354040283529160200191611a39565b820191906000526020600020905b815481529060010190602001808311611a1c57829003601f168201915b5050505050609f54866124db909392919063ffffffff16565b905050919050565b6000611a84826065600086815260200190815260200160002060000161290690919063ffffffff16565b905092915050565b6000611ab6826065600086815260200190815260200160002060000161292090919063ffffffff16565b905092915050565b6000801b81565b6000611ae560656000848152602001908152602001600020600001612950565b9050919050565b600060019054906101000a900460ff1680611b0b5750611b0a612965565b5b80611b21575060008054906101000a900460ff16155b611b76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180613def602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611bc6576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611bce612976565b611bd6612a84565b611bea6000801b611be561211e565b612b92565b611c147f751b795d24b92e3d92d1d0d8f2885f4e9c9c269da350af36ae6b49069babf4bf85612b92565b611c3e7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a84612b92565b611c4785610af2565b611c5260018061166a565b5081609c819055506040518060400160405280600681526020017f636f736d6f730000000000000000000000000000000000000000000000000000815250609d9080519060200190611ca5929190613cc2565b506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250609e9080519060200190611cf1929190613cc2565b506026609f819055508015611d1b5760008060016101000a81548160ff0219169083151502179055505b5050505050565b611d496065600084815260200190815260200160002060020154611d4461211e565b611a8c565b611d9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180613dbf6030913960400191505060405180910390fd5b611da8828261235c565b5050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b611dd8611837565b15611e4b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b8051825114611ec2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731310000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611ef37f751b795d24b92e3d92d1d0d8f2885f4e9c9c269da350af36ae6b49069babf4bf611eee61211e565b611a8c565b611f65576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731320000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080600084519050600092505b8083101561205357609854848481518110611f8a57fe5b60200260200101511015612006576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f545731330000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b61203685848151811061201557fe5b602002602001015185858151811061202957fe5b60200260200101516121ac565b915061204c60018461279290919063ffffffff16565b9250611f73565b8184612069600186612ba090919063ffffffff16565b8151811061207357fe5b602002602001015186612090600187612ba090919063ffffffff16565b8151811061209a57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff167f572f067f64ae57ed816b7e9b5424a87d97035d68384f149586cba42b4192c9d8426040518082815260200191505060405180910390a45050505050565b6000806000806000609a549450609b54935060985492506099549150609c5490509091929394565b600033905090565b60008083141561213957600090506121a6565b600082840290508284828161214a57fe5b04146121a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613e1d6021913960400191505060405180910390fd5b809150505b92915050565b6000806121db60646121cd609a54609c54876126299092919063ffffffff16565b61270990919063ffffffff16565b90506121f08184612ba090919063ffffffff16565b9150609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1985846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561228557600080fd5b505af1158015612299573d6000803e3d6000fd5b505050506040513d60208110156122af57600080fd5b8101908080519060200190929190505050505092915050565b6122f08160656000858152602001908152602001600020600001612c2390919063ffffffff16565b15612358576122fd61211e565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6123848160656000858152602001908152602001600020600001612c5390919063ffffffff16565b156123ec5761239161211e565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6123f8611837565b61246a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b6000603360006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6124ae61211e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b60008085905060006124fa6000875184612c839092919063ffffffff16565b905061250f8682612df590919063ffffffff16565b61251e57600092505050612621565b60006125378251600185612c839092919063ffffffff16565b905061254c8682612df590919063ffffffff16565b61255c5760009350505050612621565b600061257e6001845101600185518751030386612c839092919063ffffffff16565b905085815114612595576000945050505050612621565b60006125ba6001855101600186516006895103030387612c839092919063ffffffff16565b905060006125c782612e62565b90506000815114156125e25760009650505050505050612621565b60006125ed8661303b565b905060006125fb82846130db565b905060006126128287612df590919063ffffffff16565b90508099505050505050505050505b949350505050565b60008060006126388686613203565b915091506000848061264657fe5b86880990508281111561265a576001820391505b8083039250600082141561267c5784838161267157fe5b049350505050612702565b8482106126f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f46756c6c4d6174683a2046554c4c4449565f4f564552464c4f5700000000000081525060200191505060405180910390fd5b6126fc838387613256565b93505050505b9392505050565b6000808211612780576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060200191505060405180910390fd5b81838161278957fe5b04905092915050565b600080828401905083811015612810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b612822611837565b15612895576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001603360006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586128d961211e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600061291583600001836132f3565b60001c905092915050565b6000612948836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613376565b905092915050565b600061295e82600001613399565b9050919050565b6000612970306133aa565b15905090565b600060019054906101000a900460ff16806129955750612994612965565b5b806129ab575060008054906101000a900460ff16155b612a00576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180613def602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612a50576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612a586133bd565b612a606134bb565b8015612a815760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680612aa35750612aa2612965565b5b80612ab9575060008054906101000a900460ff16155b612b0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180613def602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612b5e576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612b666133bd565b612b6e6135b9565b8015612b8f5760008060016101000a81548160ff0219169083151502179055505b50565b612b9c82826122c8565b5050565b600082821115612c18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b818303905092915050565b6000612c4b836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6136d2565b905092915050565b6000612c7b836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613742565b905092915050565b606081601f83011015612cfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f736c6963655f6f766572666c6f7700000000000000000000000000000000000081525060200191505060405180910390fd5b81830184511015612d77576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f736c6963655f6f75744f66426f756e647300000000000000000000000000000081525060200191505060405180910390fd5b6060821560008114612d985760405191506000825260208201604052612de9565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612dd65780518352602083019250602081019050612db9565b50868552601f19601f8301166040525050505b50809150509392505050565b6000806001905083518351811460018114612e135760009250612e56565b600160208701838101602088015b600284838510011415612e51578051835114612e405760009650600093505b602083019250602081019050612e21565b505050505b50508091505092915050565b6060815167ffffffffffffffff81118015612e7c57600080fd5b50604051908082528060200260200182016040528015612eab5781602001602082028036833780820191505090505b5090506060600080600090505b845181101561303257600091505b6040518060400160405280602081526020017f71707a7279397838676632747664773073336a6e35346b686365366d7561376c81525051821015612fc3576040518060400160405280602081526020017f71707a7279397838676632747664773073336a6e35346b686365366d7561376c8152508281518110612f4557fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916858281518110612f7e57fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415612fb657612fc3565b8180600101925050612ec6565b6040518060400160405280602081526020017f71707a7279397838676632747664773073336a6e35346b686365366d7561376c8152505182141561300c57829350505050613036565b8184828151811061301957fe5b6020026020010181815250508080600101915050612eb8565b5050505b919050565b6060815167ffffffffffffffff8111801561305557600080fd5b506040519080825280602002602001820160405280156130845781602001602082028036833780820191505090505b50905060005b82518110156130d55782818151811061309f57fe5b602001015160f81c60f81b60f81c60ff168282815181106130bc57fe5b602002602001018181525050808060010191505061308a565b50919050565b606060006130f2836130ed868661382a565b6138f5565b90506000815167ffffffffffffffff8111801561310e57600080fd5b506040519080825280601f01601f1916602001820160405280156131415781602001600182028036833780820191505090505b50905060005b82518110156131f7576040518060400160405280602081526020017f71707a7279397838676632747664773073336a6e35346b686365366d7561376c81525083828151811061319257fe5b6020026020010151815181106131a457fe5b602001015160f81c60f81b8282815181106131bb57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613147565b50809250505092915050565b60008060007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8061323057fe5b8486099050838502925082810391508281101561324e576001820391505b509250929050565b600080826000038316905080838161326a57fe5b04925080858161327657fe5b049450600181826000038161328757fe5b04018402850194506000600190508084026002038102905080840260020381029050808402600203810290508084026002038102905080840260020381029050808402600203810290508084026002038102905080840260020381029050808602925050509392505050565b600081836000018054905011613354576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613d6e6022913960400191505060405180910390fd5b82600001828154811061336357fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b600080823b905060008111915050919050565b600060019054906101000a900460ff16806133dc57506133db612965565b5b806133f2575060008054906101000a900460ff16155b613447576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180613def602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613497576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156134b85760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806134da57506134d9612965565b5b806134f0575060008054906101000a900460ff16155b613545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180613def602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613595576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156135b65760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806135d857506135d7612965565b5b806135ee575060008054906101000a900460ff16155b613643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180613def602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613693576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6000603360006101000a81548160ff02191690831515021790555080156136cf5760008060016101000a81548160ff0219169083151502179055505b50565b60006136de8383613376565b61373757826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905061373c565b600090505b92915050565b6000808360010160008481526020019081526020016000205490506000811461381e576000600182039050600060018660000180549050039050600086600001828154811061378d57fe5b90600052602060002001549050808760000184815481106137aa57fe5b90600052602060002001819055506001830187600101600083815260200190815260200160002081905550866000018054806137e257fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050613824565b60009150505b92915050565b6060600061384c61384361383d866139e0565b856138f5565b60006006613af1565b90506000600161385b83613bca565b1890506000600667ffffffffffffffff8111801561387857600080fd5b506040519080825280602002602001820160405280156138a75781602001602082028036833780820191505090505b50905060005b60068110156138e857601f8160050360050284901c168282815181106138cf57fe5b60200260200101818152505080806001019150506138ad565b5080935050505092915050565b60606000825184510167ffffffffffffffff8111801561391457600080fd5b506040519080825280602002602001820160405280156139435781602001602082028036833780820191505090505b50905060005b845181101561398b5784818151811061395e57fe5b602002602001015182828151811061397257fe5b6020026020010181815250508080600101915050613949565b60005b84518110156139d4578481806001019250815181106139a957fe5b60200260200101518383806001019450815181106139c357fe5b60200260200101818152505061398e565b82935050505092915050565b60606000600183518451010167ffffffffffffffff81118015613a0257600080fd5b50604051908082528060200260200182016040528015613a315781602001602082028036833780820191505090505b50905060005b8351811015613a7d576005848281518110613a4e57fe5b6020026020010151901c828281518110613a6457fe5b6020026020010181815250508080600101915050613a37565b50600081845181518110613a8d57fe5b60200260200101818152505060005b8351811015613ae757601f848281518110613ab357fe5b602002602001015116826001865184010181518110613ace57fe5b6020026020010181815250508080600101915050613a9c565b5080915050919050565b606060008285510167ffffffffffffffff81118015613b0f57600080fd5b50604051908082528060200260200182016040528015613b3e5781602001602082028036833780820191505090505b50905060005b8551811015613b8657858181518110613b5957fe5b6020026020010151828281518110613b6d57fe5b6020026020010181815250508080600101915050613b44565b60005b84811015613bbd5785838380600101945081518110613ba457fe5b6020026020010181815250508080600101915050613b89565b8293505050509392505050565b6000806040518060a00160405280633b6a57b263ffffffff1681526020016326508e6d63ffffffff168152602001631ea119fa63ffffffff168152602001633d4233dd63ffffffff168152602001632a1462b363ffffffff16815250905060006001905060005b8451811015613cb7576000601983901c9050858281518110613c4f57fe5b602002602001015160056301ffffff8516901b18925060005b6005811015613ca8576001808284901c161415613c9b57848160058110613c8b57fe5b602002015163ffffffff16841893505b8080600101915050613c68565b50508080600101915050613c31565b508092505050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282613cf85760008555613d3f565b82601f10613d1157805160ff1916838001178555613d3f565b82800160010185558215613d3f579182015b82811115613d3e578251825591602001919060010190613d23565b5b509050613d4c9190613d50565b5090565b5b80821115613d69576000816000905550600101613d51565b509056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212207fe4614d9e990874328f08aa2b621a20ef38001a0d1ca0e2c7207b26c5f7870e64736f6c63430007060033" +// Deprecated: Use TokenWrapperMetaData.Bin instead. +var TokenWrapperBin = TokenWrapperMetaData.Bin // DeployTokenWrapper deploys a new Ethereum contract, binding an instance of TokenWrapper to it. func DeployTokenWrapper(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *TokenWrapper, error) { - parsed, err := abi.JSON(strings.NewReader(TokenWrapperABI)) + parsed, err := TokenWrapperMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(TokenWrapperBin), backend) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(TokenWrapperBin), backend) if err != nil { return common.Address{}, nil, nil, err } @@ -281,6 +294,161 @@ func (_TokenWrapper *TokenWrapperCallerSession) PAUSERROLE() ([32]byte, error) { return _TokenWrapper.Contract.PAUSERROLE(&_TokenWrapper.CallOpts) } +// UTokens is a free data retrieval call binding the contract method 0x78a2f074. +// +// Solidity: function _uTokens() view returns(address) +func (_TokenWrapper *TokenWrapperCaller) UTokens(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TokenWrapper.contract.Call(opts, &out, "_uTokens") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// UTokens is a free data retrieval call binding the contract method 0x78a2f074. +// +// Solidity: function _uTokens() view returns(address) +func (_TokenWrapper *TokenWrapperSession) UTokens() (common.Address, error) { + return _TokenWrapper.Contract.UTokens(&_TokenWrapper.CallOpts) +} + +// UTokens is a free data retrieval call binding the contract method 0x78a2f074. +// +// Solidity: function _uTokens() view returns(address) +func (_TokenWrapper *TokenWrapperCallerSession) UTokens() (common.Address, error) { + return _TokenWrapper.Contract.UTokens(&_TokenWrapper.CallOpts) +} + +// ValueDivisor is a free data retrieval call binding the contract method 0x728a99ee. +// +// Solidity: function _valueDivisor() view returns(uint256) +func (_TokenWrapper *TokenWrapperCaller) ValueDivisor(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TokenWrapper.contract.Call(opts, &out, "_valueDivisor") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ValueDivisor is a free data retrieval call binding the contract method 0x728a99ee. +// +// Solidity: function _valueDivisor() view returns(uint256) +func (_TokenWrapper *TokenWrapperSession) ValueDivisor() (*big.Int, error) { + return _TokenWrapper.Contract.ValueDivisor(&_TokenWrapper.CallOpts) +} + +// ValueDivisor is a free data retrieval call binding the contract method 0x728a99ee. +// +// Solidity: function _valueDivisor() view returns(uint256) +func (_TokenWrapper *TokenWrapperCallerSession) ValueDivisor() (*big.Int, error) { + return _TokenWrapper.Contract.ValueDivisor(&_TokenWrapper.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x3e118dbe. +// +// Solidity: function _version() view returns(uint256) +func (_TokenWrapper *TokenWrapperCaller) Version(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TokenWrapper.contract.Call(opts, &out, "_version") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x3e118dbe. +// +// Solidity: function _version() view returns(uint256) +func (_TokenWrapper *TokenWrapperSession) Version() (*big.Int, error) { + return _TokenWrapper.Contract.Version(&_TokenWrapper.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x3e118dbe. +// +// Solidity: function _version() view returns(uint256) +func (_TokenWrapper *TokenWrapperCallerSession) Version() (*big.Int, error) { + return _TokenWrapper.Contract.Version(&_TokenWrapper.CallOpts) +} + +// ControlDigitBytes is a free data retrieval call binding the contract method 0xa53dcd72. +// +// Solidity: function controlDigitBytes() view returns(bytes) +func (_TokenWrapper *TokenWrapperCaller) ControlDigitBytes(opts *bind.CallOpts) ([]byte, error) { + var out []interface{} + err := _TokenWrapper.contract.Call(opts, &out, "controlDigitBytes") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// ControlDigitBytes is a free data retrieval call binding the contract method 0xa53dcd72. +// +// Solidity: function controlDigitBytes() view returns(bytes) +func (_TokenWrapper *TokenWrapperSession) ControlDigitBytes() ([]byte, error) { + return _TokenWrapper.Contract.ControlDigitBytes(&_TokenWrapper.CallOpts) +} + +// ControlDigitBytes is a free data retrieval call binding the contract method 0xa53dcd72. +// +// Solidity: function controlDigitBytes() view returns(bytes) +func (_TokenWrapper *TokenWrapperCallerSession) ControlDigitBytes() ([]byte, error) { + return _TokenWrapper.Contract.ControlDigitBytes(&_TokenWrapper.CallOpts) +} + +// DataBytesSize is a free data retrieval call binding the contract method 0xe3ac914b. +// +// Solidity: function dataBytesSize() view returns(uint256) +func (_TokenWrapper *TokenWrapperCaller) DataBytesSize(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TokenWrapper.contract.Call(opts, &out, "dataBytesSize") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// DataBytesSize is a free data retrieval call binding the contract method 0xe3ac914b. +// +// Solidity: function dataBytesSize() view returns(uint256) +func (_TokenWrapper *TokenWrapperSession) DataBytesSize() (*big.Int, error) { + return _TokenWrapper.Contract.DataBytesSize(&_TokenWrapper.CallOpts) +} + +// DataBytesSize is a free data retrieval call binding the contract method 0xe3ac914b. +// +// Solidity: function dataBytesSize() view returns(uint256) +func (_TokenWrapper *TokenWrapperCallerSession) DataBytesSize() (*big.Int, error) { + return _TokenWrapper.Contract.DataBytesSize(&_TokenWrapper.CallOpts) +} + // GetProps is a free data retrieval call binding the contract method 0xec1893b4. // // Solidity: function getProps() view returns(uint256 depositFee, uint256 withdrawFee, uint256 minDeposit, uint256 minWithdraw, uint256 valueDivisor) @@ -465,6 +633,37 @@ func (_TokenWrapper *TokenWrapperCallerSession) HasRole(role [32]byte, account c return _TokenWrapper.Contract.HasRole(&_TokenWrapper.CallOpts, role, account) } +// HrpBytes is a free data retrieval call binding the contract method 0xd37f5598. +// +// Solidity: function hrpBytes() view returns(bytes) +func (_TokenWrapper *TokenWrapperCaller) HrpBytes(opts *bind.CallOpts) ([]byte, error) { + var out []interface{} + err := _TokenWrapper.contract.Call(opts, &out, "hrpBytes") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// HrpBytes is a free data retrieval call binding the contract method 0xd37f5598. +// +// Solidity: function hrpBytes() view returns(bytes) +func (_TokenWrapper *TokenWrapperSession) HrpBytes() ([]byte, error) { + return _TokenWrapper.Contract.HrpBytes(&_TokenWrapper.CallOpts) +} + +// HrpBytes is a free data retrieval call binding the contract method 0xd37f5598. +// +// Solidity: function hrpBytes() view returns(bytes) +func (_TokenWrapper *TokenWrapperCallerSession) HrpBytes() ([]byte, error) { + return _TokenWrapper.Contract.HrpBytes(&_TokenWrapper.CallOpts) +} + // IsBech32Valid is a free data retrieval call binding the contract method 0x8f001d4e. // // Solidity: function isBech32Valid(string toChainAddress) view returns(bool isAddressValid) @@ -942,6 +1141,143 @@ func (_TokenWrapper *TokenWrapperFilterer) ParseGenerateUTokens(log types.Log) ( return event, nil } +// TokenWrapperGenerateUTokensInBatchIterator is returned from FilterGenerateUTokensInBatch and is used to iterate over the raw logs and unpacked data for GenerateUTokensInBatch events raised by the TokenWrapper contract. +type TokenWrapperGenerateUTokensInBatchIterator struct { + Event *TokenWrapperGenerateUTokensInBatch // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TokenWrapperGenerateUTokensInBatchIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TokenWrapperGenerateUTokensInBatch) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TokenWrapperGenerateUTokensInBatch) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TokenWrapperGenerateUTokensInBatchIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenWrapperGenerateUTokensInBatchIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenWrapperGenerateUTokensInBatch represents a GenerateUTokensInBatch event raised by the TokenWrapper contract. +type TokenWrapperGenerateUTokensInBatch struct { + AccountAddress []common.Address + Tokens []*big.Int + FinalTokens []*big.Int + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterGenerateUTokensInBatch is a free log retrieval operation binding the contract event 0xff03029439b5b79825ca34bca1b453f01e01935bdde5210a8af22f19705ca1a3. +// +// Solidity: event GenerateUTokensInBatch(address[] accountAddress, uint256[] tokens, uint256[] finalTokens, uint256 timestamp) +func (_TokenWrapper *TokenWrapperFilterer) FilterGenerateUTokensInBatch(opts *bind.FilterOpts) (*TokenWrapperGenerateUTokensInBatchIterator, error) { + + logs, sub, err := _TokenWrapper.contract.FilterLogs(opts, "GenerateUTokensInBatch") + if err != nil { + return nil, err + } + return &TokenWrapperGenerateUTokensInBatchIterator{contract: _TokenWrapper.contract, event: "GenerateUTokensInBatch", logs: logs, sub: sub}, nil +} + +// WatchGenerateUTokensInBatch is a free log subscription operation binding the contract event 0xff03029439b5b79825ca34bca1b453f01e01935bdde5210a8af22f19705ca1a3. +// +// Solidity: event GenerateUTokensInBatch(address[] accountAddress, uint256[] tokens, uint256[] finalTokens, uint256 timestamp) +func (_TokenWrapper *TokenWrapperFilterer) WatchGenerateUTokensInBatch(opts *bind.WatchOpts, sink chan<- *TokenWrapperGenerateUTokensInBatch) (event.Subscription, error) { + + logs, sub, err := _TokenWrapper.contract.WatchLogs(opts, "GenerateUTokensInBatch") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TokenWrapperGenerateUTokensInBatch) + if err := _TokenWrapper.contract.UnpackLog(event, "GenerateUTokensInBatch", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseGenerateUTokensInBatch is a log parse operation binding the contract event 0xff03029439b5b79825ca34bca1b453f01e01935bdde5210a8af22f19705ca1a3. +// +// Solidity: event GenerateUTokensInBatch(address[] accountAddress, uint256[] tokens, uint256[] finalTokens, uint256 timestamp) +func (_TokenWrapper *TokenWrapperFilterer) ParseGenerateUTokensInBatch(log types.Log) (*TokenWrapperGenerateUTokensInBatch, error) { + event := new(TokenWrapperGenerateUTokensInBatch) + if err := _TokenWrapper.contract.UnpackLog(event, "GenerateUTokensInBatch", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // TokenWrapperPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the TokenWrapper contract. type TokenWrapperPausedIterator struct { Event *TokenWrapperPaused // Event containing the contract specifics and raw log @@ -1638,10 +1974,19 @@ type TokenWrapperSetFees struct { // FilterSetFees is a free log retrieval operation binding the contract event 0x3be6e637f54f081a2dd12982cfd58481304fc98b604b18fa8ed4aa4e4a9d1532. // -// Solidity: event SetFees(uint256 depositFee, uint256 withdrawFee) -func (_TokenWrapper *TokenWrapperFilterer) FilterSetFees(opts *bind.FilterOpts) (*TokenWrapperSetFeesIterator, error) { +// Solidity: event SetFees(uint256 indexed depositFee, uint256 indexed withdrawFee) +func (_TokenWrapper *TokenWrapperFilterer) FilterSetFees(opts *bind.FilterOpts, depositFee []*big.Int, withdrawFee []*big.Int) (*TokenWrapperSetFeesIterator, error) { - logs, sub, err := _TokenWrapper.contract.FilterLogs(opts, "SetFees") + var depositFeeRule []interface{} + for _, depositFeeItem := range depositFee { + depositFeeRule = append(depositFeeRule, depositFeeItem) + } + var withdrawFeeRule []interface{} + for _, withdrawFeeItem := range withdrawFee { + withdrawFeeRule = append(withdrawFeeRule, withdrawFeeItem) + } + + logs, sub, err := _TokenWrapper.contract.FilterLogs(opts, "SetFees", depositFeeRule, withdrawFeeRule) if err != nil { return nil, err } @@ -1650,10 +1995,19 @@ func (_TokenWrapper *TokenWrapperFilterer) FilterSetFees(opts *bind.FilterOpts) // WatchSetFees is a free log subscription operation binding the contract event 0x3be6e637f54f081a2dd12982cfd58481304fc98b604b18fa8ed4aa4e4a9d1532. // -// Solidity: event SetFees(uint256 depositFee, uint256 withdrawFee) -func (_TokenWrapper *TokenWrapperFilterer) WatchSetFees(opts *bind.WatchOpts, sink chan<- *TokenWrapperSetFees) (event.Subscription, error) { +// Solidity: event SetFees(uint256 indexed depositFee, uint256 indexed withdrawFee) +func (_TokenWrapper *TokenWrapperFilterer) WatchSetFees(opts *bind.WatchOpts, sink chan<- *TokenWrapperSetFees, depositFee []*big.Int, withdrawFee []*big.Int) (event.Subscription, error) { + + var depositFeeRule []interface{} + for _, depositFeeItem := range depositFee { + depositFeeRule = append(depositFeeRule, depositFeeItem) + } + var withdrawFeeRule []interface{} + for _, withdrawFeeItem := range withdrawFee { + withdrawFeeRule = append(withdrawFeeRule, withdrawFeeItem) + } - logs, sub, err := _TokenWrapper.contract.WatchLogs(opts, "SetFees") + logs, sub, err := _TokenWrapper.contract.WatchLogs(opts, "SetFees", depositFeeRule, withdrawFeeRule) if err != nil { return nil, err } @@ -1687,7 +2041,7 @@ func (_TokenWrapper *TokenWrapperFilterer) WatchSetFees(opts *bind.WatchOpts, si // ParseSetFees is a log parse operation binding the contract event 0x3be6e637f54f081a2dd12982cfd58481304fc98b604b18fa8ed4aa4e4a9d1532. // -// Solidity: event SetFees(uint256 depositFee, uint256 withdrawFee) +// Solidity: event SetFees(uint256 indexed depositFee, uint256 indexed withdrawFee) func (_TokenWrapper *TokenWrapperFilterer) ParseSetFees(log types.Log) (*TokenWrapperSetFees, error) { event := new(TokenWrapperSetFees) if err := _TokenWrapper.contract.UnpackLog(event, "SetFees", log); err != nil { @@ -1773,10 +2127,19 @@ type TokenWrapperSetMinimumValues struct { // FilterSetMinimumValues is a free log retrieval operation binding the contract event 0xa94d40347449ea19b873d64ed55c99772194c49791e82be5c2dc24e4c0044fe3. // -// Solidity: event SetMinimumValues(uint256 minDeposit, uint256 minWithdraw) -func (_TokenWrapper *TokenWrapperFilterer) FilterSetMinimumValues(opts *bind.FilterOpts) (*TokenWrapperSetMinimumValuesIterator, error) { +// Solidity: event SetMinimumValues(uint256 indexed minDeposit, uint256 indexed minWithdraw) +func (_TokenWrapper *TokenWrapperFilterer) FilterSetMinimumValues(opts *bind.FilterOpts, minDeposit []*big.Int, minWithdraw []*big.Int) (*TokenWrapperSetMinimumValuesIterator, error) { - logs, sub, err := _TokenWrapper.contract.FilterLogs(opts, "SetMinimumValues") + var minDepositRule []interface{} + for _, minDepositItem := range minDeposit { + minDepositRule = append(minDepositRule, minDepositItem) + } + var minWithdrawRule []interface{} + for _, minWithdrawItem := range minWithdraw { + minWithdrawRule = append(minWithdrawRule, minWithdrawItem) + } + + logs, sub, err := _TokenWrapper.contract.FilterLogs(opts, "SetMinimumValues", minDepositRule, minWithdrawRule) if err != nil { return nil, err } @@ -1785,10 +2148,19 @@ func (_TokenWrapper *TokenWrapperFilterer) FilterSetMinimumValues(opts *bind.Fil // WatchSetMinimumValues is a free log subscription operation binding the contract event 0xa94d40347449ea19b873d64ed55c99772194c49791e82be5c2dc24e4c0044fe3. // -// Solidity: event SetMinimumValues(uint256 minDeposit, uint256 minWithdraw) -func (_TokenWrapper *TokenWrapperFilterer) WatchSetMinimumValues(opts *bind.WatchOpts, sink chan<- *TokenWrapperSetMinimumValues) (event.Subscription, error) { +// Solidity: event SetMinimumValues(uint256 indexed minDeposit, uint256 indexed minWithdraw) +func (_TokenWrapper *TokenWrapperFilterer) WatchSetMinimumValues(opts *bind.WatchOpts, sink chan<- *TokenWrapperSetMinimumValues, minDeposit []*big.Int, minWithdraw []*big.Int) (event.Subscription, error) { - logs, sub, err := _TokenWrapper.contract.WatchLogs(opts, "SetMinimumValues") + var minDepositRule []interface{} + for _, minDepositItem := range minDeposit { + minDepositRule = append(minDepositRule, minDepositItem) + } + var minWithdrawRule []interface{} + for _, minWithdrawItem := range minWithdraw { + minWithdrawRule = append(minWithdrawRule, minWithdrawItem) + } + + logs, sub, err := _TokenWrapper.contract.WatchLogs(opts, "SetMinimumValues", minDepositRule, minWithdrawRule) if err != nil { return nil, err } @@ -1822,7 +2194,7 @@ func (_TokenWrapper *TokenWrapperFilterer) WatchSetMinimumValues(opts *bind.Watc // ParseSetMinimumValues is a log parse operation binding the contract event 0xa94d40347449ea19b873d64ed55c99772194c49791e82be5c2dc24e4c0044fe3. // -// Solidity: event SetMinimumValues(uint256 minDeposit, uint256 minWithdraw) +// Solidity: event SetMinimumValues(uint256 indexed minDeposit, uint256 indexed minWithdraw) func (_TokenWrapper *TokenWrapperFilterer) ParseSetMinimumValues(log types.Log) (*TokenWrapperSetMinimumValues, error) { event := new(TokenWrapperSetMinimumValues) if err := _TokenWrapper.contract.UnpackLog(event, "SetMinimumValues", log); err != nil { @@ -2275,3 +2647,167 @@ func (_TokenWrapper *TokenWrapperFilterer) ParseWithdrawUTokens(log types.Log) ( event.Raw = log return event, nil } + +// TokenWrapperWithdrawUTokensV2Iterator is returned from FilterWithdrawUTokensV2 and is used to iterate over the raw logs and unpacked data for WithdrawUTokensV2 events raised by the TokenWrapper contract. +type TokenWrapperWithdrawUTokensV2Iterator struct { + Event *TokenWrapperWithdrawUTokensV2 // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TokenWrapperWithdrawUTokensV2Iterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TokenWrapperWithdrawUTokensV2) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TokenWrapperWithdrawUTokensV2) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TokenWrapperWithdrawUTokensV2Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TokenWrapperWithdrawUTokensV2Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TokenWrapperWithdrawUTokensV2 represents a WithdrawUTokensV2 event raised by the TokenWrapper contract. +type TokenWrapperWithdrawUTokensV2 struct { + AccountAddress common.Address + Tokens *big.Int + FinalTokens *big.Int + ToChainAddress string + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawUTokensV2 is a free log retrieval operation binding the contract event 0xacd6b7185718e9703bde3bd9dfa3e0f6f9f9b88968d4412acd10cb7d81665248. +// +// Solidity: event WithdrawUTokensV2(address indexed accountAddress, uint256 indexed tokens, uint256 indexed finalTokens, string toChainAddress, uint256 timestamp) +func (_TokenWrapper *TokenWrapperFilterer) FilterWithdrawUTokensV2(opts *bind.FilterOpts, accountAddress []common.Address, tokens []*big.Int, finalTokens []*big.Int) (*TokenWrapperWithdrawUTokensV2Iterator, error) { + + var accountAddressRule []interface{} + for _, accountAddressItem := range accountAddress { + accountAddressRule = append(accountAddressRule, accountAddressItem) + } + var tokensRule []interface{} + for _, tokensItem := range tokens { + tokensRule = append(tokensRule, tokensItem) + } + var finalTokensRule []interface{} + for _, finalTokensItem := range finalTokens { + finalTokensRule = append(finalTokensRule, finalTokensItem) + } + + logs, sub, err := _TokenWrapper.contract.FilterLogs(opts, "WithdrawUTokensV2", accountAddressRule, tokensRule, finalTokensRule) + if err != nil { + return nil, err + } + return &TokenWrapperWithdrawUTokensV2Iterator{contract: _TokenWrapper.contract, event: "WithdrawUTokensV2", logs: logs, sub: sub}, nil +} + +// WatchWithdrawUTokensV2 is a free log subscription operation binding the contract event 0xacd6b7185718e9703bde3bd9dfa3e0f6f9f9b88968d4412acd10cb7d81665248. +// +// Solidity: event WithdrawUTokensV2(address indexed accountAddress, uint256 indexed tokens, uint256 indexed finalTokens, string toChainAddress, uint256 timestamp) +func (_TokenWrapper *TokenWrapperFilterer) WatchWithdrawUTokensV2(opts *bind.WatchOpts, sink chan<- *TokenWrapperWithdrawUTokensV2, accountAddress []common.Address, tokens []*big.Int, finalTokens []*big.Int) (event.Subscription, error) { + + var accountAddressRule []interface{} + for _, accountAddressItem := range accountAddress { + accountAddressRule = append(accountAddressRule, accountAddressItem) + } + var tokensRule []interface{} + for _, tokensItem := range tokens { + tokensRule = append(tokensRule, tokensItem) + } + var finalTokensRule []interface{} + for _, finalTokensItem := range finalTokens { + finalTokensRule = append(finalTokensRule, finalTokensItem) + } + + logs, sub, err := _TokenWrapper.contract.WatchLogs(opts, "WithdrawUTokensV2", accountAddressRule, tokensRule, finalTokensRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TokenWrapperWithdrawUTokensV2) + if err := _TokenWrapper.contract.UnpackLog(event, "WithdrawUTokensV2", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWithdrawUTokensV2 is a log parse operation binding the contract event 0xacd6b7185718e9703bde3bd9dfa3e0f6f9f9b88968d4412acd10cb7d81665248. +// +// Solidity: event WithdrawUTokensV2(address indexed accountAddress, uint256 indexed tokens, uint256 indexed finalTokens, string toChainAddress, uint256 timestamp) +func (_TokenWrapper *TokenWrapperFilterer) ParseWithdrawUTokensV2(log types.Log) (*TokenWrapperWithdrawUTokensV2, error) { + event := new(TokenWrapperWithdrawUTokensV2) + if err := _TokenWrapper.contract.UnpackLog(event, "WithdrawUTokensV2", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +}