diff --git a/changelog.md b/changelog.md index 1a54004b0e..4aeca2aba5 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,7 @@ ### Refactor * [3332](https://github.com/zeta-chain/node/pull/3332) - implement orchestrator V2. Move BTC observer-signer to V2 +* [3360](https://github.com/zeta-chain/node/pull/3360) - update protocol contract imports using consolidated path * [3349](https://github.com/zeta-chain/node/pull/3349) - implement new bitcoin rpc in zetaclient with improved performance and observability ## v25.0.0 diff --git a/cmd/zetae2e/config/contracts.go b/cmd/zetae2e/config/contracts.go index f6246b5e73..e57aadea48 100644 --- a/cmd/zetae2e/config/contracts.go +++ b/cmd/zetae2e/config/contracts.go @@ -4,17 +4,15 @@ import ( "fmt" "github.com/gagliardetto/solana-go" - zetaeth "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zeta.eth.sol" - zetaconnectoreth "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.eth.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/wzeta.sol" - connectorzevm "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/zetaconnectorzevm.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-core/contracts/uniswapv2factory.sol" - uniswapv2router "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/wzeta.sol" + zetaeth "github.com/zeta-chain/protocol-contracts/pkg/zeta.eth.sol" + zetaconnectoreth "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.eth.sol" + connectorzevm "github.com/zeta-chain/protocol-contracts/pkg/zetaconnectorzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/e2e/config" "github.com/zeta-chain/node/e2e/contracts/contextapp" @@ -22,6 +20,8 @@ import ( "github.com/zeta-chain/node/e2e/contracts/zevmswap" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/pkg/contracts/testdappv2" + "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-core/contracts/uniswapv2factory.sol" + uniswapv2router "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-periphery/contracts/uniswapv2router02.sol" ) // setContractsFromConfig get EVM contracts from config diff --git a/cmd/zetae2e/stress.go b/cmd/zetae2e/stress.go index d38cbd1283..ea3067ac63 100644 --- a/cmd/zetae2e/stress.go +++ b/cmd/zetae2e/stress.go @@ -14,7 +14,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/fatih/color" "github.com/spf13/cobra" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "google.golang.org/grpc" zetae2econfig "github.com/zeta-chain/node/cmd/zetae2e/config" diff --git a/cmd/zetatool/filterdeposit/evm.go b/cmd/zetatool/filterdeposit/evm.go index f4278b2fdb..9ed723cafe 100644 --- a/cmd/zetatool/filterdeposit/evm.go +++ b/cmd/zetatool/filterdeposit/evm.go @@ -13,8 +13,8 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/nanmu42/etherscan-api" "github.com/spf13/cobra" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.non-eth.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.non-eth.sol" "github.com/zeta-chain/node/cmd/zetatool/config" "github.com/zeta-chain/node/pkg/constant" diff --git a/codecov.yml b/codecov.yml index 092dd4baa4..784ea89482 100644 --- a/codecov.yml +++ b/codecov.yml @@ -82,3 +82,4 @@ ignore: - "precompiles/**/*.sol" - "precompiles/**/*.gen.go" - "simulation/*.go" + - "pkg/contracts/**/*.go" diff --git a/contrib/localnet/orchestrator/start-zetae2e.sh b/contrib/localnet/orchestrator/start-zetae2e.sh index 03c6f192cf..f12b75f75b 100644 --- a/contrib/localnet/orchestrator/start-zetae2e.sh +++ b/contrib/localnet/orchestrator/start-zetae2e.sh @@ -266,9 +266,9 @@ if [ "$LOCALNET_MODE" == "upgrade" ]; then # When the upgrade height is greater than 100 for upgrade test, the Bitcoin tests have been run once, therefore the Bitcoin wallet is already set up # Use light flag to skip advanced tests if [ "$UPGRADE_HEIGHT" -lt 100 ]; then - zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --light --upgrade-contracts ${COMMON_ARGS} + zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --light ${COMMON_ARGS} else - zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --skip-bitcoin-setup --light --upgrade-contracts ${COMMON_ARGS} + zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --skip-bitcoin-setup --light ${COMMON_ARGS} fi ZETAE2E_EXIT_CODE=$? diff --git a/contrib/rpctest/main.go b/contrib/rpctest/main.go index f0a5e0d868..420f2ce371 100644 --- a/contrib/rpctest/main.go +++ b/contrib/rpctest/main.go @@ -16,8 +16,8 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" - zetaeth "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zeta.eth.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" + zetaeth "github.com/zeta-chain/protocol-contracts/pkg/zeta.eth.sol" ) var ( diff --git a/e2e/e2etests/legacy/test_message_passing_external_chains.go b/e2e/e2etests/legacy/test_message_passing_external_chains.go index 8c1447f1f0..14b462f234 100644 --- a/e2e/e2etests/legacy/test_message_passing_external_chains.go +++ b/e2e/e2etests/legacy/test_message_passing_external_chains.go @@ -5,7 +5,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - zetaconnectoreth "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.eth.sol" + zetaconnectoreth "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.eth.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/legacy/test_message_passing_external_chains_revert_fail.go b/e2e/e2etests/legacy/test_message_passing_external_chains_revert_fail.go index 07d37b81c8..75877d87a7 100644 --- a/e2e/e2etests/legacy/test_message_passing_external_chains_revert_fail.go +++ b/e2e/e2etests/legacy/test_message_passing_external_chains_revert_fail.go @@ -6,7 +6,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - zetaconnectoreth "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.eth.sol" + zetaconnectoreth "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.eth.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/legacy/test_zeta_withdraw_bitcoin_revert.go b/e2e/e2etests/legacy/test_zeta_withdraw_bitcoin_revert.go index 88504a87c4..cef20c2151 100644 --- a/e2e/e2etests/legacy/test_zeta_withdraw_bitcoin_revert.go +++ b/e2e/e2etests/legacy/test_zeta_withdraw_bitcoin_revert.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/stretchr/testify/require" - connectorzevm "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/zetaconnectorzevm.sol" + connectorzevm "github.com/zeta-chain/protocol-contracts/pkg/zetaconnectorzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_deposit_and_call_out_of_gas.go b/e2e/e2etests/test_deposit_and_call_out_of_gas.go index 4539f80d67..4d988ac5a9 100644 --- a/e2e/e2etests/test_deposit_and_call_out_of_gas.go +++ b/e2e/e2etests/test_deposit_and_call_out_of_gas.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/contracts/testgasconsumer" "github.com/zeta-chain/node/e2e/runner" diff --git a/e2e/e2etests/test_deposit_and_call_swap.go b/e2e/e2etests/test_deposit_and_call_swap.go index 651e8ec5b8..158071d5ff 100644 --- a/e2e/e2etests/test_deposit_and_call_swap.go +++ b/e2e/e2etests/test_deposit_and_call_swap.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_deposit.go b/e2e/e2etests/test_erc20_deposit.go index bddbf50dc6..83d0b008a2 100644 --- a/e2e/e2etests/test_erc20_deposit.go +++ b/e2e/e2etests/test_erc20_deposit.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_deposit_and_call.go b/e2e/e2etests/test_erc20_deposit_and_call.go index 5cf834383f..14d1043d50 100644 --- a/e2e/e2etests/test_erc20_deposit_and_call.go +++ b/e2e/e2etests/test_erc20_deposit_and_call.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_deposit_and_call_no_message.go b/e2e/e2etests/test_erc20_deposit_and_call_no_message.go index 3eefb2a740..89b46e425e 100644 --- a/e2e/e2etests/test_erc20_deposit_and_call_no_message.go +++ b/e2e/e2etests/test_erc20_deposit_and_call_no_message.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_deposit_and_call_revert.go b/e2e/e2etests/test_erc20_deposit_and_call_revert.go index f790f15f92..5a25a92de5 100644 --- a/e2e/e2etests/test_erc20_deposit_and_call_revert.go +++ b/e2e/e2etests/test_erc20_deposit_and_call_revert.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_deposit_and_call_revert_with_call.go b/e2e/e2etests/test_erc20_deposit_and_call_revert_with_call.go index 1485bada38..b5a539e366 100644 --- a/e2e/e2etests/test_erc20_deposit_and_call_revert_with_call.go +++ b/e2e/e2etests/test_erc20_deposit_and_call_revert_with_call.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_deposit_restricted_address.go b/e2e/e2etests/test_erc20_deposit_restricted_address.go index 760c5c0779..8101dfab12 100644 --- a/e2e/e2etests/test_erc20_deposit_restricted_address.go +++ b/e2e/e2etests/test_erc20_deposit_restricted_address.go @@ -5,7 +5,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_withdraw.go b/e2e/e2etests/test_erc20_withdraw.go index 3acb891a70..5739047fee 100644 --- a/e2e/e2etests/test_erc20_withdraw.go +++ b/e2e/e2etests/test_erc20_withdraw.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_withdraw_and_arbitrary_call.go b/e2e/e2etests/test_erc20_withdraw_and_arbitrary_call.go index 6aca38a891..9e1a4d6159 100644 --- a/e2e/e2etests/test_erc20_withdraw_and_arbitrary_call.go +++ b/e2e/e2etests/test_erc20_withdraw_and_arbitrary_call.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_withdraw_and_call.go b/e2e/e2etests/test_erc20_withdraw_and_call.go index 55834cbb20..b41963338d 100644 --- a/e2e/e2etests/test_erc20_withdraw_and_call.go +++ b/e2e/e2etests/test_erc20_withdraw_and_call.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_withdraw_and_call_no_message.go b/e2e/e2etests/test_erc20_withdraw_and_call_no_message.go index 1eecd76db2..28554e80f6 100644 --- a/e2e/e2etests/test_erc20_withdraw_and_call_no_message.go +++ b/e2e/e2etests/test_erc20_withdraw_and_call_no_message.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_withdraw_and_call_revert.go b/e2e/e2etests/test_erc20_withdraw_and_call_revert.go index 326cea03ff..e62f6df9d2 100644 --- a/e2e/e2etests/test_erc20_withdraw_and_call_revert.go +++ b/e2e/e2etests/test_erc20_withdraw_and_call_revert.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_erc20_withdraw_and_call_revert_with_call.go b/e2e/e2etests/test_erc20_withdraw_and_call_revert_with_call.go index dfc6d3f9b5..e7a89b7978 100644 --- a/e2e/e2etests/test_erc20_withdraw_and_call_revert_with_call.go +++ b/e2e/e2etests/test_erc20_withdraw_and_call_revert_with_call.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_deposit.go b/e2e/e2etests/test_eth_deposit.go index 72dcf05040..59c0c42dba 100644 --- a/e2e/e2etests/test_eth_deposit.go +++ b/e2e/e2etests/test_eth_deposit.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_deposit_and_call.go b/e2e/e2etests/test_eth_deposit_and_call.go index badc6c5b53..fdddcdf1ac 100644 --- a/e2e/e2etests/test_eth_deposit_and_call.go +++ b/e2e/e2etests/test_eth_deposit_and_call.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_deposit_and_call_no_message.go b/e2e/e2etests/test_eth_deposit_and_call_no_message.go index 92332e36fd..b4b01cbbce 100644 --- a/e2e/e2etests/test_eth_deposit_and_call_no_message.go +++ b/e2e/e2etests/test_eth_deposit_and_call_no_message.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_deposit_and_call_revert.go b/e2e/e2etests/test_eth_deposit_and_call_revert.go index 11f01c830e..0e26f0b117 100644 --- a/e2e/e2etests/test_eth_deposit_and_call_revert.go +++ b/e2e/e2etests/test_eth_deposit_and_call_revert.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_deposit_and_call_revert_with_call.go b/e2e/e2etests/test_eth_deposit_and_call_revert_with_call.go index f1dad6c589..a515cc3d3e 100644 --- a/e2e/e2etests/test_eth_deposit_and_call_revert_with_call.go +++ b/e2e/e2etests/test_eth_deposit_and_call_revert_with_call.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_withdraw.go b/e2e/e2etests/test_eth_withdraw.go index c91de4ef11..09986e5917 100644 --- a/e2e/e2etests/test_eth_withdraw.go +++ b/e2e/e2etests/test_eth_withdraw.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_withdraw_and_arbitrary_call.go b/e2e/e2etests/test_eth_withdraw_and_arbitrary_call.go index c4605f3c46..ad28f1f811 100644 --- a/e2e/e2etests/test_eth_withdraw_and_arbitrary_call.go +++ b/e2e/e2etests/test_eth_withdraw_and_arbitrary_call.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_withdraw_and_call.go b/e2e/e2etests/test_eth_withdraw_and_call.go index 071b5bee89..7aef358c1f 100644 --- a/e2e/e2etests/test_eth_withdraw_and_call.go +++ b/e2e/e2etests/test_eth_withdraw_and_call.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_withdraw_and_call_no_message.go b/e2e/e2etests/test_eth_withdraw_and_call_no_message.go index c6a0130f46..3943b16442 100644 --- a/e2e/e2etests/test_eth_withdraw_and_call_no_message.go +++ b/e2e/e2etests/test_eth_withdraw_and_call_no_message.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_withdraw_and_call_revert.go b/e2e/e2etests/test_eth_withdraw_and_call_revert.go index a990229788..a1b640e6d2 100644 --- a/e2e/e2etests/test_eth_withdraw_and_call_revert.go +++ b/e2e/e2etests/test_eth_withdraw_and_call_revert.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_withdraw_and_call_revert_with_call.go b/e2e/e2etests/test_eth_withdraw_and_call_revert_with_call.go index 22155bd273..9e9498a6cc 100644 --- a/e2e/e2etests/test_eth_withdraw_and_call_revert_with_call.go +++ b/e2e/e2etests/test_eth_withdraw_and_call_revert_with_call.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_eth_withdraw_restricted_address.go b/e2e/e2etests/test_eth_withdraw_restricted_address.go index e149e6db30..b2795eeffa 100644 --- a/e2e/e2etests/test_eth_withdraw_restricted_address.go +++ b/e2e/e2etests/test_eth_withdraw_restricted_address.go @@ -5,7 +5,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_evm_to_zevm_call.go b/e2e/e2etests/test_evm_to_zevm_call.go index 0e58ad8704..c7b09eb3a7 100644 --- a/e2e/e2etests/test_evm_to_zevm_call.go +++ b/e2e/e2etests/test_evm_to_zevm_call.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_inbound_trackers.go b/e2e/e2etests/test_inbound_trackers.go index 27d67c39f5..622a2d4008 100644 --- a/e2e/e2etests/test_inbound_trackers.go +++ b/e2e/e2etests/test_inbound_trackers.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_migrate_chain_support.go b/e2e/e2etests/test_migrate_chain_support.go index 975fa60912..1dbeb88582 100644 --- a/e2e/e2etests/test_migrate_chain_support.go +++ b/e2e/e2etests/test_migrate_chain_support.go @@ -12,7 +12,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/fatih/color" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/e2e/config" "github.com/zeta-chain/node/e2e/e2etests/legacy" diff --git a/e2e/e2etests/test_whitelist_erc20.go b/e2e/e2etests/test_whitelist_erc20.go index f1a44b57de..a375a2863f 100644 --- a/e2e/e2etests/test_whitelist_erc20.go +++ b/e2e/e2etests/test_whitelist_erc20.go @@ -7,7 +7,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/e2e/contracts/erc20" "github.com/zeta-chain/node/e2e/runner" diff --git a/e2e/e2etests/test_zevm_to_evm_arbitrary_call.go b/e2e/e2etests/test_zevm_to_evm_arbitrary_call.go index 0002d5b0b6..60777b3069 100644 --- a/e2e/e2etests/test_zevm_to_evm_arbitrary_call.go +++ b/e2e/e2etests/test_zevm_to_evm_arbitrary_call.go @@ -4,7 +4,7 @@ import ( "math/big" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/e2etests/test_zevm_to_evm_call.go b/e2e/e2etests/test_zevm_to_evm_call.go index 198a8476ec..b457937fe4 100644 --- a/e2e/e2etests/test_zevm_to_evm_call.go +++ b/e2e/e2etests/test_zevm_to_evm_call.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/runner/balances.go b/e2e/runner/balances.go index cb2d8b3c05..bf19408934 100644 --- a/e2e/runner/balances.go +++ b/e2e/runner/balances.go @@ -10,7 +10,7 @@ import ( "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" "github.com/pkg/errors" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" ) var errNilZRC20 = errors.New("zrc20 contract is nil") diff --git a/e2e/runner/evm.go b/e2e/runner/evm.go index 1b3e6780cc..1bfede2f03 100644 --- a/e2e/runner/evm.go +++ b/e2e/runner/evm.go @@ -10,7 +10,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/utils" "github.com/zeta-chain/node/pkg/constant" diff --git a/e2e/runner/legacy_setup_evm.go b/e2e/runner/legacy_setup_evm.go index 4d2af6e5b8..e7531e4563 100644 --- a/e2e/runner/legacy_setup_evm.go +++ b/e2e/runner/legacy_setup_evm.go @@ -7,8 +7,8 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - zetaeth "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zeta.eth.sol" - zetaconnectoreth "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.eth.sol" + zetaeth "github.com/zeta-chain/protocol-contracts/pkg/zeta.eth.sol" + zetaconnectoreth "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.eth.sol" "github.com/zeta-chain/node/e2e/config" "github.com/zeta-chain/node/e2e/contracts/testdapp" diff --git a/e2e/runner/legacy_zevm.go b/e2e/runner/legacy_zevm.go index 7158c203d9..e4915ffa92 100644 --- a/e2e/runner/legacy_zevm.go +++ b/e2e/runner/legacy_zevm.go @@ -6,8 +6,8 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - zetaconnectoreth "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.eth.sol" - connectorzevm "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/zetaconnectorzevm.sol" + zetaconnectoreth "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.eth.sol" + connectorzevm "github.com/zeta-chain/protocol-contracts/pkg/zetaconnectorzevm.sol" "github.com/zeta-chain/node/e2e/utils" ) diff --git a/e2e/runner/logger.go b/e2e/runner/logger.go index ba8053de60..b96c2f3009 100644 --- a/e2e/runner/logger.go +++ b/e2e/runner/logger.go @@ -7,8 +7,8 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/fatih/color" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" ) diff --git a/e2e/runner/require.go b/e2e/runner/require.go index 98496c5f25..b2cf551c01 100644 --- a/e2e/runner/require.go +++ b/e2e/runner/require.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/testutil/sample" crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" diff --git a/e2e/runner/runner.go b/e2e/runner/runner.go index 6f32778952..869203a246 100644 --- a/e2e/runner/runner.go +++ b/e2e/runner/runner.go @@ -20,17 +20,15 @@ import ( "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" "github.com/stretchr/testify/require" - zetaeth "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zeta.eth.sol" - zetaconnectoreth "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.eth.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/wzeta.sol" - connectorzevm "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/zetaconnectorzevm.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-core/contracts/uniswapv2factory.sol" - uniswapv2router "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" - erc20custodyv2 "github.com/zeta-chain/protocol-contracts/v2/pkg/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + erc20custodyv2 "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/wzeta.sol" + zetaeth "github.com/zeta-chain/protocol-contracts/pkg/zeta.eth.sol" + zetaconnectoreth "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.eth.sol" + connectorzevm "github.com/zeta-chain/protocol-contracts/pkg/zetaconnectorzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/e2e/config" "github.com/zeta-chain/node/e2e/contracts/contextapp" @@ -41,6 +39,8 @@ import ( "github.com/zeta-chain/node/e2e/utils" "github.com/zeta-chain/node/pkg/contracts/testdappv2" toncontracts "github.com/zeta-chain/node/pkg/contracts/ton" + "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-core/contracts/uniswapv2factory.sol" + uniswapv2router "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-periphery/contracts/uniswapv2router02.sol" authoritytypes "github.com/zeta-chain/node/x/authority/types" crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" emissionstypes "github.com/zeta-chain/node/x/emissions/types" diff --git a/e2e/runner/setup_evm.go b/e2e/runner/setup_evm.go index 6e27f3b301..91923a845c 100644 --- a/e2e/runner/setup_evm.go +++ b/e2e/runner/setup_evm.go @@ -7,8 +7,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - erc20custodyv2 "github.com/zeta-chain/protocol-contracts/v2/pkg/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + erc20custodyv2 "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/contracts/erc20" "github.com/zeta-chain/node/e2e/utils" diff --git a/e2e/runner/setup_zevm.go b/e2e/runner/setup_zevm.go index 2cc858641a..c42b524dd6 100644 --- a/e2e/runner/setup_zevm.go +++ b/e2e/runner/setup_zevm.go @@ -9,19 +9,19 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/wzeta.sol" - connectorzevm "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/zetaconnectorzevm.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-core/contracts/uniswapv2factory.sol" - uniswapv2router "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/wzeta.sol" + connectorzevm "github.com/zeta-chain/protocol-contracts/pkg/zetaconnectorzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/e2e/txserver" e2eutils "github.com/zeta-chain/node/e2e/utils" "github.com/zeta-chain/node/pkg/chains" "github.com/zeta-chain/node/pkg/contracts/erc1967proxy" "github.com/zeta-chain/node/pkg/contracts/testdappv2" + "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-core/contracts/uniswapv2factory.sol" + uniswapv2router "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-periphery/contracts/uniswapv2router02.sol" fungibletypes "github.com/zeta-chain/node/x/fungible/types" observertypes "github.com/zeta-chain/node/x/observer/types" ) diff --git a/e2e/runner/upgrade.go b/e2e/runner/upgrade.go index 5dc7e38e2b..6b1cdba6be 100644 --- a/e2e/runner/upgrade.go +++ b/e2e/runner/upgrade.go @@ -3,9 +3,9 @@ package runner import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/utils" ) diff --git a/e2e/runner/zevm.go b/e2e/runner/zevm.go index 2a020ca23d..a42b8e2a4f 100644 --- a/e2e/runner/zevm.go +++ b/e2e/runner/zevm.go @@ -10,7 +10,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/utils" "github.com/zeta-chain/node/pkg/chains" diff --git a/go.mod b/go.mod index a0169489b7..1fbbc5a941 100644 --- a/go.mod +++ b/go.mod @@ -56,7 +56,7 @@ require ( github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 github.com/zeta-chain/ethermint v0.0.0-20241105191054-1ebf85a354a0 - github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241021075719-d40d2e28467c + github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20250115133723-7232d7838789 gitlab.com/thorchain/tss/go-tss v1.6.5 go.nhat.io/grpcmock v0.25.0 golang.org/x/crypto v0.31.0 diff --git a/go.sum b/go.sum index 4e2c220279..2d70b50dac 100644 --- a/go.sum +++ b/go.sum @@ -1530,6 +1530,8 @@ github.com/zeta-chain/go-tss v0.0.0-20241216161449-be92b20f8102 h1:jMb9ydfDFjgdl github.com/zeta-chain/go-tss v0.0.0-20241216161449-be92b20f8102/go.mod h1:nqelgf4HKkqlXaVg8X38a61WfyYB+ivCt6nnjoTIgCc= github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241021075719-d40d2e28467c h1:ZoFxMMZtivRLquXVq1sEVlT45UnTPMO1MSXtc88nDv4= github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241021075719-d40d2e28467c/go.mod h1:SjT7QirtJE8stnAe1SlNOanxtfSfijJm3MGJ+Ax7w7w= +github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20250115133723-7232d7838789 h1:8DAZ5bgu+1ZbZ+VQh2eW15NPziwMy1g2k5rlKSfUFRI= +github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20250115133723-7232d7838789/go.mod h1:SjT7QirtJE8stnAe1SlNOanxtfSfijJm3MGJ+Ax7w7w= github.com/zeta-chain/protocol-contracts-solana/go-idl v0.0.0-20241108171442-e48d82f94892 h1:oI5qCrw2SXDf2a2UYAn0tpaKHbKpJcR+XDtceyY00wE= github.com/zeta-chain/protocol-contracts-solana/go-idl v0.0.0-20241108171442-e48d82f94892/go.mod h1:DcDY828o773soiU/h0XpC+naxitrIMFVZqEvq/EJxMA= github.com/zeta-chain/tss-lib v0.0.0-20240916163010-2e6b438bd901 h1:9whtN5fjYHfk4yXIuAsYP2EHxImwDWDVUOnZJ2pfL3w= diff --git a/pkg/contracts/uniswap/lib/contracts/libraries/transferhelper.sol/transferhelper.go b/pkg/contracts/uniswap/lib/contracts/libraries/transferhelper.sol/transferhelper.go new file mode 100644 index 0000000000..648cd746cb --- /dev/null +++ b/pkg/contracts/uniswap/lib/contracts/libraries/transferhelper.sol/transferhelper.go @@ -0,0 +1,203 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package transferhelper + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// TransferHelperMetaData contains all meta data concerning the TransferHelper contract. +var TransferHelperMetaData = &bind.MetaData{ + ABI: "[]", + Bin: "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fc8360e2264df1f2cb9f3c42ca667d72961924439936105dfdf91ec11cb5a40964736f6c63430008070033", +} + +// TransferHelperABI is the input ABI used to generate the binding from. +// Deprecated: Use TransferHelperMetaData.ABI instead. +var TransferHelperABI = TransferHelperMetaData.ABI + +// TransferHelperBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use TransferHelperMetaData.Bin instead. +var TransferHelperBin = TransferHelperMetaData.Bin + +// DeployTransferHelper deploys a new Ethereum contract, binding an instance of TransferHelper to it. +func DeployTransferHelper(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *TransferHelper, error) { + parsed, err := TransferHelperMetaData.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(TransferHelperBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &TransferHelper{TransferHelperCaller: TransferHelperCaller{contract: contract}, TransferHelperTransactor: TransferHelperTransactor{contract: contract}, TransferHelperFilterer: TransferHelperFilterer{contract: contract}}, nil +} + +// TransferHelper is an auto generated Go binding around an Ethereum contract. +type TransferHelper struct { + TransferHelperCaller // Read-only binding to the contract + TransferHelperTransactor // Write-only binding to the contract + TransferHelperFilterer // Log filterer for contract events +} + +// TransferHelperCaller is an auto generated read-only Go binding around an Ethereum contract. +type TransferHelperCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TransferHelperTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TransferHelperTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TransferHelperFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TransferHelperFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TransferHelperSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TransferHelperSession struct { + Contract *TransferHelper // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TransferHelperCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TransferHelperCallerSession struct { + Contract *TransferHelperCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TransferHelperTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TransferHelperTransactorSession struct { + Contract *TransferHelperTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TransferHelperRaw is an auto generated low-level Go binding around an Ethereum contract. +type TransferHelperRaw struct { + Contract *TransferHelper // Generic contract binding to access the raw methods on +} + +// TransferHelperCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TransferHelperCallerRaw struct { + Contract *TransferHelperCaller // Generic read-only contract binding to access the raw methods on +} + +// TransferHelperTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TransferHelperTransactorRaw struct { + Contract *TransferHelperTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewTransferHelper creates a new instance of TransferHelper, bound to a specific deployed contract. +func NewTransferHelper(address common.Address, backend bind.ContractBackend) (*TransferHelper, error) { + contract, err := bindTransferHelper(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TransferHelper{TransferHelperCaller: TransferHelperCaller{contract: contract}, TransferHelperTransactor: TransferHelperTransactor{contract: contract}, TransferHelperFilterer: TransferHelperFilterer{contract: contract}}, nil +} + +// NewTransferHelperCaller creates a new read-only instance of TransferHelper, bound to a specific deployed contract. +func NewTransferHelperCaller(address common.Address, caller bind.ContractCaller) (*TransferHelperCaller, error) { + contract, err := bindTransferHelper(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TransferHelperCaller{contract: contract}, nil +} + +// NewTransferHelperTransactor creates a new write-only instance of TransferHelper, bound to a specific deployed contract. +func NewTransferHelperTransactor(address common.Address, transactor bind.ContractTransactor) (*TransferHelperTransactor, error) { + contract, err := bindTransferHelper(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TransferHelperTransactor{contract: contract}, nil +} + +// NewTransferHelperFilterer creates a new log filterer instance of TransferHelper, bound to a specific deployed contract. +func NewTransferHelperFilterer(address common.Address, filterer bind.ContractFilterer) (*TransferHelperFilterer, error) { + contract, err := bindTransferHelper(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TransferHelperFilterer{contract: contract}, nil +} + +// bindTransferHelper binds a generic wrapper to an already deployed contract. +func bindTransferHelper(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := TransferHelperMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_TransferHelper *TransferHelperRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TransferHelper.Contract.TransferHelperCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_TransferHelper *TransferHelperRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TransferHelper.Contract.TransferHelperTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TransferHelper *TransferHelperRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TransferHelper.Contract.TransferHelperTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_TransferHelper *TransferHelperCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TransferHelper.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_TransferHelper *TransferHelperTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TransferHelper.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TransferHelper *TransferHelperTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TransferHelper.Contract.contract.Transact(opts, method, params...) +} diff --git a/pkg/contracts/uniswap/v2-core/contracts/interfaces/ierc20.sol/ierc20.go b/pkg/contracts/uniswap/v2-core/contracts/interfaces/ierc20.sol/ierc20.go new file mode 100644 index 0000000000..31d0fc1f7c --- /dev/null +++ b/pkg/contracts/uniswap/v2-core/contracts/interfaces/ierc20.sol/ierc20.go @@ -0,0 +1,738 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ierc20 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IERC20MetaData contains all meta data concerning the IERC20 contract. +var IERC20MetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IERC20ABI is the input ABI used to generate the binding from. +// Deprecated: Use IERC20MetaData.ABI instead. +var IERC20ABI = IERC20MetaData.ABI + +// IERC20 is an auto generated Go binding around an Ethereum contract. +type IERC20 struct { + IERC20Caller // Read-only binding to the contract + IERC20Transactor // Write-only binding to the contract + IERC20Filterer // Log filterer for contract events +} + +// IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. +type IERC20Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC20Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC20Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC20Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC20Session struct { + Contract *IERC20 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC20CallerSession struct { + Contract *IERC20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC20TransactorSession struct { + Contract *IERC20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. +type IERC20Raw struct { + Contract *IERC20 // Generic contract binding to access the raw methods on +} + +// IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC20CallerRaw struct { + Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on +} + +// IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC20TransactorRaw struct { + Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. +func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { + contract, err := bindIERC20(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil +} + +// NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. +func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { + contract, err := bindIERC20(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC20Caller{contract: contract}, nil +} + +// NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. +func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { + contract, err := bindIERC20(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC20Transactor{contract: contract}, nil +} + +// NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. +func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { + contract, err := bindIERC20(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC20Filterer{contract: contract}, nil +} + +// bindIERC20 binds a generic wrapper to an already deployed contract. +func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IERC20MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IERC20.Contract.IERC20Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC20.Contract.IERC20Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IERC20.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC20.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC20.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "balanceOf", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IERC20 *IERC20Session) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IERC20 *IERC20CallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, owner) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_IERC20 *IERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_IERC20 *IERC20Session) Decimals() (uint8, error) { + return _IERC20.Contract.Decimals(&_IERC20.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_IERC20 *IERC20CallerSession) Decimals() (uint8, error) { + return _IERC20.Contract.Decimals(&_IERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC20 *IERC20Caller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC20 *IERC20Session) Name() (string, error) { + return _IERC20.Contract.Name(&_IERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC20 *IERC20CallerSession) Name() (string, error) { + return _IERC20.Contract.Name(&_IERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC20 *IERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC20 *IERC20Session) Symbol() (string, error) { + return _IERC20.Contract.Symbol(&_IERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC20 *IERC20CallerSession) Symbol() (string, error) { + return _IERC20.Contract.Symbol(&_IERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { + return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { + return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IERC20 *IERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IERC20 *IERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IERC20 *IERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, from, to, value) +} + +// IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. +type IERC20ApprovalIterator struct { + Event *IERC20Approval // 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 *IERC20ApprovalIterator) 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(IERC20Approval) + 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(IERC20Approval) + 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 *IERC20ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC20ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC20Approval represents a Approval event raised by the IERC20 contract. +type IERC20Approval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + 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(IERC20Approval) + if err := _IERC20.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { + event := new(IERC20Approval) + if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. +type IERC20TransferIterator struct { + Event *IERC20Transfer // 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 *IERC20TransferIterator) 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(IERC20Transfer) + 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(IERC20Transfer) + 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 *IERC20TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC20TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC20Transfer represents a Transfer event raised by the IERC20 contract. +type IERC20Transfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + 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(IERC20Transfer) + if err := _IERC20.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { + event := new(IERC20Transfer) + if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2callee.sol/iuniswapv2callee.go b/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2callee.sol/iuniswapv2callee.go new file mode 100644 index 0000000000..f955a7fab7 --- /dev/null +++ b/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2callee.sol/iuniswapv2callee.go @@ -0,0 +1,202 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv2callee + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV2CalleeMetaData contains all meta data concerning the IUniswapV2Callee contract. +var IUniswapV2CalleeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV2Call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IUniswapV2CalleeABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV2CalleeMetaData.ABI instead. +var IUniswapV2CalleeABI = IUniswapV2CalleeMetaData.ABI + +// IUniswapV2Callee is an auto generated Go binding around an Ethereum contract. +type IUniswapV2Callee struct { + IUniswapV2CalleeCaller // Read-only binding to the contract + IUniswapV2CalleeTransactor // Write-only binding to the contract + IUniswapV2CalleeFilterer // Log filterer for contract events +} + +// IUniswapV2CalleeCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV2CalleeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2CalleeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV2CalleeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2CalleeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV2CalleeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2CalleeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV2CalleeSession struct { + Contract *IUniswapV2Callee // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2CalleeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV2CalleeCallerSession struct { + Contract *IUniswapV2CalleeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV2CalleeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV2CalleeTransactorSession struct { + Contract *IUniswapV2CalleeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2CalleeRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV2CalleeRaw struct { + Contract *IUniswapV2Callee // Generic contract binding to access the raw methods on +} + +// IUniswapV2CalleeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV2CalleeCallerRaw struct { + Contract *IUniswapV2CalleeCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV2CalleeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV2CalleeTransactorRaw struct { + Contract *IUniswapV2CalleeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV2Callee creates a new instance of IUniswapV2Callee, bound to a specific deployed contract. +func NewIUniswapV2Callee(address common.Address, backend bind.ContractBackend) (*IUniswapV2Callee, error) { + contract, err := bindIUniswapV2Callee(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV2Callee{IUniswapV2CalleeCaller: IUniswapV2CalleeCaller{contract: contract}, IUniswapV2CalleeTransactor: IUniswapV2CalleeTransactor{contract: contract}, IUniswapV2CalleeFilterer: IUniswapV2CalleeFilterer{contract: contract}}, nil +} + +// NewIUniswapV2CalleeCaller creates a new read-only instance of IUniswapV2Callee, bound to a specific deployed contract. +func NewIUniswapV2CalleeCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV2CalleeCaller, error) { + contract, err := bindIUniswapV2Callee(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV2CalleeCaller{contract: contract}, nil +} + +// NewIUniswapV2CalleeTransactor creates a new write-only instance of IUniswapV2Callee, bound to a specific deployed contract. +func NewIUniswapV2CalleeTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV2CalleeTransactor, error) { + contract, err := bindIUniswapV2Callee(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV2CalleeTransactor{contract: contract}, nil +} + +// NewIUniswapV2CalleeFilterer creates a new log filterer instance of IUniswapV2Callee, bound to a specific deployed contract. +func NewIUniswapV2CalleeFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV2CalleeFilterer, error) { + contract, err := bindIUniswapV2Callee(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV2CalleeFilterer{contract: contract}, nil +} + +// bindIUniswapV2Callee binds a generic wrapper to an already deployed contract. +func bindIUniswapV2Callee(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV2CalleeMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2Callee *IUniswapV2CalleeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2Callee.Contract.IUniswapV2CalleeCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2Callee *IUniswapV2CalleeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2Callee.Contract.IUniswapV2CalleeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2Callee *IUniswapV2CalleeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2Callee.Contract.IUniswapV2CalleeTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2Callee *IUniswapV2CalleeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2Callee.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2Callee *IUniswapV2CalleeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2Callee.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2Callee *IUniswapV2CalleeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2Callee.Contract.contract.Transact(opts, method, params...) +} + +// UniswapV2Call is a paid mutator transaction binding the contract method 0x10d1e85c. +// +// Solidity: function uniswapV2Call(address sender, uint256 amount0, uint256 amount1, bytes data) returns() +func (_IUniswapV2Callee *IUniswapV2CalleeTransactor) UniswapV2Call(opts *bind.TransactOpts, sender common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV2Callee.contract.Transact(opts, "uniswapV2Call", sender, amount0, amount1, data) +} + +// UniswapV2Call is a paid mutator transaction binding the contract method 0x10d1e85c. +// +// Solidity: function uniswapV2Call(address sender, uint256 amount0, uint256 amount1, bytes data) returns() +func (_IUniswapV2Callee *IUniswapV2CalleeSession) UniswapV2Call(sender common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV2Callee.Contract.UniswapV2Call(&_IUniswapV2Callee.TransactOpts, sender, amount0, amount1, data) +} + +// UniswapV2Call is a paid mutator transaction binding the contract method 0x10d1e85c. +// +// Solidity: function uniswapV2Call(address sender, uint256 amount0, uint256 amount1, bytes data) returns() +func (_IUniswapV2Callee *IUniswapV2CalleeTransactorSession) UniswapV2Call(sender common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV2Callee.Contract.UniswapV2Call(&_IUniswapV2Callee.TransactOpts, sender, amount0, amount1, data) +} diff --git a/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2erc20.sol/iuniswapv2erc20.go b/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2erc20.sol/iuniswapv2erc20.go new file mode 100644 index 0000000000..39df569896 --- /dev/null +++ b/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2erc20.sol/iuniswapv2erc20.go @@ -0,0 +1,852 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv2erc20 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV2ERC20MetaData contains all meta data concerning the IUniswapV2ERC20 contract. +var IUniswapV2ERC20MetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IUniswapV2ERC20ABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV2ERC20MetaData.ABI instead. +var IUniswapV2ERC20ABI = IUniswapV2ERC20MetaData.ABI + +// IUniswapV2ERC20 is an auto generated Go binding around an Ethereum contract. +type IUniswapV2ERC20 struct { + IUniswapV2ERC20Caller // Read-only binding to the contract + IUniswapV2ERC20Transactor // Write-only binding to the contract + IUniswapV2ERC20Filterer // Log filterer for contract events +} + +// IUniswapV2ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV2ERC20Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV2ERC20Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV2ERC20Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2ERC20Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV2ERC20Session struct { + Contract *IUniswapV2ERC20 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV2ERC20CallerSession struct { + Contract *IUniswapV2ERC20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV2ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV2ERC20TransactorSession struct { + Contract *IUniswapV2ERC20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV2ERC20Raw struct { + Contract *IUniswapV2ERC20 // Generic contract binding to access the raw methods on +} + +// IUniswapV2ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV2ERC20CallerRaw struct { + Contract *IUniswapV2ERC20Caller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV2ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV2ERC20TransactorRaw struct { + Contract *IUniswapV2ERC20Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV2ERC20 creates a new instance of IUniswapV2ERC20, bound to a specific deployed contract. +func NewIUniswapV2ERC20(address common.Address, backend bind.ContractBackend) (*IUniswapV2ERC20, error) { + contract, err := bindIUniswapV2ERC20(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV2ERC20{IUniswapV2ERC20Caller: IUniswapV2ERC20Caller{contract: contract}, IUniswapV2ERC20Transactor: IUniswapV2ERC20Transactor{contract: contract}, IUniswapV2ERC20Filterer: IUniswapV2ERC20Filterer{contract: contract}}, nil +} + +// NewIUniswapV2ERC20Caller creates a new read-only instance of IUniswapV2ERC20, bound to a specific deployed contract. +func NewIUniswapV2ERC20Caller(address common.Address, caller bind.ContractCaller) (*IUniswapV2ERC20Caller, error) { + contract, err := bindIUniswapV2ERC20(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV2ERC20Caller{contract: contract}, nil +} + +// NewIUniswapV2ERC20Transactor creates a new write-only instance of IUniswapV2ERC20, bound to a specific deployed contract. +func NewIUniswapV2ERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV2ERC20Transactor, error) { + contract, err := bindIUniswapV2ERC20(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV2ERC20Transactor{contract: contract}, nil +} + +// NewIUniswapV2ERC20Filterer creates a new log filterer instance of IUniswapV2ERC20, bound to a specific deployed contract. +func NewIUniswapV2ERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV2ERC20Filterer, error) { + contract, err := bindIUniswapV2ERC20(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV2ERC20Filterer{contract: contract}, nil +} + +// bindIUniswapV2ERC20 binds a generic wrapper to an already deployed contract. +func bindIUniswapV2ERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV2ERC20MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2ERC20 *IUniswapV2ERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2ERC20.Contract.IUniswapV2ERC20Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2ERC20 *IUniswapV2ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.IUniswapV2ERC20Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2ERC20 *IUniswapV2ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.IUniswapV2ERC20Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2ERC20 *IUniswapV2ERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2ERC20.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2ERC20 *IUniswapV2ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2ERC20 *IUniswapV2ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.contract.Transact(opts, method, params...) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Caller) DOMAINSEPARATOR(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _IUniswapV2ERC20.contract.Call(opts, &out, "DOMAIN_SEPARATOR") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) DOMAINSEPARATOR() ([32]byte, error) { + return _IUniswapV2ERC20.Contract.DOMAINSEPARATOR(&_IUniswapV2ERC20.CallOpts) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_IUniswapV2ERC20 *IUniswapV2ERC20CallerSession) DOMAINSEPARATOR() ([32]byte, error) { + return _IUniswapV2ERC20.Contract.DOMAINSEPARATOR(&_IUniswapV2ERC20.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() pure returns(bytes32) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Caller) PERMITTYPEHASH(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _IUniswapV2ERC20.contract.Call(opts, &out, "PERMIT_TYPEHASH") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() pure returns(bytes32) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) PERMITTYPEHASH() ([32]byte, error) { + return _IUniswapV2ERC20.Contract.PERMITTYPEHASH(&_IUniswapV2ERC20.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() pure returns(bytes32) +func (_IUniswapV2ERC20 *IUniswapV2ERC20CallerSession) PERMITTYPEHASH() ([32]byte, error) { + return _IUniswapV2ERC20.Contract.PERMITTYPEHASH(&_IUniswapV2ERC20.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2ERC20.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _IUniswapV2ERC20.Contract.Allowance(&_IUniswapV2ERC20.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _IUniswapV2ERC20.Contract.Allowance(&_IUniswapV2ERC20.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Caller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2ERC20.contract.Call(opts, &out, "balanceOf", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) BalanceOf(owner common.Address) (*big.Int, error) { + return _IUniswapV2ERC20.Contract.BalanceOf(&_IUniswapV2ERC20.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20CallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IUniswapV2ERC20.Contract.BalanceOf(&_IUniswapV2ERC20.CallOpts, owner) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() pure returns(uint8) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _IUniswapV2ERC20.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() pure returns(uint8) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) Decimals() (uint8, error) { + return _IUniswapV2ERC20.Contract.Decimals(&_IUniswapV2ERC20.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() pure returns(uint8) +func (_IUniswapV2ERC20 *IUniswapV2ERC20CallerSession) Decimals() (uint8, error) { + return _IUniswapV2ERC20.Contract.Decimals(&_IUniswapV2ERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() pure returns(string) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Caller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IUniswapV2ERC20.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() pure returns(string) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) Name() (string, error) { + return _IUniswapV2ERC20.Contract.Name(&_IUniswapV2ERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() pure returns(string) +func (_IUniswapV2ERC20 *IUniswapV2ERC20CallerSession) Name() (string, error) { + return _IUniswapV2ERC20.Contract.Name(&_IUniswapV2ERC20.CallOpts) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Caller) Nonces(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2ERC20.contract.Call(opts, &out, "nonces", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) Nonces(owner common.Address) (*big.Int, error) { + return _IUniswapV2ERC20.Contract.Nonces(&_IUniswapV2ERC20.CallOpts, owner) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20CallerSession) Nonces(owner common.Address) (*big.Int, error) { + return _IUniswapV2ERC20.Contract.Nonces(&_IUniswapV2ERC20.CallOpts, owner) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() pure returns(string) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IUniswapV2ERC20.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() pure returns(string) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) Symbol() (string, error) { + return _IUniswapV2ERC20.Contract.Symbol(&_IUniswapV2ERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() pure returns(string) +func (_IUniswapV2ERC20 *IUniswapV2ERC20CallerSession) Symbol() (string, error) { + return _IUniswapV2ERC20.Contract.Symbol(&_IUniswapV2ERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2ERC20.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) TotalSupply() (*big.Int, error) { + return _IUniswapV2ERC20.Contract.TotalSupply(&_IUniswapV2ERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IUniswapV2ERC20 *IUniswapV2ERC20CallerSession) TotalSupply() (*big.Int, error) { + return _IUniswapV2ERC20.Contract.TotalSupply(&_IUniswapV2ERC20.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2ERC20.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.Approve(&_IUniswapV2ERC20.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IUniswapV2ERC20 *IUniswapV2ERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.Approve(&_IUniswapV2ERC20.TransactOpts, spender, value) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_IUniswapV2ERC20 *IUniswapV2ERC20Transactor) Permit(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2ERC20.contract.Transact(opts, "permit", owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.Permit(&_IUniswapV2ERC20.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_IUniswapV2ERC20 *IUniswapV2ERC20TransactorSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.Permit(&_IUniswapV2ERC20.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2ERC20.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.Transfer(&_IUniswapV2ERC20.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IUniswapV2ERC20 *IUniswapV2ERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.Transfer(&_IUniswapV2ERC20.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2ERC20.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.TransferFrom(&_IUniswapV2ERC20.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IUniswapV2ERC20 *IUniswapV2ERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2ERC20.Contract.TransferFrom(&_IUniswapV2ERC20.TransactOpts, from, to, value) +} + +// IUniswapV2ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IUniswapV2ERC20 contract. +type IUniswapV2ERC20ApprovalIterator struct { + Event *IUniswapV2ERC20Approval // 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 *IUniswapV2ERC20ApprovalIterator) 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(IUniswapV2ERC20Approval) + 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(IUniswapV2ERC20Approval) + 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 *IUniswapV2ERC20ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV2ERC20ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV2ERC20Approval represents a Approval event raised by the IUniswapV2ERC20 contract. +type IUniswapV2ERC20Approval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IUniswapV2ERC20ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _IUniswapV2ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &IUniswapV2ERC20ApprovalIterator{contract: _IUniswapV2ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IUniswapV2ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _IUniswapV2ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + 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(IUniswapV2ERC20Approval) + if err := _IUniswapV2ERC20.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Filterer) ParseApproval(log types.Log) (*IUniswapV2ERC20Approval, error) { + event := new(IUniswapV2ERC20Approval) + if err := _IUniswapV2ERC20.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV2ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IUniswapV2ERC20 contract. +type IUniswapV2ERC20TransferIterator struct { + Event *IUniswapV2ERC20Transfer // 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 *IUniswapV2ERC20TransferIterator) 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(IUniswapV2ERC20Transfer) + 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(IUniswapV2ERC20Transfer) + 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 *IUniswapV2ERC20TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV2ERC20TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV2ERC20Transfer represents a Transfer event raised by the IUniswapV2ERC20 contract. +type IUniswapV2ERC20Transfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IUniswapV2ERC20TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IUniswapV2ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &IUniswapV2ERC20TransferIterator{contract: _IUniswapV2ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IUniswapV2ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IUniswapV2ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + 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(IUniswapV2ERC20Transfer) + if err := _IUniswapV2ERC20.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IUniswapV2ERC20 *IUniswapV2ERC20Filterer) ParseTransfer(log types.Log) (*IUniswapV2ERC20Transfer, error) { + event := new(IUniswapV2ERC20Transfer) + if err := _IUniswapV2ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2factory.sol/iuniswapv2factory.go b/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2factory.sol/iuniswapv2factory.go new file mode 100644 index 0000000000..a8ab286095 --- /dev/null +++ b/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2factory.sol/iuniswapv2factory.go @@ -0,0 +1,554 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv2factory + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV2FactoryMetaData contains all meta data concerning the IUniswapV2Factory contract. +var IUniswapV2FactoryMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"PairCreated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allPairs\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allPairsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"}],\"name\":\"createPair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToSetter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"}],\"name\":\"getPair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"setFeeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"setFeeToSetter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IUniswapV2FactoryABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV2FactoryMetaData.ABI instead. +var IUniswapV2FactoryABI = IUniswapV2FactoryMetaData.ABI + +// IUniswapV2Factory is an auto generated Go binding around an Ethereum contract. +type IUniswapV2Factory struct { + IUniswapV2FactoryCaller // Read-only binding to the contract + IUniswapV2FactoryTransactor // Write-only binding to the contract + IUniswapV2FactoryFilterer // Log filterer for contract events +} + +// IUniswapV2FactoryCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV2FactoryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2FactoryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV2FactoryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2FactoryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV2FactoryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2FactorySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV2FactorySession struct { + Contract *IUniswapV2Factory // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2FactoryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV2FactoryCallerSession struct { + Contract *IUniswapV2FactoryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV2FactoryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV2FactoryTransactorSession struct { + Contract *IUniswapV2FactoryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2FactoryRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV2FactoryRaw struct { + Contract *IUniswapV2Factory // Generic contract binding to access the raw methods on +} + +// IUniswapV2FactoryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV2FactoryCallerRaw struct { + Contract *IUniswapV2FactoryCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV2FactoryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV2FactoryTransactorRaw struct { + Contract *IUniswapV2FactoryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV2Factory creates a new instance of IUniswapV2Factory, bound to a specific deployed contract. +func NewIUniswapV2Factory(address common.Address, backend bind.ContractBackend) (*IUniswapV2Factory, error) { + contract, err := bindIUniswapV2Factory(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV2Factory{IUniswapV2FactoryCaller: IUniswapV2FactoryCaller{contract: contract}, IUniswapV2FactoryTransactor: IUniswapV2FactoryTransactor{contract: contract}, IUniswapV2FactoryFilterer: IUniswapV2FactoryFilterer{contract: contract}}, nil +} + +// NewIUniswapV2FactoryCaller creates a new read-only instance of IUniswapV2Factory, bound to a specific deployed contract. +func NewIUniswapV2FactoryCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV2FactoryCaller, error) { + contract, err := bindIUniswapV2Factory(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV2FactoryCaller{contract: contract}, nil +} + +// NewIUniswapV2FactoryTransactor creates a new write-only instance of IUniswapV2Factory, bound to a specific deployed contract. +func NewIUniswapV2FactoryTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV2FactoryTransactor, error) { + contract, err := bindIUniswapV2Factory(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV2FactoryTransactor{contract: contract}, nil +} + +// NewIUniswapV2FactoryFilterer creates a new log filterer instance of IUniswapV2Factory, bound to a specific deployed contract. +func NewIUniswapV2FactoryFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV2FactoryFilterer, error) { + contract, err := bindIUniswapV2Factory(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV2FactoryFilterer{contract: contract}, nil +} + +// bindIUniswapV2Factory binds a generic wrapper to an already deployed contract. +func bindIUniswapV2Factory(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV2FactoryMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2Factory *IUniswapV2FactoryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2Factory.Contract.IUniswapV2FactoryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2Factory *IUniswapV2FactoryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2Factory.Contract.IUniswapV2FactoryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2Factory *IUniswapV2FactoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2Factory.Contract.IUniswapV2FactoryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2Factory *IUniswapV2FactoryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2Factory.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2Factory *IUniswapV2FactoryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2Factory.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2Factory *IUniswapV2FactoryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2Factory.Contract.contract.Transact(opts, method, params...) +} + +// AllPairs is a free data retrieval call binding the contract method 0x1e3dd18b. +// +// Solidity: function allPairs(uint256 ) view returns(address pair) +func (_IUniswapV2Factory *IUniswapV2FactoryCaller) AllPairs(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var out []interface{} + err := _IUniswapV2Factory.contract.Call(opts, &out, "allPairs", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AllPairs is a free data retrieval call binding the contract method 0x1e3dd18b. +// +// Solidity: function allPairs(uint256 ) view returns(address pair) +func (_IUniswapV2Factory *IUniswapV2FactorySession) AllPairs(arg0 *big.Int) (common.Address, error) { + return _IUniswapV2Factory.Contract.AllPairs(&_IUniswapV2Factory.CallOpts, arg0) +} + +// AllPairs is a free data retrieval call binding the contract method 0x1e3dd18b. +// +// Solidity: function allPairs(uint256 ) view returns(address pair) +func (_IUniswapV2Factory *IUniswapV2FactoryCallerSession) AllPairs(arg0 *big.Int) (common.Address, error) { + return _IUniswapV2Factory.Contract.AllPairs(&_IUniswapV2Factory.CallOpts, arg0) +} + +// AllPairsLength is a free data retrieval call binding the contract method 0x574f2ba3. +// +// Solidity: function allPairsLength() view returns(uint256) +func (_IUniswapV2Factory *IUniswapV2FactoryCaller) AllPairsLength(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Factory.contract.Call(opts, &out, "allPairsLength") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// AllPairsLength is a free data retrieval call binding the contract method 0x574f2ba3. +// +// Solidity: function allPairsLength() view returns(uint256) +func (_IUniswapV2Factory *IUniswapV2FactorySession) AllPairsLength() (*big.Int, error) { + return _IUniswapV2Factory.Contract.AllPairsLength(&_IUniswapV2Factory.CallOpts) +} + +// AllPairsLength is a free data retrieval call binding the contract method 0x574f2ba3. +// +// Solidity: function allPairsLength() view returns(uint256) +func (_IUniswapV2Factory *IUniswapV2FactoryCallerSession) AllPairsLength() (*big.Int, error) { + return _IUniswapV2Factory.Contract.AllPairsLength(&_IUniswapV2Factory.CallOpts) +} + +// FeeTo is a free data retrieval call binding the contract method 0x017e7e58. +// +// Solidity: function feeTo() view returns(address) +func (_IUniswapV2Factory *IUniswapV2FactoryCaller) FeeTo(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV2Factory.contract.Call(opts, &out, "feeTo") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FeeTo is a free data retrieval call binding the contract method 0x017e7e58. +// +// Solidity: function feeTo() view returns(address) +func (_IUniswapV2Factory *IUniswapV2FactorySession) FeeTo() (common.Address, error) { + return _IUniswapV2Factory.Contract.FeeTo(&_IUniswapV2Factory.CallOpts) +} + +// FeeTo is a free data retrieval call binding the contract method 0x017e7e58. +// +// Solidity: function feeTo() view returns(address) +func (_IUniswapV2Factory *IUniswapV2FactoryCallerSession) FeeTo() (common.Address, error) { + return _IUniswapV2Factory.Contract.FeeTo(&_IUniswapV2Factory.CallOpts) +} + +// FeeToSetter is a free data retrieval call binding the contract method 0x094b7415. +// +// Solidity: function feeToSetter() view returns(address) +func (_IUniswapV2Factory *IUniswapV2FactoryCaller) FeeToSetter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV2Factory.contract.Call(opts, &out, "feeToSetter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FeeToSetter is a free data retrieval call binding the contract method 0x094b7415. +// +// Solidity: function feeToSetter() view returns(address) +func (_IUniswapV2Factory *IUniswapV2FactorySession) FeeToSetter() (common.Address, error) { + return _IUniswapV2Factory.Contract.FeeToSetter(&_IUniswapV2Factory.CallOpts) +} + +// FeeToSetter is a free data retrieval call binding the contract method 0x094b7415. +// +// Solidity: function feeToSetter() view returns(address) +func (_IUniswapV2Factory *IUniswapV2FactoryCallerSession) FeeToSetter() (common.Address, error) { + return _IUniswapV2Factory.Contract.FeeToSetter(&_IUniswapV2Factory.CallOpts) +} + +// GetPair is a free data retrieval call binding the contract method 0xe6a43905. +// +// Solidity: function getPair(address tokenA, address tokenB) view returns(address pair) +func (_IUniswapV2Factory *IUniswapV2FactoryCaller) GetPair(opts *bind.CallOpts, tokenA common.Address, tokenB common.Address) (common.Address, error) { + var out []interface{} + err := _IUniswapV2Factory.contract.Call(opts, &out, "getPair", tokenA, tokenB) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetPair is a free data retrieval call binding the contract method 0xe6a43905. +// +// Solidity: function getPair(address tokenA, address tokenB) view returns(address pair) +func (_IUniswapV2Factory *IUniswapV2FactorySession) GetPair(tokenA common.Address, tokenB common.Address) (common.Address, error) { + return _IUniswapV2Factory.Contract.GetPair(&_IUniswapV2Factory.CallOpts, tokenA, tokenB) +} + +// GetPair is a free data retrieval call binding the contract method 0xe6a43905. +// +// Solidity: function getPair(address tokenA, address tokenB) view returns(address pair) +func (_IUniswapV2Factory *IUniswapV2FactoryCallerSession) GetPair(tokenA common.Address, tokenB common.Address) (common.Address, error) { + return _IUniswapV2Factory.Contract.GetPair(&_IUniswapV2Factory.CallOpts, tokenA, tokenB) +} + +// CreatePair is a paid mutator transaction binding the contract method 0xc9c65396. +// +// Solidity: function createPair(address tokenA, address tokenB) returns(address pair) +func (_IUniswapV2Factory *IUniswapV2FactoryTransactor) CreatePair(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { + return _IUniswapV2Factory.contract.Transact(opts, "createPair", tokenA, tokenB) +} + +// CreatePair is a paid mutator transaction binding the contract method 0xc9c65396. +// +// Solidity: function createPair(address tokenA, address tokenB) returns(address pair) +func (_IUniswapV2Factory *IUniswapV2FactorySession) CreatePair(tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { + return _IUniswapV2Factory.Contract.CreatePair(&_IUniswapV2Factory.TransactOpts, tokenA, tokenB) +} + +// CreatePair is a paid mutator transaction binding the contract method 0xc9c65396. +// +// Solidity: function createPair(address tokenA, address tokenB) returns(address pair) +func (_IUniswapV2Factory *IUniswapV2FactoryTransactorSession) CreatePair(tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { + return _IUniswapV2Factory.Contract.CreatePair(&_IUniswapV2Factory.TransactOpts, tokenA, tokenB) +} + +// SetFeeTo is a paid mutator transaction binding the contract method 0xf46901ed. +// +// Solidity: function setFeeTo(address ) returns() +func (_IUniswapV2Factory *IUniswapV2FactoryTransactor) SetFeeTo(opts *bind.TransactOpts, arg0 common.Address) (*types.Transaction, error) { + return _IUniswapV2Factory.contract.Transact(opts, "setFeeTo", arg0) +} + +// SetFeeTo is a paid mutator transaction binding the contract method 0xf46901ed. +// +// Solidity: function setFeeTo(address ) returns() +func (_IUniswapV2Factory *IUniswapV2FactorySession) SetFeeTo(arg0 common.Address) (*types.Transaction, error) { + return _IUniswapV2Factory.Contract.SetFeeTo(&_IUniswapV2Factory.TransactOpts, arg0) +} + +// SetFeeTo is a paid mutator transaction binding the contract method 0xf46901ed. +// +// Solidity: function setFeeTo(address ) returns() +func (_IUniswapV2Factory *IUniswapV2FactoryTransactorSession) SetFeeTo(arg0 common.Address) (*types.Transaction, error) { + return _IUniswapV2Factory.Contract.SetFeeTo(&_IUniswapV2Factory.TransactOpts, arg0) +} + +// SetFeeToSetter is a paid mutator transaction binding the contract method 0xa2e74af6. +// +// Solidity: function setFeeToSetter(address ) returns() +func (_IUniswapV2Factory *IUniswapV2FactoryTransactor) SetFeeToSetter(opts *bind.TransactOpts, arg0 common.Address) (*types.Transaction, error) { + return _IUniswapV2Factory.contract.Transact(opts, "setFeeToSetter", arg0) +} + +// SetFeeToSetter is a paid mutator transaction binding the contract method 0xa2e74af6. +// +// Solidity: function setFeeToSetter(address ) returns() +func (_IUniswapV2Factory *IUniswapV2FactorySession) SetFeeToSetter(arg0 common.Address) (*types.Transaction, error) { + return _IUniswapV2Factory.Contract.SetFeeToSetter(&_IUniswapV2Factory.TransactOpts, arg0) +} + +// SetFeeToSetter is a paid mutator transaction binding the contract method 0xa2e74af6. +// +// Solidity: function setFeeToSetter(address ) returns() +func (_IUniswapV2Factory *IUniswapV2FactoryTransactorSession) SetFeeToSetter(arg0 common.Address) (*types.Transaction, error) { + return _IUniswapV2Factory.Contract.SetFeeToSetter(&_IUniswapV2Factory.TransactOpts, arg0) +} + +// IUniswapV2FactoryPairCreatedIterator is returned from FilterPairCreated and is used to iterate over the raw logs and unpacked data for PairCreated events raised by the IUniswapV2Factory contract. +type IUniswapV2FactoryPairCreatedIterator struct { + Event *IUniswapV2FactoryPairCreated // 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 *IUniswapV2FactoryPairCreatedIterator) 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(IUniswapV2FactoryPairCreated) + 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(IUniswapV2FactoryPairCreated) + 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 *IUniswapV2FactoryPairCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV2FactoryPairCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV2FactoryPairCreated represents a PairCreated event raised by the IUniswapV2Factory contract. +type IUniswapV2FactoryPairCreated struct { + Token0 common.Address + Token1 common.Address + Pair common.Address + Arg3 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPairCreated is a free log retrieval operation binding the contract event 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9. +// +// Solidity: event PairCreated(address indexed token0, address indexed token1, address pair, uint256 arg3) +func (_IUniswapV2Factory *IUniswapV2FactoryFilterer) FilterPairCreated(opts *bind.FilterOpts, token0 []common.Address, token1 []common.Address) (*IUniswapV2FactoryPairCreatedIterator, error) { + + var token0Rule []interface{} + for _, token0Item := range token0 { + token0Rule = append(token0Rule, token0Item) + } + var token1Rule []interface{} + for _, token1Item := range token1 { + token1Rule = append(token1Rule, token1Item) + } + + logs, sub, err := _IUniswapV2Factory.contract.FilterLogs(opts, "PairCreated", token0Rule, token1Rule) + if err != nil { + return nil, err + } + return &IUniswapV2FactoryPairCreatedIterator{contract: _IUniswapV2Factory.contract, event: "PairCreated", logs: logs, sub: sub}, nil +} + +// WatchPairCreated is a free log subscription operation binding the contract event 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9. +// +// Solidity: event PairCreated(address indexed token0, address indexed token1, address pair, uint256 arg3) +func (_IUniswapV2Factory *IUniswapV2FactoryFilterer) WatchPairCreated(opts *bind.WatchOpts, sink chan<- *IUniswapV2FactoryPairCreated, token0 []common.Address, token1 []common.Address) (event.Subscription, error) { + + var token0Rule []interface{} + for _, token0Item := range token0 { + token0Rule = append(token0Rule, token0Item) + } + var token1Rule []interface{} + for _, token1Item := range token1 { + token1Rule = append(token1Rule, token1Item) + } + + logs, sub, err := _IUniswapV2Factory.contract.WatchLogs(opts, "PairCreated", token0Rule, token1Rule) + 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(IUniswapV2FactoryPairCreated) + if err := _IUniswapV2Factory.contract.UnpackLog(event, "PairCreated", 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 +} + +// ParsePairCreated is a log parse operation binding the contract event 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9. +// +// Solidity: event PairCreated(address indexed token0, address indexed token1, address pair, uint256 arg3) +func (_IUniswapV2Factory *IUniswapV2FactoryFilterer) ParsePairCreated(log types.Log) (*IUniswapV2FactoryPairCreated, error) { + event := new(IUniswapV2FactoryPairCreated) + if err := _IUniswapV2Factory.contract.UnpackLog(event, "PairCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2pair.sol/iuniswapv2pair.go b/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2pair.sol/iuniswapv2pair.go new file mode 100644 index 0000000000..61cf1f4b8c --- /dev/null +++ b/pkg/contracts/uniswap/v2-core/contracts/interfaces/iuniswapv2pair.sol/iuniswapv2pair.go @@ -0,0 +1,1842 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv2pair + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV2PairMetaData contains all meta data concerning the IUniswapV2Pair contract. +var IUniswapV2PairMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0Out\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1Out\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint112\",\"name\":\"reserve0\",\"type\":\"uint112\"},{\"indexed\":false,\"internalType\":\"uint112\",\"name\":\"reserve1\",\"type\":\"uint112\"}],\"name\":\"Sync\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_LIQUIDITY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReserves\",\"outputs\":[{\"internalType\":\"uint112\",\"name\":\"reserve0\",\"type\":\"uint112\"},{\"internalType\":\"uint112\",\"name\":\"reserve1\",\"type\":\"uint112\"},{\"internalType\":\"uint32\",\"name\":\"blockTimestampLast\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"kLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"price0CumulativeLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"price1CumulativeLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"skim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Out\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Out\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sync\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token0\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token1\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IUniswapV2PairABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV2PairMetaData.ABI instead. +var IUniswapV2PairABI = IUniswapV2PairMetaData.ABI + +// IUniswapV2Pair is an auto generated Go binding around an Ethereum contract. +type IUniswapV2Pair struct { + IUniswapV2PairCaller // Read-only binding to the contract + IUniswapV2PairTransactor // Write-only binding to the contract + IUniswapV2PairFilterer // Log filterer for contract events +} + +// IUniswapV2PairCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV2PairCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2PairTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV2PairTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2PairFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV2PairFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2PairSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV2PairSession struct { + Contract *IUniswapV2Pair // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2PairCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV2PairCallerSession struct { + Contract *IUniswapV2PairCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV2PairTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV2PairTransactorSession struct { + Contract *IUniswapV2PairTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2PairRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV2PairRaw struct { + Contract *IUniswapV2Pair // Generic contract binding to access the raw methods on +} + +// IUniswapV2PairCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV2PairCallerRaw struct { + Contract *IUniswapV2PairCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV2PairTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV2PairTransactorRaw struct { + Contract *IUniswapV2PairTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV2Pair creates a new instance of IUniswapV2Pair, bound to a specific deployed contract. +func NewIUniswapV2Pair(address common.Address, backend bind.ContractBackend) (*IUniswapV2Pair, error) { + contract, err := bindIUniswapV2Pair(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV2Pair{IUniswapV2PairCaller: IUniswapV2PairCaller{contract: contract}, IUniswapV2PairTransactor: IUniswapV2PairTransactor{contract: contract}, IUniswapV2PairFilterer: IUniswapV2PairFilterer{contract: contract}}, nil +} + +// NewIUniswapV2PairCaller creates a new read-only instance of IUniswapV2Pair, bound to a specific deployed contract. +func NewIUniswapV2PairCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV2PairCaller, error) { + contract, err := bindIUniswapV2Pair(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV2PairCaller{contract: contract}, nil +} + +// NewIUniswapV2PairTransactor creates a new write-only instance of IUniswapV2Pair, bound to a specific deployed contract. +func NewIUniswapV2PairTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV2PairTransactor, error) { + contract, err := bindIUniswapV2Pair(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV2PairTransactor{contract: contract}, nil +} + +// NewIUniswapV2PairFilterer creates a new log filterer instance of IUniswapV2Pair, bound to a specific deployed contract. +func NewIUniswapV2PairFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV2PairFilterer, error) { + contract, err := bindIUniswapV2Pair(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV2PairFilterer{contract: contract}, nil +} + +// bindIUniswapV2Pair binds a generic wrapper to an already deployed contract. +func bindIUniswapV2Pair(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV2PairMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2Pair *IUniswapV2PairRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2Pair.Contract.IUniswapV2PairCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2Pair *IUniswapV2PairRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.IUniswapV2PairTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2Pair *IUniswapV2PairRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.IUniswapV2PairTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2Pair *IUniswapV2PairCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2Pair.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2Pair *IUniswapV2PairTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2Pair *IUniswapV2PairTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.contract.Transact(opts, method, params...) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_IUniswapV2Pair *IUniswapV2PairCaller) DOMAINSEPARATOR(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "DOMAIN_SEPARATOR") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_IUniswapV2Pair *IUniswapV2PairSession) DOMAINSEPARATOR() ([32]byte, error) { + return _IUniswapV2Pair.Contract.DOMAINSEPARATOR(&_IUniswapV2Pair.CallOpts) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) DOMAINSEPARATOR() ([32]byte, error) { + return _IUniswapV2Pair.Contract.DOMAINSEPARATOR(&_IUniswapV2Pair.CallOpts) +} + +// MINIMUMLIQUIDITY is a free data retrieval call binding the contract method 0xba9a7a56. +// +// Solidity: function MINIMUM_LIQUIDITY() pure returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCaller) MINIMUMLIQUIDITY(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "MINIMUM_LIQUIDITY") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MINIMUMLIQUIDITY is a free data retrieval call binding the contract method 0xba9a7a56. +// +// Solidity: function MINIMUM_LIQUIDITY() pure returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairSession) MINIMUMLIQUIDITY() (*big.Int, error) { + return _IUniswapV2Pair.Contract.MINIMUMLIQUIDITY(&_IUniswapV2Pair.CallOpts) +} + +// MINIMUMLIQUIDITY is a free data retrieval call binding the contract method 0xba9a7a56. +// +// Solidity: function MINIMUM_LIQUIDITY() pure returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) MINIMUMLIQUIDITY() (*big.Int, error) { + return _IUniswapV2Pair.Contract.MINIMUMLIQUIDITY(&_IUniswapV2Pair.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() pure returns(bytes32) +func (_IUniswapV2Pair *IUniswapV2PairCaller) PERMITTYPEHASH(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "PERMIT_TYPEHASH") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() pure returns(bytes32) +func (_IUniswapV2Pair *IUniswapV2PairSession) PERMITTYPEHASH() ([32]byte, error) { + return _IUniswapV2Pair.Contract.PERMITTYPEHASH(&_IUniswapV2Pair.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() pure returns(bytes32) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) PERMITTYPEHASH() ([32]byte, error) { + return _IUniswapV2Pair.Contract.PERMITTYPEHASH(&_IUniswapV2Pair.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _IUniswapV2Pair.Contract.Allowance(&_IUniswapV2Pair.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _IUniswapV2Pair.Contract.Allowance(&_IUniswapV2Pair.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "balanceOf", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IUniswapV2Pair.Contract.BalanceOf(&_IUniswapV2Pair.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IUniswapV2Pair.Contract.BalanceOf(&_IUniswapV2Pair.CallOpts, owner) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() pure returns(uint8) +func (_IUniswapV2Pair *IUniswapV2PairCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() pure returns(uint8) +func (_IUniswapV2Pair *IUniswapV2PairSession) Decimals() (uint8, error) { + return _IUniswapV2Pair.Contract.Decimals(&_IUniswapV2Pair.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() pure returns(uint8) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) Decimals() (uint8, error) { + return _IUniswapV2Pair.Contract.Decimals(&_IUniswapV2Pair.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_IUniswapV2Pair *IUniswapV2PairCaller) Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_IUniswapV2Pair *IUniswapV2PairSession) Factory() (common.Address, error) { + return _IUniswapV2Pair.Contract.Factory(&_IUniswapV2Pair.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) Factory() (common.Address, error) { + return _IUniswapV2Pair.Contract.Factory(&_IUniswapV2Pair.CallOpts) +} + +// GetReserves is a free data retrieval call binding the contract method 0x0902f1ac. +// +// Solidity: function getReserves() view returns(uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) +func (_IUniswapV2Pair *IUniswapV2PairCaller) GetReserves(opts *bind.CallOpts) (struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 +}, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "getReserves") + + outstruct := new(struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 + }) + if err != nil { + return *outstruct, err + } + + outstruct.Reserve0 = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Reserve1 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.BlockTimestampLast = *abi.ConvertType(out[2], new(uint32)).(*uint32) + + return *outstruct, err + +} + +// GetReserves is a free data retrieval call binding the contract method 0x0902f1ac. +// +// Solidity: function getReserves() view returns(uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) +func (_IUniswapV2Pair *IUniswapV2PairSession) GetReserves() (struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 +}, error) { + return _IUniswapV2Pair.Contract.GetReserves(&_IUniswapV2Pair.CallOpts) +} + +// GetReserves is a free data retrieval call binding the contract method 0x0902f1ac. +// +// Solidity: function getReserves() view returns(uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) GetReserves() (struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 +}, error) { + return _IUniswapV2Pair.Contract.GetReserves(&_IUniswapV2Pair.CallOpts) +} + +// KLast is a free data retrieval call binding the contract method 0x7464fc3d. +// +// Solidity: function kLast() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCaller) KLast(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "kLast") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// KLast is a free data retrieval call binding the contract method 0x7464fc3d. +// +// Solidity: function kLast() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairSession) KLast() (*big.Int, error) { + return _IUniswapV2Pair.Contract.KLast(&_IUniswapV2Pair.CallOpts) +} + +// KLast is a free data retrieval call binding the contract method 0x7464fc3d. +// +// Solidity: function kLast() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) KLast() (*big.Int, error) { + return _IUniswapV2Pair.Contract.KLast(&_IUniswapV2Pair.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() pure returns(string) +func (_IUniswapV2Pair *IUniswapV2PairCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() pure returns(string) +func (_IUniswapV2Pair *IUniswapV2PairSession) Name() (string, error) { + return _IUniswapV2Pair.Contract.Name(&_IUniswapV2Pair.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() pure returns(string) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) Name() (string, error) { + return _IUniswapV2Pair.Contract.Name(&_IUniswapV2Pair.CallOpts) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCaller) Nonces(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "nonces", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairSession) Nonces(owner common.Address) (*big.Int, error) { + return _IUniswapV2Pair.Contract.Nonces(&_IUniswapV2Pair.CallOpts, owner) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) Nonces(owner common.Address) (*big.Int, error) { + return _IUniswapV2Pair.Contract.Nonces(&_IUniswapV2Pair.CallOpts, owner) +} + +// Price0CumulativeLast is a free data retrieval call binding the contract method 0x5909c0d5. +// +// Solidity: function price0CumulativeLast() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCaller) Price0CumulativeLast(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "price0CumulativeLast") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Price0CumulativeLast is a free data retrieval call binding the contract method 0x5909c0d5. +// +// Solidity: function price0CumulativeLast() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairSession) Price0CumulativeLast() (*big.Int, error) { + return _IUniswapV2Pair.Contract.Price0CumulativeLast(&_IUniswapV2Pair.CallOpts) +} + +// Price0CumulativeLast is a free data retrieval call binding the contract method 0x5909c0d5. +// +// Solidity: function price0CumulativeLast() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) Price0CumulativeLast() (*big.Int, error) { + return _IUniswapV2Pair.Contract.Price0CumulativeLast(&_IUniswapV2Pair.CallOpts) +} + +// Price1CumulativeLast is a free data retrieval call binding the contract method 0x5a3d5493. +// +// Solidity: function price1CumulativeLast() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCaller) Price1CumulativeLast(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "price1CumulativeLast") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Price1CumulativeLast is a free data retrieval call binding the contract method 0x5a3d5493. +// +// Solidity: function price1CumulativeLast() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairSession) Price1CumulativeLast() (*big.Int, error) { + return _IUniswapV2Pair.Contract.Price1CumulativeLast(&_IUniswapV2Pair.CallOpts) +} + +// Price1CumulativeLast is a free data retrieval call binding the contract method 0x5a3d5493. +// +// Solidity: function price1CumulativeLast() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) Price1CumulativeLast() (*big.Int, error) { + return _IUniswapV2Pair.Contract.Price1CumulativeLast(&_IUniswapV2Pair.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() pure returns(string) +func (_IUniswapV2Pair *IUniswapV2PairCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() pure returns(string) +func (_IUniswapV2Pair *IUniswapV2PairSession) Symbol() (string, error) { + return _IUniswapV2Pair.Contract.Symbol(&_IUniswapV2Pair.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() pure returns(string) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) Symbol() (string, error) { + return _IUniswapV2Pair.Contract.Symbol(&_IUniswapV2Pair.CallOpts) +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_IUniswapV2Pair *IUniswapV2PairCaller) Token0(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "token0") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_IUniswapV2Pair *IUniswapV2PairSession) Token0() (common.Address, error) { + return _IUniswapV2Pair.Contract.Token0(&_IUniswapV2Pair.CallOpts) +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) Token0() (common.Address, error) { + return _IUniswapV2Pair.Contract.Token0(&_IUniswapV2Pair.CallOpts) +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_IUniswapV2Pair *IUniswapV2PairCaller) Token1(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "token1") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_IUniswapV2Pair *IUniswapV2PairSession) Token1() (common.Address, error) { + return _IUniswapV2Pair.Contract.Token1(&_IUniswapV2Pair.CallOpts) +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) Token1() (common.Address, error) { + return _IUniswapV2Pair.Contract.Token1(&_IUniswapV2Pair.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Pair.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairSession) TotalSupply() (*big.Int, error) { + return _IUniswapV2Pair.Contract.TotalSupply(&_IUniswapV2Pair.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IUniswapV2Pair *IUniswapV2PairCallerSession) TotalSupply() (*big.Int, error) { + return _IUniswapV2Pair.Contract.TotalSupply(&_IUniswapV2Pair.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IUniswapV2Pair *IUniswapV2PairTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2Pair.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IUniswapV2Pair *IUniswapV2PairSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Approve(&_IUniswapV2Pair.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IUniswapV2Pair *IUniswapV2PairTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Approve(&_IUniswapV2Pair.TransactOpts, spender, value) +} + +// Burn is a paid mutator transaction binding the contract method 0x89afcb44. +// +// Solidity: function burn(address to) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV2Pair *IUniswapV2PairTransactor) Burn(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.contract.Transact(opts, "burn", to) +} + +// Burn is a paid mutator transaction binding the contract method 0x89afcb44. +// +// Solidity: function burn(address to) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV2Pair *IUniswapV2PairSession) Burn(to common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Burn(&_IUniswapV2Pair.TransactOpts, to) +} + +// Burn is a paid mutator transaction binding the contract method 0x89afcb44. +// +// Solidity: function burn(address to) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV2Pair *IUniswapV2PairTransactorSession) Burn(to common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Burn(&_IUniswapV2Pair.TransactOpts, to) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address , address ) returns() +func (_IUniswapV2Pair *IUniswapV2PairTransactor) Initialize(opts *bind.TransactOpts, arg0 common.Address, arg1 common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.contract.Transact(opts, "initialize", arg0, arg1) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address , address ) returns() +func (_IUniswapV2Pair *IUniswapV2PairSession) Initialize(arg0 common.Address, arg1 common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Initialize(&_IUniswapV2Pair.TransactOpts, arg0, arg1) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address , address ) returns() +func (_IUniswapV2Pair *IUniswapV2PairTransactorSession) Initialize(arg0 common.Address, arg1 common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Initialize(&_IUniswapV2Pair.TransactOpts, arg0, arg1) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address to) returns(uint256 liquidity) +func (_IUniswapV2Pair *IUniswapV2PairTransactor) Mint(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.contract.Transact(opts, "mint", to) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address to) returns(uint256 liquidity) +func (_IUniswapV2Pair *IUniswapV2PairSession) Mint(to common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Mint(&_IUniswapV2Pair.TransactOpts, to) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address to) returns(uint256 liquidity) +func (_IUniswapV2Pair *IUniswapV2PairTransactorSession) Mint(to common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Mint(&_IUniswapV2Pair.TransactOpts, to) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_IUniswapV2Pair *IUniswapV2PairTransactor) Permit(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Pair.contract.Transact(opts, "permit", owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_IUniswapV2Pair *IUniswapV2PairSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Permit(&_IUniswapV2Pair.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_IUniswapV2Pair *IUniswapV2PairTransactorSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Permit(&_IUniswapV2Pair.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Skim is a paid mutator transaction binding the contract method 0xbc25cf77. +// +// Solidity: function skim(address to) returns() +func (_IUniswapV2Pair *IUniswapV2PairTransactor) Skim(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.contract.Transact(opts, "skim", to) +} + +// Skim is a paid mutator transaction binding the contract method 0xbc25cf77. +// +// Solidity: function skim(address to) returns() +func (_IUniswapV2Pair *IUniswapV2PairSession) Skim(to common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Skim(&_IUniswapV2Pair.TransactOpts, to) +} + +// Skim is a paid mutator transaction binding the contract method 0xbc25cf77. +// +// Solidity: function skim(address to) returns() +func (_IUniswapV2Pair *IUniswapV2PairTransactorSession) Skim(to common.Address) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Skim(&_IUniswapV2Pair.TransactOpts, to) +} + +// Swap is a paid mutator transaction binding the contract method 0x022c0d9f. +// +// Solidity: function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes data) returns() +func (_IUniswapV2Pair *IUniswapV2PairTransactor) Swap(opts *bind.TransactOpts, amount0Out *big.Int, amount1Out *big.Int, to common.Address, data []byte) (*types.Transaction, error) { + return _IUniswapV2Pair.contract.Transact(opts, "swap", amount0Out, amount1Out, to, data) +} + +// Swap is a paid mutator transaction binding the contract method 0x022c0d9f. +// +// Solidity: function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes data) returns() +func (_IUniswapV2Pair *IUniswapV2PairSession) Swap(amount0Out *big.Int, amount1Out *big.Int, to common.Address, data []byte) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Swap(&_IUniswapV2Pair.TransactOpts, amount0Out, amount1Out, to, data) +} + +// Swap is a paid mutator transaction binding the contract method 0x022c0d9f. +// +// Solidity: function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes data) returns() +func (_IUniswapV2Pair *IUniswapV2PairTransactorSession) Swap(amount0Out *big.Int, amount1Out *big.Int, to common.Address, data []byte) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Swap(&_IUniswapV2Pair.TransactOpts, amount0Out, amount1Out, to, data) +} + +// Sync is a paid mutator transaction binding the contract method 0xfff6cae9. +// +// Solidity: function sync() returns() +func (_IUniswapV2Pair *IUniswapV2PairTransactor) Sync(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2Pair.contract.Transact(opts, "sync") +} + +// Sync is a paid mutator transaction binding the contract method 0xfff6cae9. +// +// Solidity: function sync() returns() +func (_IUniswapV2Pair *IUniswapV2PairSession) Sync() (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Sync(&_IUniswapV2Pair.TransactOpts) +} + +// Sync is a paid mutator transaction binding the contract method 0xfff6cae9. +// +// Solidity: function sync() returns() +func (_IUniswapV2Pair *IUniswapV2PairTransactorSession) Sync() (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Sync(&_IUniswapV2Pair.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IUniswapV2Pair *IUniswapV2PairTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2Pair.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IUniswapV2Pair *IUniswapV2PairSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Transfer(&_IUniswapV2Pair.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IUniswapV2Pair *IUniswapV2PairTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.Transfer(&_IUniswapV2Pair.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IUniswapV2Pair *IUniswapV2PairTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2Pair.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IUniswapV2Pair *IUniswapV2PairSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.TransferFrom(&_IUniswapV2Pair.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IUniswapV2Pair *IUniswapV2PairTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IUniswapV2Pair.Contract.TransferFrom(&_IUniswapV2Pair.TransactOpts, from, to, value) +} + +// IUniswapV2PairApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IUniswapV2Pair contract. +type IUniswapV2PairApprovalIterator struct { + Event *IUniswapV2PairApproval // 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 *IUniswapV2PairApprovalIterator) 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(IUniswapV2PairApproval) + 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(IUniswapV2PairApproval) + 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 *IUniswapV2PairApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV2PairApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV2PairApproval represents a Approval event raised by the IUniswapV2Pair contract. +type IUniswapV2PairApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IUniswapV2PairApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _IUniswapV2Pair.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &IUniswapV2PairApprovalIterator{contract: _IUniswapV2Pair.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IUniswapV2PairApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _IUniswapV2Pair.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + 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(IUniswapV2PairApproval) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) ParseApproval(log types.Log) (*IUniswapV2PairApproval, error) { + event := new(IUniswapV2PairApproval) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV2PairBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the IUniswapV2Pair contract. +type IUniswapV2PairBurnIterator struct { + Event *IUniswapV2PairBurn // 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 *IUniswapV2PairBurnIterator) 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(IUniswapV2PairBurn) + 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(IUniswapV2PairBurn) + 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 *IUniswapV2PairBurnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV2PairBurnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV2PairBurn represents a Burn event raised by the IUniswapV2Pair contract. +type IUniswapV2PairBurn struct { + Sender common.Address + Amount0 *big.Int + Amount1 *big.Int + To common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBurn is a free log retrieval operation binding the contract event 0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496. +// +// Solidity: event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) FilterBurn(opts *bind.FilterOpts, sender []common.Address, to []common.Address) (*IUniswapV2PairBurnIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IUniswapV2Pair.contract.FilterLogs(opts, "Burn", senderRule, toRule) + if err != nil { + return nil, err + } + return &IUniswapV2PairBurnIterator{contract: _IUniswapV2Pair.contract, event: "Burn", logs: logs, sub: sub}, nil +} + +// WatchBurn is a free log subscription operation binding the contract event 0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496. +// +// Solidity: event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *IUniswapV2PairBurn, sender []common.Address, to []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IUniswapV2Pair.contract.WatchLogs(opts, "Burn", senderRule, toRule) + 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(IUniswapV2PairBurn) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Burn", 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 +} + +// ParseBurn is a log parse operation binding the contract event 0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496. +// +// Solidity: event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) ParseBurn(log types.Log) (*IUniswapV2PairBurn, error) { + event := new(IUniswapV2PairBurn) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Burn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV2PairMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the IUniswapV2Pair contract. +type IUniswapV2PairMintIterator struct { + Event *IUniswapV2PairMint // 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 *IUniswapV2PairMintIterator) 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(IUniswapV2PairMint) + 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(IUniswapV2PairMint) + 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 *IUniswapV2PairMintIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV2PairMintIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV2PairMint represents a Mint event raised by the IUniswapV2Pair contract. +type IUniswapV2PairMint struct { + Sender common.Address + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMint is a free log retrieval operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) FilterMint(opts *bind.FilterOpts, sender []common.Address) (*IUniswapV2PairMintIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _IUniswapV2Pair.contract.FilterLogs(opts, "Mint", senderRule) + if err != nil { + return nil, err + } + return &IUniswapV2PairMintIterator{contract: _IUniswapV2Pair.contract, event: "Mint", logs: logs, sub: sub}, nil +} + +// WatchMint is a free log subscription operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *IUniswapV2PairMint, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _IUniswapV2Pair.contract.WatchLogs(opts, "Mint", senderRule) + 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(IUniswapV2PairMint) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Mint", 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 +} + +// ParseMint is a log parse operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) ParseMint(log types.Log) (*IUniswapV2PairMint, error) { + event := new(IUniswapV2PairMint) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Mint", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV2PairSwapIterator is returned from FilterSwap and is used to iterate over the raw logs and unpacked data for Swap events raised by the IUniswapV2Pair contract. +type IUniswapV2PairSwapIterator struct { + Event *IUniswapV2PairSwap // 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 *IUniswapV2PairSwapIterator) 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(IUniswapV2PairSwap) + 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(IUniswapV2PairSwap) + 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 *IUniswapV2PairSwapIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV2PairSwapIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV2PairSwap represents a Swap event raised by the IUniswapV2Pair contract. +type IUniswapV2PairSwap struct { + Sender common.Address + Amount0In *big.Int + Amount1In *big.Int + Amount0Out *big.Int + Amount1Out *big.Int + To common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSwap is a free log retrieval operation binding the contract event 0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822. +// +// Solidity: event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) FilterSwap(opts *bind.FilterOpts, sender []common.Address, to []common.Address) (*IUniswapV2PairSwapIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IUniswapV2Pair.contract.FilterLogs(opts, "Swap", senderRule, toRule) + if err != nil { + return nil, err + } + return &IUniswapV2PairSwapIterator{contract: _IUniswapV2Pair.contract, event: "Swap", logs: logs, sub: sub}, nil +} + +// WatchSwap is a free log subscription operation binding the contract event 0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822. +// +// Solidity: event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) WatchSwap(opts *bind.WatchOpts, sink chan<- *IUniswapV2PairSwap, sender []common.Address, to []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IUniswapV2Pair.contract.WatchLogs(opts, "Swap", senderRule, toRule) + 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(IUniswapV2PairSwap) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Swap", 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 +} + +// ParseSwap is a log parse operation binding the contract event 0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822. +// +// Solidity: event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) ParseSwap(log types.Log) (*IUniswapV2PairSwap, error) { + event := new(IUniswapV2PairSwap) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Swap", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV2PairSyncIterator is returned from FilterSync and is used to iterate over the raw logs and unpacked data for Sync events raised by the IUniswapV2Pair contract. +type IUniswapV2PairSyncIterator struct { + Event *IUniswapV2PairSync // 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 *IUniswapV2PairSyncIterator) 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(IUniswapV2PairSync) + 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(IUniswapV2PairSync) + 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 *IUniswapV2PairSyncIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV2PairSyncIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV2PairSync represents a Sync event raised by the IUniswapV2Pair contract. +type IUniswapV2PairSync struct { + Reserve0 *big.Int + Reserve1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSync is a free log retrieval operation binding the contract event 0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1. +// +// Solidity: event Sync(uint112 reserve0, uint112 reserve1) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) FilterSync(opts *bind.FilterOpts) (*IUniswapV2PairSyncIterator, error) { + + logs, sub, err := _IUniswapV2Pair.contract.FilterLogs(opts, "Sync") + if err != nil { + return nil, err + } + return &IUniswapV2PairSyncIterator{contract: _IUniswapV2Pair.contract, event: "Sync", logs: logs, sub: sub}, nil +} + +// WatchSync is a free log subscription operation binding the contract event 0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1. +// +// Solidity: event Sync(uint112 reserve0, uint112 reserve1) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) WatchSync(opts *bind.WatchOpts, sink chan<- *IUniswapV2PairSync) (event.Subscription, error) { + + logs, sub, err := _IUniswapV2Pair.contract.WatchLogs(opts, "Sync") + 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(IUniswapV2PairSync) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Sync", 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 +} + +// ParseSync is a log parse operation binding the contract event 0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1. +// +// Solidity: event Sync(uint112 reserve0, uint112 reserve1) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) ParseSync(log types.Log) (*IUniswapV2PairSync, error) { + event := new(IUniswapV2PairSync) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Sync", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV2PairTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IUniswapV2Pair contract. +type IUniswapV2PairTransferIterator struct { + Event *IUniswapV2PairTransfer // 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 *IUniswapV2PairTransferIterator) 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(IUniswapV2PairTransfer) + 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(IUniswapV2PairTransfer) + 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 *IUniswapV2PairTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV2PairTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV2PairTransfer represents a Transfer event raised by the IUniswapV2Pair contract. +type IUniswapV2PairTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IUniswapV2PairTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IUniswapV2Pair.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &IUniswapV2PairTransferIterator{contract: _IUniswapV2Pair.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IUniswapV2PairTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IUniswapV2Pair.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + 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(IUniswapV2PairTransfer) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IUniswapV2Pair *IUniswapV2PairFilterer) ParseTransfer(log types.Log) (*IUniswapV2PairTransfer, error) { + event := new(IUniswapV2PairTransfer) + if err := _IUniswapV2Pair.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/uniswap/v2-core/contracts/libraries/math.sol/math.go b/pkg/contracts/uniswap/v2-core/contracts/libraries/math.sol/math.go new file mode 100644 index 0000000000..da2c97a05b --- /dev/null +++ b/pkg/contracts/uniswap/v2-core/contracts/libraries/math.sol/math.go @@ -0,0 +1,203 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package math + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// MathMetaData contains all meta data concerning the Math contract. +var MathMetaData = &bind.MetaData{ + ABI: "[]", + Bin: "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582036ebcfaac2554db76c89ce048a11e2a035fd87545ae459a0f16e5e15e0c6532964736f6c63430005100032", +} + +// MathABI is the input ABI used to generate the binding from. +// Deprecated: Use MathMetaData.ABI instead. +var MathABI = MathMetaData.ABI + +// MathBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use MathMetaData.Bin instead. +var MathBin = MathMetaData.Bin + +// DeployMath deploys a new Ethereum contract, binding an instance of Math to it. +func DeployMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Math, error) { + parsed, err := MathMetaData.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(MathBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Math{MathCaller: MathCaller{contract: contract}, MathTransactor: MathTransactor{contract: contract}, MathFilterer: MathFilterer{contract: contract}}, nil +} + +// Math is an auto generated Go binding around an Ethereum contract. +type Math struct { + MathCaller // Read-only binding to the contract + MathTransactor // Write-only binding to the contract + MathFilterer // Log filterer for contract events +} + +// MathCaller is an auto generated read-only Go binding around an Ethereum contract. +type MathCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MathTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MathTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MathFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MathSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MathSession struct { + Contract *Math // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MathCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MathCallerSession struct { + Contract *MathCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MathTransactorSession struct { + Contract *MathTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MathRaw is an auto generated low-level Go binding around an Ethereum contract. +type MathRaw struct { + Contract *Math // Generic contract binding to access the raw methods on +} + +// MathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MathCallerRaw struct { + Contract *MathCaller // Generic read-only contract binding to access the raw methods on +} + +// MathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MathTransactorRaw struct { + Contract *MathTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMath creates a new instance of Math, bound to a specific deployed contract. +func NewMath(address common.Address, backend bind.ContractBackend) (*Math, error) { + contract, err := bindMath(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Math{MathCaller: MathCaller{contract: contract}, MathTransactor: MathTransactor{contract: contract}, MathFilterer: MathFilterer{contract: contract}}, nil +} + +// NewMathCaller creates a new read-only instance of Math, bound to a specific deployed contract. +func NewMathCaller(address common.Address, caller bind.ContractCaller) (*MathCaller, error) { + contract, err := bindMath(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MathCaller{contract: contract}, nil +} + +// NewMathTransactor creates a new write-only instance of Math, bound to a specific deployed contract. +func NewMathTransactor(address common.Address, transactor bind.ContractTransactor) (*MathTransactor, error) { + contract, err := bindMath(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MathTransactor{contract: contract}, nil +} + +// NewMathFilterer creates a new log filterer instance of Math, bound to a specific deployed contract. +func NewMathFilterer(address common.Address, filterer bind.ContractFilterer) (*MathFilterer, error) { + contract, err := bindMath(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MathFilterer{contract: contract}, nil +} + +// bindMath binds a generic wrapper to an already deployed contract. +func bindMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := MathMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Math *MathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Math.Contract.MathCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Math *MathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Math.Contract.MathTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Math *MathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Math.Contract.MathTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Math *MathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Math.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Math *MathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Math.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Math *MathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Math.Contract.contract.Transact(opts, method, params...) +} diff --git a/pkg/contracts/uniswap/v2-core/contracts/libraries/safemath.sol/safemath.go b/pkg/contracts/uniswap/v2-core/contracts/libraries/safemath.sol/safemath.go new file mode 100644 index 0000000000..dd80cb9b1f --- /dev/null +++ b/pkg/contracts/uniswap/v2-core/contracts/libraries/safemath.sol/safemath.go @@ -0,0 +1,203 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package safemath + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SafeMathMetaData contains all meta data concerning the SafeMath contract. +var SafeMathMetaData = &bind.MetaData{ + ABI: "[]", + Bin: "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820bc1c290dcae2f326bd131e1959ee8796f40aded46d889061bd483ecfcb42f19664736f6c63430005100032", +} + +// SafeMathABI is the input ABI used to generate the binding from. +// Deprecated: Use SafeMathMetaData.ABI instead. +var SafeMathABI = SafeMathMetaData.ABI + +// SafeMathBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use SafeMathMetaData.Bin instead. +var SafeMathBin = SafeMathMetaData.Bin + +// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. +func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { + parsed, err := SafeMathMetaData.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(SafeMathBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// SafeMath is an auto generated Go binding around an Ethereum contract. +type SafeMath struct { + SafeMathCaller // Read-only binding to the contract + SafeMathTransactor // Write-only binding to the contract + SafeMathFilterer // Log filterer for contract events +} + +// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. +type SafeMathCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SafeMathTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SafeMathFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SafeMathSession struct { + Contract *SafeMath // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SafeMathCallerSession struct { + Contract *SafeMathCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SafeMathTransactorSession struct { + Contract *SafeMathTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. +type SafeMathRaw struct { + Contract *SafeMath // Generic contract binding to access the raw methods on +} + +// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SafeMathCallerRaw struct { + Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on +} + +// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SafeMathTransactorRaw struct { + Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. +func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { + contract, err := bindSafeMath(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { + contract, err := bindSafeMath(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SafeMathCaller{contract: contract}, nil +} + +// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { + contract, err := bindSafeMath(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SafeMathTransactor{contract: contract}, nil +} + +// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { + contract, err := bindSafeMath(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SafeMathFilterer{contract: contract}, nil +} + +// bindSafeMath binds a generic wrapper to an already deployed contract. +func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := SafeMathMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SafeMath.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transact(opts, method, params...) +} diff --git a/pkg/contracts/uniswap/v2-core/contracts/libraries/uq112x112.sol/uq112x112.go b/pkg/contracts/uniswap/v2-core/contracts/libraries/uq112x112.sol/uq112x112.go new file mode 100644 index 0000000000..13e1b83dc4 --- /dev/null +++ b/pkg/contracts/uniswap/v2-core/contracts/libraries/uq112x112.sol/uq112x112.go @@ -0,0 +1,203 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package uq112x112 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// UQ112x112MetaData contains all meta data concerning the UQ112x112 contract. +var UQ112x112MetaData = &bind.MetaData{ + ABI: "[]", + Bin: "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820c4e545b71eb450fec89d3fbcceea2f62f8971fce94db924228248b088e907ed864736f6c63430005100032", +} + +// UQ112x112ABI is the input ABI used to generate the binding from. +// Deprecated: Use UQ112x112MetaData.ABI instead. +var UQ112x112ABI = UQ112x112MetaData.ABI + +// UQ112x112Bin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use UQ112x112MetaData.Bin instead. +var UQ112x112Bin = UQ112x112MetaData.Bin + +// DeployUQ112x112 deploys a new Ethereum contract, binding an instance of UQ112x112 to it. +func DeployUQ112x112(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *UQ112x112, error) { + parsed, err := UQ112x112MetaData.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(UQ112x112Bin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &UQ112x112{UQ112x112Caller: UQ112x112Caller{contract: contract}, UQ112x112Transactor: UQ112x112Transactor{contract: contract}, UQ112x112Filterer: UQ112x112Filterer{contract: contract}}, nil +} + +// UQ112x112 is an auto generated Go binding around an Ethereum contract. +type UQ112x112 struct { + UQ112x112Caller // Read-only binding to the contract + UQ112x112Transactor // Write-only binding to the contract + UQ112x112Filterer // Log filterer for contract events +} + +// UQ112x112Caller is an auto generated read-only Go binding around an Ethereum contract. +type UQ112x112Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UQ112x112Transactor is an auto generated write-only Go binding around an Ethereum contract. +type UQ112x112Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UQ112x112Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UQ112x112Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UQ112x112Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UQ112x112Session struct { + Contract *UQ112x112 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UQ112x112CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UQ112x112CallerSession struct { + Contract *UQ112x112Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UQ112x112TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UQ112x112TransactorSession struct { + Contract *UQ112x112Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UQ112x112Raw is an auto generated low-level Go binding around an Ethereum contract. +type UQ112x112Raw struct { + Contract *UQ112x112 // Generic contract binding to access the raw methods on +} + +// UQ112x112CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UQ112x112CallerRaw struct { + Contract *UQ112x112Caller // Generic read-only contract binding to access the raw methods on +} + +// UQ112x112TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UQ112x112TransactorRaw struct { + Contract *UQ112x112Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewUQ112x112 creates a new instance of UQ112x112, bound to a specific deployed contract. +func NewUQ112x112(address common.Address, backend bind.ContractBackend) (*UQ112x112, error) { + contract, err := bindUQ112x112(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UQ112x112{UQ112x112Caller: UQ112x112Caller{contract: contract}, UQ112x112Transactor: UQ112x112Transactor{contract: contract}, UQ112x112Filterer: UQ112x112Filterer{contract: contract}}, nil +} + +// NewUQ112x112Caller creates a new read-only instance of UQ112x112, bound to a specific deployed contract. +func NewUQ112x112Caller(address common.Address, caller bind.ContractCaller) (*UQ112x112Caller, error) { + contract, err := bindUQ112x112(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UQ112x112Caller{contract: contract}, nil +} + +// NewUQ112x112Transactor creates a new write-only instance of UQ112x112, bound to a specific deployed contract. +func NewUQ112x112Transactor(address common.Address, transactor bind.ContractTransactor) (*UQ112x112Transactor, error) { + contract, err := bindUQ112x112(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UQ112x112Transactor{contract: contract}, nil +} + +// NewUQ112x112Filterer creates a new log filterer instance of UQ112x112, bound to a specific deployed contract. +func NewUQ112x112Filterer(address common.Address, filterer bind.ContractFilterer) (*UQ112x112Filterer, error) { + contract, err := bindUQ112x112(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UQ112x112Filterer{contract: contract}, nil +} + +// bindUQ112x112 binds a generic wrapper to an already deployed contract. +func bindUQ112x112(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := UQ112x112MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UQ112x112 *UQ112x112Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UQ112x112.Contract.UQ112x112Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UQ112x112 *UQ112x112Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UQ112x112.Contract.UQ112x112Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UQ112x112 *UQ112x112Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UQ112x112.Contract.UQ112x112Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UQ112x112 *UQ112x112CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UQ112x112.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UQ112x112 *UQ112x112TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UQ112x112.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UQ112x112 *UQ112x112TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UQ112x112.Contract.contract.Transact(opts, method, params...) +} diff --git a/pkg/contracts/uniswap/v2-core/contracts/uniswapv2erc20.sol/uniswapv2erc20.go b/pkg/contracts/uniswap/v2-core/contracts/uniswapv2erc20.sol/uniswapv2erc20.go new file mode 100644 index 0000000000..f8b3aaed67 --- /dev/null +++ b/pkg/contracts/uniswap/v2-core/contracts/uniswapv2erc20.sol/uniswapv2erc20.go @@ -0,0 +1,874 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package uniswapv2erc20 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// UniswapV2ERC20MetaData contains all meta data concerning the UniswapV2ERC20 contract. +var UniswapV2ERC20MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506040514690806052610b898239604080519182900360520182208282018252600a8352692ab734b9bbb0b8102b1960b11b6020938401528151808301835260018152603160f81b908401528151808401919091527fbfcc8ef98ffbf7b6c3fec7bf5185b566b9863e35a9d83acd49ad6824b5969738818301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101949094523060a0808601919091528151808603909101815260c09094019052825192019190912060035550610a9b806100ee6000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80633644e5151161008c57806395d89b411161006657806395d89b411461029f578063a9059cbb146102a7578063d505accf146102e0578063dd62ed3e14610340576100df565b80633644e5151461023157806370a08231146102395780637ecebe001461026c576100df565b806323b872dd116100bd57806323b872dd146101c857806330adf81f1461020b578063313ce56714610213576100df565b806306fdde03146100e4578063095ea7b31461016157806318160ddd146101ae575b600080fd5b6100ec61037b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61019a6004803603604081101561017757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356103b4565b604080519115158252519081900360200190f35b6101b66103cb565b60408051918252519081900360200190f35b61019a600480360360608110156101de57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356103d1565b6101b66104b0565b61021b6104d4565b6040805160ff9092168252519081900360200190f35b6101b66104d9565b6101b66004803603602081101561024f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104df565b6101b66004803603602081101561028257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104f1565b6100ec610503565b61019a600480360360408110156102bd57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561053c565b61033e600480360360e08110156102f657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135610549565b005b6101b66004803603604081101561035657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610815565b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b60006103c1338484610832565b5060015b92915050565b60005481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461049b5773ffffffffffffffffffffffffffffffffffffffff84166000908152600260209081526040808320338452909152902054610469908363ffffffff6108a116565b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020555b6104a6848484610913565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60035481565b60016020526000908152604090205481565b60046020526000908152604090205481565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b60006103c1338484610913565b428410156105b857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f556e697377617056323a20455850495245440000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff80891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015610719573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061079457508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b6107ff57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f556e697377617056323a20494e56414c49445f5349474e415455524500000000604482015290519081900360640190fd5b61080a898989610832565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b808203828111156103c557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054610949908263ffffffff6108a116565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020526040808220939093559084168152205461098b908263ffffffff6109f416565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b808201828110156103c557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfea265627a7a72315820fbe850bc397a587736b017d75ce8021dd8dafcfd54ab43add14fd21753cc6c3564736f6c63430005100032454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", +} + +// UniswapV2ERC20ABI is the input ABI used to generate the binding from. +// Deprecated: Use UniswapV2ERC20MetaData.ABI instead. +var UniswapV2ERC20ABI = UniswapV2ERC20MetaData.ABI + +// UniswapV2ERC20Bin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use UniswapV2ERC20MetaData.Bin instead. +var UniswapV2ERC20Bin = UniswapV2ERC20MetaData.Bin + +// DeployUniswapV2ERC20 deploys a new Ethereum contract, binding an instance of UniswapV2ERC20 to it. +func DeployUniswapV2ERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *UniswapV2ERC20, error) { + parsed, err := UniswapV2ERC20MetaData.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(UniswapV2ERC20Bin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &UniswapV2ERC20{UniswapV2ERC20Caller: UniswapV2ERC20Caller{contract: contract}, UniswapV2ERC20Transactor: UniswapV2ERC20Transactor{contract: contract}, UniswapV2ERC20Filterer: UniswapV2ERC20Filterer{contract: contract}}, nil +} + +// UniswapV2ERC20 is an auto generated Go binding around an Ethereum contract. +type UniswapV2ERC20 struct { + UniswapV2ERC20Caller // Read-only binding to the contract + UniswapV2ERC20Transactor // Write-only binding to the contract + UniswapV2ERC20Filterer // Log filterer for contract events +} + +// UniswapV2ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. +type UniswapV2ERC20Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type UniswapV2ERC20Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UniswapV2ERC20Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2ERC20Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UniswapV2ERC20Session struct { + Contract *UniswapV2ERC20 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UniswapV2ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UniswapV2ERC20CallerSession struct { + Contract *UniswapV2ERC20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UniswapV2ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UniswapV2ERC20TransactorSession struct { + Contract *UniswapV2ERC20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UniswapV2ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. +type UniswapV2ERC20Raw struct { + Contract *UniswapV2ERC20 // Generic contract binding to access the raw methods on +} + +// UniswapV2ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UniswapV2ERC20CallerRaw struct { + Contract *UniswapV2ERC20Caller // Generic read-only contract binding to access the raw methods on +} + +// UniswapV2ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UniswapV2ERC20TransactorRaw struct { + Contract *UniswapV2ERC20Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewUniswapV2ERC20 creates a new instance of UniswapV2ERC20, bound to a specific deployed contract. +func NewUniswapV2ERC20(address common.Address, backend bind.ContractBackend) (*UniswapV2ERC20, error) { + contract, err := bindUniswapV2ERC20(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UniswapV2ERC20{UniswapV2ERC20Caller: UniswapV2ERC20Caller{contract: contract}, UniswapV2ERC20Transactor: UniswapV2ERC20Transactor{contract: contract}, UniswapV2ERC20Filterer: UniswapV2ERC20Filterer{contract: contract}}, nil +} + +// NewUniswapV2ERC20Caller creates a new read-only instance of UniswapV2ERC20, bound to a specific deployed contract. +func NewUniswapV2ERC20Caller(address common.Address, caller bind.ContractCaller) (*UniswapV2ERC20Caller, error) { + contract, err := bindUniswapV2ERC20(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UniswapV2ERC20Caller{contract: contract}, nil +} + +// NewUniswapV2ERC20Transactor creates a new write-only instance of UniswapV2ERC20, bound to a specific deployed contract. +func NewUniswapV2ERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*UniswapV2ERC20Transactor, error) { + contract, err := bindUniswapV2ERC20(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UniswapV2ERC20Transactor{contract: contract}, nil +} + +// NewUniswapV2ERC20Filterer creates a new log filterer instance of UniswapV2ERC20, bound to a specific deployed contract. +func NewUniswapV2ERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*UniswapV2ERC20Filterer, error) { + contract, err := bindUniswapV2ERC20(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UniswapV2ERC20Filterer{contract: contract}, nil +} + +// bindUniswapV2ERC20 binds a generic wrapper to an already deployed contract. +func bindUniswapV2ERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := UniswapV2ERC20MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UniswapV2ERC20 *UniswapV2ERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2ERC20.Contract.UniswapV2ERC20Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UniswapV2ERC20 *UniswapV2ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.UniswapV2ERC20Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapV2ERC20 *UniswapV2ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.UniswapV2ERC20Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UniswapV2ERC20 *UniswapV2ERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2ERC20.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UniswapV2ERC20 *UniswapV2ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapV2ERC20 *UniswapV2ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.contract.Transact(opts, method, params...) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_UniswapV2ERC20 *UniswapV2ERC20Caller) DOMAINSEPARATOR(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _UniswapV2ERC20.contract.Call(opts, &out, "DOMAIN_SEPARATOR") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) DOMAINSEPARATOR() ([32]byte, error) { + return _UniswapV2ERC20.Contract.DOMAINSEPARATOR(&_UniswapV2ERC20.CallOpts) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_UniswapV2ERC20 *UniswapV2ERC20CallerSession) DOMAINSEPARATOR() ([32]byte, error) { + return _UniswapV2ERC20.Contract.DOMAINSEPARATOR(&_UniswapV2ERC20.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_UniswapV2ERC20 *UniswapV2ERC20Caller) PERMITTYPEHASH(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _UniswapV2ERC20.contract.Call(opts, &out, "PERMIT_TYPEHASH") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) PERMITTYPEHASH() ([32]byte, error) { + return _UniswapV2ERC20.Contract.PERMITTYPEHASH(&_UniswapV2ERC20.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_UniswapV2ERC20 *UniswapV2ERC20CallerSession) PERMITTYPEHASH() ([32]byte, error) { + return _UniswapV2ERC20.Contract.PERMITTYPEHASH(&_UniswapV2ERC20.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20Caller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _UniswapV2ERC20.contract.Call(opts, &out, "allowance", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _UniswapV2ERC20.Contract.Allowance(&_UniswapV2ERC20.CallOpts, arg0, arg1) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20CallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _UniswapV2ERC20.Contract.Allowance(&_UniswapV2ERC20.CallOpts, arg0, arg1) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20Caller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _UniswapV2ERC20.contract.Call(opts, &out, "balanceOf", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _UniswapV2ERC20.Contract.BalanceOf(&_UniswapV2ERC20.CallOpts, arg0) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20CallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _UniswapV2ERC20.Contract.BalanceOf(&_UniswapV2ERC20.CallOpts, arg0) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_UniswapV2ERC20 *UniswapV2ERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _UniswapV2ERC20.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) Decimals() (uint8, error) { + return _UniswapV2ERC20.Contract.Decimals(&_UniswapV2ERC20.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_UniswapV2ERC20 *UniswapV2ERC20CallerSession) Decimals() (uint8, error) { + return _UniswapV2ERC20.Contract.Decimals(&_UniswapV2ERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_UniswapV2ERC20 *UniswapV2ERC20Caller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _UniswapV2ERC20.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) Name() (string, error) { + return _UniswapV2ERC20.Contract.Name(&_UniswapV2ERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_UniswapV2ERC20 *UniswapV2ERC20CallerSession) Name() (string, error) { + return _UniswapV2ERC20.Contract.Name(&_UniswapV2ERC20.CallOpts) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20Caller) Nonces(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _UniswapV2ERC20.contract.Call(opts, &out, "nonces", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) Nonces(arg0 common.Address) (*big.Int, error) { + return _UniswapV2ERC20.Contract.Nonces(&_UniswapV2ERC20.CallOpts, arg0) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20CallerSession) Nonces(arg0 common.Address) (*big.Int, error) { + return _UniswapV2ERC20.Contract.Nonces(&_UniswapV2ERC20.CallOpts, arg0) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_UniswapV2ERC20 *UniswapV2ERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _UniswapV2ERC20.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) Symbol() (string, error) { + return _UniswapV2ERC20.Contract.Symbol(&_UniswapV2ERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_UniswapV2ERC20 *UniswapV2ERC20CallerSession) Symbol() (string, error) { + return _UniswapV2ERC20.Contract.Symbol(&_UniswapV2ERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UniswapV2ERC20.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) TotalSupply() (*big.Int, error) { + return _UniswapV2ERC20.Contract.TotalSupply(&_UniswapV2ERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_UniswapV2ERC20 *UniswapV2ERC20CallerSession) TotalSupply() (*big.Int, error) { + return _UniswapV2ERC20.Contract.TotalSupply(&_UniswapV2ERC20.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_UniswapV2ERC20 *UniswapV2ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2ERC20.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.Approve(&_UniswapV2ERC20.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_UniswapV2ERC20 *UniswapV2ERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.Approve(&_UniswapV2ERC20.TransactOpts, spender, value) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_UniswapV2ERC20 *UniswapV2ERC20Transactor) Permit(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2ERC20.contract.Transact(opts, "permit", owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_UniswapV2ERC20 *UniswapV2ERC20Session) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.Permit(&_UniswapV2ERC20.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_UniswapV2ERC20 *UniswapV2ERC20TransactorSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.Permit(&_UniswapV2ERC20.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_UniswapV2ERC20 *UniswapV2ERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2ERC20.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.Transfer(&_UniswapV2ERC20.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_UniswapV2ERC20 *UniswapV2ERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.Transfer(&_UniswapV2ERC20.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_UniswapV2ERC20 *UniswapV2ERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2ERC20.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_UniswapV2ERC20 *UniswapV2ERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.TransferFrom(&_UniswapV2ERC20.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_UniswapV2ERC20 *UniswapV2ERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2ERC20.Contract.TransferFrom(&_UniswapV2ERC20.TransactOpts, from, to, value) +} + +// UniswapV2ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the UniswapV2ERC20 contract. +type UniswapV2ERC20ApprovalIterator struct { + Event *UniswapV2ERC20Approval // 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 *UniswapV2ERC20ApprovalIterator) 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(UniswapV2ERC20Approval) + 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(UniswapV2ERC20Approval) + 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 *UniswapV2ERC20ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapV2ERC20ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapV2ERC20Approval represents a Approval event raised by the UniswapV2ERC20 contract. +type UniswapV2ERC20Approval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_UniswapV2ERC20 *UniswapV2ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*UniswapV2ERC20ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _UniswapV2ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &UniswapV2ERC20ApprovalIterator{contract: _UniswapV2ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_UniswapV2ERC20 *UniswapV2ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *UniswapV2ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _UniswapV2ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + 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(UniswapV2ERC20Approval) + if err := _UniswapV2ERC20.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_UniswapV2ERC20 *UniswapV2ERC20Filterer) ParseApproval(log types.Log) (*UniswapV2ERC20Approval, error) { + event := new(UniswapV2ERC20Approval) + if err := _UniswapV2ERC20.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapV2ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the UniswapV2ERC20 contract. +type UniswapV2ERC20TransferIterator struct { + Event *UniswapV2ERC20Transfer // 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 *UniswapV2ERC20TransferIterator) 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(UniswapV2ERC20Transfer) + 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(UniswapV2ERC20Transfer) + 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 *UniswapV2ERC20TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapV2ERC20TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapV2ERC20Transfer represents a Transfer event raised by the UniswapV2ERC20 contract. +type UniswapV2ERC20Transfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_UniswapV2ERC20 *UniswapV2ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*UniswapV2ERC20TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _UniswapV2ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &UniswapV2ERC20TransferIterator{contract: _UniswapV2ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_UniswapV2ERC20 *UniswapV2ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *UniswapV2ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _UniswapV2ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + 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(UniswapV2ERC20Transfer) + if err := _UniswapV2ERC20.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_UniswapV2ERC20 *UniswapV2ERC20Filterer) ParseTransfer(log types.Log) (*UniswapV2ERC20Transfer, error) { + event := new(UniswapV2ERC20Transfer) + if err := _UniswapV2ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/uniswap/v2-core/contracts/uniswapv2factory.sol/uniswapv2factory.go b/pkg/contracts/uniswap/v2-core/contracts/uniswapv2factory.sol/uniswapv2factory.go new file mode 100644 index 0000000000..90df63d467 --- /dev/null +++ b/pkg/contracts/uniswap/v2-core/contracts/uniswapv2factory.sol/uniswapv2factory.go @@ -0,0 +1,576 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package uniswapv2factory + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// UniswapV2FactoryMetaData contains all meta data concerning the UniswapV2Factory contract. +var UniswapV2FactoryMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToSetter\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"PairCreated\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allPairs\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"allPairsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"}],\"name\":\"createPair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"feeToSetter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getPair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeTo\",\"type\":\"address\"}],\"name\":\"setFeeTo\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToSetter\",\"type\":\"address\"}],\"name\":\"setFeeToSetter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506040516136863803806136868339818101604052602081101561003357600080fd5b5051600180546001600160a01b0319166001600160a01b03909216919091179055613623806100636000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063a2e74af61161005b578063a2e74af6146100fd578063c9c6539614610132578063e6a439051461016d578063f46901ed146101a857610088565b8063017e7e581461008d578063094b7415146100be5780631e3dd18b146100c6578063574f2ba3146100e3575b600080fd5b6100956101db565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100956101f7565b610095600480360360208110156100dc57600080fd5b5035610213565b6100eb610247565b60408051918252519081900360200190f35b6101306004803603602081101561011357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661024d565b005b6100956004803603604081101561014857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602001351661031a565b6100956004803603604081101561018357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602001351661076d565b610130600480360360208110156101be57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166107a0565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6003818154811061022057fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60035490565b60015473ffffffffffffffffffffffffffffffffffffffff1633146102d357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e697377617056323a20464f5242494444454e000000000000000000000000604482015290519081900360640190fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156103b757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056323a204944454e544943414c5f4144445245535345530000604482015290519081900360640190fd5b6000808373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16106103f45783856103f7565b84845b909250905073ffffffffffffffffffffffffffffffffffffffff821661047e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f556e697377617056323a205a45524f5f41444452455353000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff82811660009081526002602090815260408083208585168452909152902054161561051f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f556e697377617056323a20504149525f45584953545300000000000000000000604482015290519081900360640190fd5b6060604051806020016105319061086d565b6020820181038252601f19601f82011660405250905060008383604051602001808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140192505050604051602081830303815290604052805190602001209050808251602084016000f5604080517f485cc95500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152868116602483015291519297509087169163485cc9559160448082019260009290919082900301818387803b15801561065e57600080fd5b505af1158015610672573d6000803e3d6000fd5b5050505073ffffffffffffffffffffffffffffffffffffffff84811660008181526002602081815260408084208987168086529083528185208054978d167fffffffffffffffffffffffff000000000000000000000000000000000000000098891681179091559383528185208686528352818520805488168517905560038054600181018255958190527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90950180549097168417909655925483519283529082015281517f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9929181900390910190a35050505092915050565b600260209081526000928352604080842090915290825290205473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461082657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e697377617056323a20464f5242494444454e000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b612d748061087b8339019056fe60806040526001600c5534801561001557600080fd5b506040514690806052612d228239604080519182900360520182208282018252600a8352692ab734b9bbb0b8102b1960b11b6020938401528151808301835260018152603160f81b908401528151808401919091527fbfcc8ef98ffbf7b6c3fec7bf5185b566b9863e35a9d83acd49ad6824b5969738818301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101949094523060a0808601919091528151808603909101815260c09094019052825192019190912060035550600580546001600160a01b03191633179055612c1d806101056000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c80636a627842116100f9578063ba9a7a5611610097578063d21220a711610071578063d21220a7146105da578063d505accf146105e2578063dd62ed3e14610640578063fff6cae91461067b576101b9565b8063ba9a7a5614610597578063bc25cf771461059f578063c45a0155146105d2576101b9565b80637ecebe00116100d35780637ecebe00146104d757806389afcb441461050a57806395d89b4114610556578063a9059cbb1461055e576101b9565b80636a6278421461046957806370a082311461049c5780637464fc3d146104cf576101b9565b806323b872dd116101665780633644e515116101405780633644e51514610416578063485cc9551461041e5780635909c0d5146104595780635a3d549314610461576101b9565b806323b872dd146103ad57806330adf81f146103f0578063313ce567146103f8576101b9565b8063095ea7b311610197578063095ea7b3146103155780630dfe16811461036257806318160ddd14610393576101b9565b8063022c0d9f146101be57806306fdde03146102595780630902f1ac146102d6575b600080fd5b610257600480360360808110156101d457600080fd5b81359160208101359173ffffffffffffffffffffffffffffffffffffffff604083013516919081019060808101606082013564010000000081111561021857600080fd5b82018360208201111561022a57600080fd5b8035906020019184600183028401116401000000008311171561024c57600080fd5b509092509050610683565b005b610261610d57565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029b578181015183820152602001610283565b50505050905090810190601f1680156102c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102de610d90565b604080516dffffffffffffffffffffffffffff948516815292909316602083015263ffffffff168183015290519081900360600190f35b61034e6004803603604081101561032b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610de5565b604080519115158252519081900360200190f35b61036a610dfc565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039b610e18565b60408051918252519081900360200190f35b61034e600480360360608110156103c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610e1e565b61039b610efd565b610400610f21565b6040805160ff9092168252519081900360200190f35b61039b610f26565b6102576004803603604081101561043457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610f2c565b61039b611005565b61039b61100b565b61039b6004803603602081101561047f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611011565b61039b600480360360208110156104b257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113cb565b61039b6113dd565b61039b600480360360208110156104ed57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113e3565b61053d6004803603602081101561052057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113f5565b6040805192835260208301919091528051918290030190f35b610261611892565b61034e6004803603604081101561057457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356118cb565b61039b6118d8565b610257600480360360208110156105b557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118de565b61036a611ad4565b61036a611af0565b610257600480360360e08110156105f857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611b0c565b61039b6004803603604081101561065657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611dd8565b610257611df5565b600c546001146106f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55841515806107075750600084115b61075c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612b2f6025913960400191505060405180910390fd5b600080610767610d90565b5091509150816dffffffffffffffffffffffffffff168710801561079a5750806dffffffffffffffffffffffffffff1686105b6107ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612b786021913960400191505060405180910390fd5b600654600754600091829173ffffffffffffffffffffffffffffffffffffffff91821691908116908916821480159061085457508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614155b6108bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f556e697377617056323a20494e56414c49445f544f0000000000000000000000604482015290519081900360640190fd5b8a156108d0576108d0828a8d611fdb565b89156108e1576108e1818a8c611fdb565b86156109c3578873ffffffffffffffffffffffffffffffffffffffff166310d1e85c338d8d8c8c6040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b1580156109aa57600080fd5b505af11580156109be573d6000803e3d6000fd5b505050505b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b158015610a2f57600080fd5b505afa158015610a43573d6000803e3d6000fd5b505050506040513d6020811015610a5957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191955073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b158015610acb57600080fd5b505afa158015610adf573d6000803e3d6000fd5b505050506040513d6020811015610af557600080fd5b5051925060009150506dffffffffffffffffffffffffffff85168a90038311610b1f576000610b35565b89856dffffffffffffffffffffffffffff160383035b9050600089856dffffffffffffffffffffffffffff16038311610b59576000610b6f565b89856dffffffffffffffffffffffffffff160383035b90506000821180610b805750600081115b610bd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612b546024913960400191505060405180910390fd5b6000610c09610beb84600363ffffffff6121e816565b610bfd876103e863ffffffff6121e816565b9063ffffffff61226e16565b90506000610c21610beb84600363ffffffff6121e816565b9050610c59620f4240610c4d6dffffffffffffffffffffffffffff8b8116908b1663ffffffff6121e816565b9063ffffffff6121e816565b610c69838363ffffffff6121e816565b1015610cd657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f556e697377617056323a204b0000000000000000000000000000000000000000604482015290519081900360640190fd5b5050610ce4848488886122e0565b60408051838152602081018390528082018d9052606081018c9052905173ffffffffffffffffffffffffffffffffffffffff8b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600c55505050505050505050565b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b6008546dffffffffffffffffffffffffffff808216926e0100000000000000000000000000008304909116917c0100000000000000000000000000000000000000000000000000000000900463ffffffff1690565b6000610df233848461259c565b5060015b92915050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610ee85773ffffffffffffffffffffffffffffffffffffffff84166000908152600260209081526040808320338452909152902054610eb6908363ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020555b610ef384848461260b565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60035481565b60055473ffffffffffffffffffffffffffffffffffffffff163314610fb257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e697377617056323a20464f5242494444454e000000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560078054929093169116179055565b60095481565b600a5481565b6000600c5460011461108457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611094610d90565b50600654604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905193955091935060009273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b15801561110e57600080fd5b505afa158015611122573d6000803e3d6000fd5b505050506040513d602081101561113857600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905192935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156111b157600080fd5b505afa1580156111c5573d6000803e3d6000fd5b505050506040513d60208110156111db57600080fd5b505190506000611201836dffffffffffffffffffffffffffff871663ffffffff61226e16565b90506000611225836dffffffffffffffffffffffffffff871663ffffffff61226e16565b9050600061123387876126ec565b600054909150806112705761125c6103e8610bfd611257878763ffffffff6121e816565b612878565b985061126b60006103e86128ca565b6112cd565b6112ca6dffffffffffffffffffffffffffff8916611294868463ffffffff6121e816565b8161129b57fe5b046dffffffffffffffffffffffffffff89166112bd868563ffffffff6121e816565b816112c457fe5b0461297a565b98505b60008911611326576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612bc16028913960400191505060405180910390fd5b6113308a8a6128ca565b61133c86868a8a6122e0565b811561137e5760085461137a906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600c5550949695505050505050565b60016020526000908152604090205481565b600b5481565b60046020526000908152604090205481565b600080600c5460011461146957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611479610d90565b50600654600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905194965092945073ffffffffffffffffffffffffffffffffffffffff9182169391169160009184916370a08231916024808301926020929190829003018186803b1580156114fb57600080fd5b505afa15801561150f573d6000803e3d6000fd5b505050506040513d602081101561152557600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8516916370a08231916024808301926020929190829003018186803b15801561159957600080fd5b505afa1580156115ad573d6000803e3d6000fd5b505050506040513d60208110156115c357600080fd5b5051306000908152600160205260408120549192506115e288886126ec565b600054909150806115f9848763ffffffff6121e816565b8161160057fe5b049a5080611614848663ffffffff6121e816565b8161161b57fe5b04995060008b11801561162e575060008a115b611683576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612b996028913960400191505060405180910390fd5b61168d3084612992565b611698878d8d611fdb565b6116a3868d8c611fdb565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b15801561170f57600080fd5b505afa158015611723573d6000803e3d6000fd5b505050506040513d602081101561173957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191965073ffffffffffffffffffffffffffffffffffffffff8816916370a0823191602480820192602092909190829003018186803b1580156117ab57600080fd5b505afa1580156117bf573d6000803e3d6000fd5b505050506040513d60208110156117d557600080fd5b505193506117e585858b8b6122e0565b811561182757600854611823906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b604080518c8152602081018c9052815173ffffffffffffffffffffffffffffffffffffffff8f169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a35050505050505050506001600c81905550915091565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b6000610df233848461260b565b6103e881565b600c5460011461194f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654600754600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff9485169490931692611a2b9285928792611a26926dffffffffffffffffffffffffffff169185916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b505afa158015611a02573d6000803e3d6000fd5b505050506040513d6020811015611a1857600080fd5b50519063ffffffff61226e16565b611fdb565b600854604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611aca9284928792611a26926e01000000000000000000000000000090046dffffffffffffffffffffffffffff169173ffffffffffffffffffffffffffffffffffffffff8616916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b50506001600c5550565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b42841015611b7b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f556e697377617056323a20455850495245440000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff80891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015611cdc573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590611d5757508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611dc257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f556e697377617056323a20494e56414c49445f5349474e415455524500000000604482015290519081900360640190fd5b611dcd89898961259c565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b600c54600114611e6657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611fd49273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015611edd57600080fd5b505afa158015611ef1573d6000803e3d6000fd5b505050506040513d6020811015611f0757600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015611f7a57600080fd5b505afa158015611f8e573d6000803e3d6000fd5b505050506040513d6020811015611fa457600080fd5b50516008546dffffffffffffffffffffffffffff808216916e0100000000000000000000000000009004166122e0565b6001600c55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009460609489169392918291908083835b602083106120e157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016120a4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612143576040519150601f19603f3d011682016040523d82523d6000602084013e612148565b606091505b5091509150818015612176575080511580612176575080806020019051602081101561217357600080fd5b50515b6121e157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f556e697377617056323a205452414e534645525f4641494c4544000000000000604482015290519081900360640190fd5b5050505050565b60008115806122035750508082028282828161220057fe5b04145b610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b80820382811115610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b6dffffffffffffffffffffffffffff841180159061230c57506dffffffffffffffffffffffffffff8311155b61237757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f556e697377617056323a204f564552464c4f5700000000000000000000000000604482015290519081900360640190fd5b60085463ffffffff428116917c0100000000000000000000000000000000000000000000000000000000900481168203908116158015906123c757506dffffffffffffffffffffffffffff841615155b80156123e257506dffffffffffffffffffffffffffff831615155b15612492578063ffffffff16612425856123fb86612a57565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff612a7b16565b600980547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092169290920201905563ffffffff8116612465846123fb87612a57565b600a80547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216929092020190555b600880547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000166dffffffffffffffffffffffffffff888116919091177fffffffff0000000000000000000000000000ffffffffffffffffffffffffffff166e0100000000000000000000000000008883168102919091177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054612641908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054612683908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b15801561275757600080fd5b505afa15801561276b573d6000803e3d6000fd5b505050506040513d602081101561278157600080fd5b5051600b5473ffffffffffffffffffffffffffffffffffffffff821615801594509192509061286457801561285f5760006127d86112576dffffffffffffffffffffffffffff88811690881663ffffffff6121e816565b905060006127e583612878565b90508082111561285c576000612813612804848463ffffffff61226e16565b6000549063ffffffff6121e816565b905060006128388361282c86600563ffffffff6121e816565b9063ffffffff612abc16565b9050600081838161284557fe5b04905080156128585761285887826128ca565b5050505b50505b612870565b8015612870576000600b555b505092915050565b600060038211156128bb575080600160028204015b818110156128b5578091506002818285816128a457fe5b0401816128ad57fe5b04905061288d565b506128c5565b81156128c5575060015b919050565b6000546128dd908263ffffffff612abc16565b600090815573ffffffffffffffffffffffffffffffffffffffff8316815260016020526040902054612915908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000818310612989578161298b565b825b9392505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546129c8908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081209190915554612a02908263ffffffff61226e16565b600090815560408051838152905173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff841681612ab457fe5b049392505050565b80820182811015610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe556e697377617056323a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f494e5055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f4c4951554944495459556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4255524e4544556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4d494e544544a265627a7a72315820841b93a7dff584da07aecb7efe1de139d1b94052d48051f920879ff29f44c0f264736f6c63430005100032454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429a265627a7a7231582077bc274fa98d252ff2309addaae7f2e624d726c5087635460bbf380e8727721864736f6c63430005100032", +} + +// UniswapV2FactoryABI is the input ABI used to generate the binding from. +// Deprecated: Use UniswapV2FactoryMetaData.ABI instead. +var UniswapV2FactoryABI = UniswapV2FactoryMetaData.ABI + +// UniswapV2FactoryBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use UniswapV2FactoryMetaData.Bin instead. +var UniswapV2FactoryBin = UniswapV2FactoryMetaData.Bin + +// DeployUniswapV2Factory deploys a new Ethereum contract, binding an instance of UniswapV2Factory to it. +func DeployUniswapV2Factory(auth *bind.TransactOpts, backend bind.ContractBackend, _feeToSetter common.Address) (common.Address, *types.Transaction, *UniswapV2Factory, error) { + parsed, err := UniswapV2FactoryMetaData.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(UniswapV2FactoryBin), backend, _feeToSetter) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &UniswapV2Factory{UniswapV2FactoryCaller: UniswapV2FactoryCaller{contract: contract}, UniswapV2FactoryTransactor: UniswapV2FactoryTransactor{contract: contract}, UniswapV2FactoryFilterer: UniswapV2FactoryFilterer{contract: contract}}, nil +} + +// UniswapV2Factory is an auto generated Go binding around an Ethereum contract. +type UniswapV2Factory struct { + UniswapV2FactoryCaller // Read-only binding to the contract + UniswapV2FactoryTransactor // Write-only binding to the contract + UniswapV2FactoryFilterer // Log filterer for contract events +} + +// UniswapV2FactoryCaller is an auto generated read-only Go binding around an Ethereum contract. +type UniswapV2FactoryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2FactoryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type UniswapV2FactoryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2FactoryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UniswapV2FactoryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2FactorySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UniswapV2FactorySession struct { + Contract *UniswapV2Factory // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UniswapV2FactoryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UniswapV2FactoryCallerSession struct { + Contract *UniswapV2FactoryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UniswapV2FactoryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UniswapV2FactoryTransactorSession struct { + Contract *UniswapV2FactoryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UniswapV2FactoryRaw is an auto generated low-level Go binding around an Ethereum contract. +type UniswapV2FactoryRaw struct { + Contract *UniswapV2Factory // Generic contract binding to access the raw methods on +} + +// UniswapV2FactoryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UniswapV2FactoryCallerRaw struct { + Contract *UniswapV2FactoryCaller // Generic read-only contract binding to access the raw methods on +} + +// UniswapV2FactoryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UniswapV2FactoryTransactorRaw struct { + Contract *UniswapV2FactoryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewUniswapV2Factory creates a new instance of UniswapV2Factory, bound to a specific deployed contract. +func NewUniswapV2Factory(address common.Address, backend bind.ContractBackend) (*UniswapV2Factory, error) { + contract, err := bindUniswapV2Factory(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UniswapV2Factory{UniswapV2FactoryCaller: UniswapV2FactoryCaller{contract: contract}, UniswapV2FactoryTransactor: UniswapV2FactoryTransactor{contract: contract}, UniswapV2FactoryFilterer: UniswapV2FactoryFilterer{contract: contract}}, nil +} + +// NewUniswapV2FactoryCaller creates a new read-only instance of UniswapV2Factory, bound to a specific deployed contract. +func NewUniswapV2FactoryCaller(address common.Address, caller bind.ContractCaller) (*UniswapV2FactoryCaller, error) { + contract, err := bindUniswapV2Factory(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UniswapV2FactoryCaller{contract: contract}, nil +} + +// NewUniswapV2FactoryTransactor creates a new write-only instance of UniswapV2Factory, bound to a specific deployed contract. +func NewUniswapV2FactoryTransactor(address common.Address, transactor bind.ContractTransactor) (*UniswapV2FactoryTransactor, error) { + contract, err := bindUniswapV2Factory(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UniswapV2FactoryTransactor{contract: contract}, nil +} + +// NewUniswapV2FactoryFilterer creates a new log filterer instance of UniswapV2Factory, bound to a specific deployed contract. +func NewUniswapV2FactoryFilterer(address common.Address, filterer bind.ContractFilterer) (*UniswapV2FactoryFilterer, error) { + contract, err := bindUniswapV2Factory(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UniswapV2FactoryFilterer{contract: contract}, nil +} + +// bindUniswapV2Factory binds a generic wrapper to an already deployed contract. +func bindUniswapV2Factory(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := UniswapV2FactoryMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UniswapV2Factory *UniswapV2FactoryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2Factory.Contract.UniswapV2FactoryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UniswapV2Factory *UniswapV2FactoryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2Factory.Contract.UniswapV2FactoryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapV2Factory *UniswapV2FactoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2Factory.Contract.UniswapV2FactoryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UniswapV2Factory *UniswapV2FactoryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2Factory.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UniswapV2Factory *UniswapV2FactoryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2Factory.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapV2Factory *UniswapV2FactoryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2Factory.Contract.contract.Transact(opts, method, params...) +} + +// AllPairs is a free data retrieval call binding the contract method 0x1e3dd18b. +// +// Solidity: function allPairs(uint256 ) view returns(address) +func (_UniswapV2Factory *UniswapV2FactoryCaller) AllPairs(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var out []interface{} + err := _UniswapV2Factory.contract.Call(opts, &out, "allPairs", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AllPairs is a free data retrieval call binding the contract method 0x1e3dd18b. +// +// Solidity: function allPairs(uint256 ) view returns(address) +func (_UniswapV2Factory *UniswapV2FactorySession) AllPairs(arg0 *big.Int) (common.Address, error) { + return _UniswapV2Factory.Contract.AllPairs(&_UniswapV2Factory.CallOpts, arg0) +} + +// AllPairs is a free data retrieval call binding the contract method 0x1e3dd18b. +// +// Solidity: function allPairs(uint256 ) view returns(address) +func (_UniswapV2Factory *UniswapV2FactoryCallerSession) AllPairs(arg0 *big.Int) (common.Address, error) { + return _UniswapV2Factory.Contract.AllPairs(&_UniswapV2Factory.CallOpts, arg0) +} + +// AllPairsLength is a free data retrieval call binding the contract method 0x574f2ba3. +// +// Solidity: function allPairsLength() view returns(uint256) +func (_UniswapV2Factory *UniswapV2FactoryCaller) AllPairsLength(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Factory.contract.Call(opts, &out, "allPairsLength") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// AllPairsLength is a free data retrieval call binding the contract method 0x574f2ba3. +// +// Solidity: function allPairsLength() view returns(uint256) +func (_UniswapV2Factory *UniswapV2FactorySession) AllPairsLength() (*big.Int, error) { + return _UniswapV2Factory.Contract.AllPairsLength(&_UniswapV2Factory.CallOpts) +} + +// AllPairsLength is a free data retrieval call binding the contract method 0x574f2ba3. +// +// Solidity: function allPairsLength() view returns(uint256) +func (_UniswapV2Factory *UniswapV2FactoryCallerSession) AllPairsLength() (*big.Int, error) { + return _UniswapV2Factory.Contract.AllPairsLength(&_UniswapV2Factory.CallOpts) +} + +// FeeTo is a free data retrieval call binding the contract method 0x017e7e58. +// +// Solidity: function feeTo() view returns(address) +func (_UniswapV2Factory *UniswapV2FactoryCaller) FeeTo(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _UniswapV2Factory.contract.Call(opts, &out, "feeTo") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FeeTo is a free data retrieval call binding the contract method 0x017e7e58. +// +// Solidity: function feeTo() view returns(address) +func (_UniswapV2Factory *UniswapV2FactorySession) FeeTo() (common.Address, error) { + return _UniswapV2Factory.Contract.FeeTo(&_UniswapV2Factory.CallOpts) +} + +// FeeTo is a free data retrieval call binding the contract method 0x017e7e58. +// +// Solidity: function feeTo() view returns(address) +func (_UniswapV2Factory *UniswapV2FactoryCallerSession) FeeTo() (common.Address, error) { + return _UniswapV2Factory.Contract.FeeTo(&_UniswapV2Factory.CallOpts) +} + +// FeeToSetter is a free data retrieval call binding the contract method 0x094b7415. +// +// Solidity: function feeToSetter() view returns(address) +func (_UniswapV2Factory *UniswapV2FactoryCaller) FeeToSetter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _UniswapV2Factory.contract.Call(opts, &out, "feeToSetter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FeeToSetter is a free data retrieval call binding the contract method 0x094b7415. +// +// Solidity: function feeToSetter() view returns(address) +func (_UniswapV2Factory *UniswapV2FactorySession) FeeToSetter() (common.Address, error) { + return _UniswapV2Factory.Contract.FeeToSetter(&_UniswapV2Factory.CallOpts) +} + +// FeeToSetter is a free data retrieval call binding the contract method 0x094b7415. +// +// Solidity: function feeToSetter() view returns(address) +func (_UniswapV2Factory *UniswapV2FactoryCallerSession) FeeToSetter() (common.Address, error) { + return _UniswapV2Factory.Contract.FeeToSetter(&_UniswapV2Factory.CallOpts) +} + +// GetPair is a free data retrieval call binding the contract method 0xe6a43905. +// +// Solidity: function getPair(address , address ) view returns(address) +func (_UniswapV2Factory *UniswapV2FactoryCaller) GetPair(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (common.Address, error) { + var out []interface{} + err := _UniswapV2Factory.contract.Call(opts, &out, "getPair", arg0, arg1) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetPair is a free data retrieval call binding the contract method 0xe6a43905. +// +// Solidity: function getPair(address , address ) view returns(address) +func (_UniswapV2Factory *UniswapV2FactorySession) GetPair(arg0 common.Address, arg1 common.Address) (common.Address, error) { + return _UniswapV2Factory.Contract.GetPair(&_UniswapV2Factory.CallOpts, arg0, arg1) +} + +// GetPair is a free data retrieval call binding the contract method 0xe6a43905. +// +// Solidity: function getPair(address , address ) view returns(address) +func (_UniswapV2Factory *UniswapV2FactoryCallerSession) GetPair(arg0 common.Address, arg1 common.Address) (common.Address, error) { + return _UniswapV2Factory.Contract.GetPair(&_UniswapV2Factory.CallOpts, arg0, arg1) +} + +// CreatePair is a paid mutator transaction binding the contract method 0xc9c65396. +// +// Solidity: function createPair(address tokenA, address tokenB) returns(address pair) +func (_UniswapV2Factory *UniswapV2FactoryTransactor) CreatePair(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { + return _UniswapV2Factory.contract.Transact(opts, "createPair", tokenA, tokenB) +} + +// CreatePair is a paid mutator transaction binding the contract method 0xc9c65396. +// +// Solidity: function createPair(address tokenA, address tokenB) returns(address pair) +func (_UniswapV2Factory *UniswapV2FactorySession) CreatePair(tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { + return _UniswapV2Factory.Contract.CreatePair(&_UniswapV2Factory.TransactOpts, tokenA, tokenB) +} + +// CreatePair is a paid mutator transaction binding the contract method 0xc9c65396. +// +// Solidity: function createPair(address tokenA, address tokenB) returns(address pair) +func (_UniswapV2Factory *UniswapV2FactoryTransactorSession) CreatePair(tokenA common.Address, tokenB common.Address) (*types.Transaction, error) { + return _UniswapV2Factory.Contract.CreatePair(&_UniswapV2Factory.TransactOpts, tokenA, tokenB) +} + +// SetFeeTo is a paid mutator transaction binding the contract method 0xf46901ed. +// +// Solidity: function setFeeTo(address _feeTo) returns() +func (_UniswapV2Factory *UniswapV2FactoryTransactor) SetFeeTo(opts *bind.TransactOpts, _feeTo common.Address) (*types.Transaction, error) { + return _UniswapV2Factory.contract.Transact(opts, "setFeeTo", _feeTo) +} + +// SetFeeTo is a paid mutator transaction binding the contract method 0xf46901ed. +// +// Solidity: function setFeeTo(address _feeTo) returns() +func (_UniswapV2Factory *UniswapV2FactorySession) SetFeeTo(_feeTo common.Address) (*types.Transaction, error) { + return _UniswapV2Factory.Contract.SetFeeTo(&_UniswapV2Factory.TransactOpts, _feeTo) +} + +// SetFeeTo is a paid mutator transaction binding the contract method 0xf46901ed. +// +// Solidity: function setFeeTo(address _feeTo) returns() +func (_UniswapV2Factory *UniswapV2FactoryTransactorSession) SetFeeTo(_feeTo common.Address) (*types.Transaction, error) { + return _UniswapV2Factory.Contract.SetFeeTo(&_UniswapV2Factory.TransactOpts, _feeTo) +} + +// SetFeeToSetter is a paid mutator transaction binding the contract method 0xa2e74af6. +// +// Solidity: function setFeeToSetter(address _feeToSetter) returns() +func (_UniswapV2Factory *UniswapV2FactoryTransactor) SetFeeToSetter(opts *bind.TransactOpts, _feeToSetter common.Address) (*types.Transaction, error) { + return _UniswapV2Factory.contract.Transact(opts, "setFeeToSetter", _feeToSetter) +} + +// SetFeeToSetter is a paid mutator transaction binding the contract method 0xa2e74af6. +// +// Solidity: function setFeeToSetter(address _feeToSetter) returns() +func (_UniswapV2Factory *UniswapV2FactorySession) SetFeeToSetter(_feeToSetter common.Address) (*types.Transaction, error) { + return _UniswapV2Factory.Contract.SetFeeToSetter(&_UniswapV2Factory.TransactOpts, _feeToSetter) +} + +// SetFeeToSetter is a paid mutator transaction binding the contract method 0xa2e74af6. +// +// Solidity: function setFeeToSetter(address _feeToSetter) returns() +func (_UniswapV2Factory *UniswapV2FactoryTransactorSession) SetFeeToSetter(_feeToSetter common.Address) (*types.Transaction, error) { + return _UniswapV2Factory.Contract.SetFeeToSetter(&_UniswapV2Factory.TransactOpts, _feeToSetter) +} + +// UniswapV2FactoryPairCreatedIterator is returned from FilterPairCreated and is used to iterate over the raw logs and unpacked data for PairCreated events raised by the UniswapV2Factory contract. +type UniswapV2FactoryPairCreatedIterator struct { + Event *UniswapV2FactoryPairCreated // 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 *UniswapV2FactoryPairCreatedIterator) 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(UniswapV2FactoryPairCreated) + 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(UniswapV2FactoryPairCreated) + 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 *UniswapV2FactoryPairCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapV2FactoryPairCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapV2FactoryPairCreated represents a PairCreated event raised by the UniswapV2Factory contract. +type UniswapV2FactoryPairCreated struct { + Token0 common.Address + Token1 common.Address + Pair common.Address + Arg3 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPairCreated is a free log retrieval operation binding the contract event 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9. +// +// Solidity: event PairCreated(address indexed token0, address indexed token1, address pair, uint256 arg3) +func (_UniswapV2Factory *UniswapV2FactoryFilterer) FilterPairCreated(opts *bind.FilterOpts, token0 []common.Address, token1 []common.Address) (*UniswapV2FactoryPairCreatedIterator, error) { + + var token0Rule []interface{} + for _, token0Item := range token0 { + token0Rule = append(token0Rule, token0Item) + } + var token1Rule []interface{} + for _, token1Item := range token1 { + token1Rule = append(token1Rule, token1Item) + } + + logs, sub, err := _UniswapV2Factory.contract.FilterLogs(opts, "PairCreated", token0Rule, token1Rule) + if err != nil { + return nil, err + } + return &UniswapV2FactoryPairCreatedIterator{contract: _UniswapV2Factory.contract, event: "PairCreated", logs: logs, sub: sub}, nil +} + +// WatchPairCreated is a free log subscription operation binding the contract event 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9. +// +// Solidity: event PairCreated(address indexed token0, address indexed token1, address pair, uint256 arg3) +func (_UniswapV2Factory *UniswapV2FactoryFilterer) WatchPairCreated(opts *bind.WatchOpts, sink chan<- *UniswapV2FactoryPairCreated, token0 []common.Address, token1 []common.Address) (event.Subscription, error) { + + var token0Rule []interface{} + for _, token0Item := range token0 { + token0Rule = append(token0Rule, token0Item) + } + var token1Rule []interface{} + for _, token1Item := range token1 { + token1Rule = append(token1Rule, token1Item) + } + + logs, sub, err := _UniswapV2Factory.contract.WatchLogs(opts, "PairCreated", token0Rule, token1Rule) + 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(UniswapV2FactoryPairCreated) + if err := _UniswapV2Factory.contract.UnpackLog(event, "PairCreated", 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 +} + +// ParsePairCreated is a log parse operation binding the contract event 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9. +// +// Solidity: event PairCreated(address indexed token0, address indexed token1, address pair, uint256 arg3) +func (_UniswapV2Factory *UniswapV2FactoryFilterer) ParsePairCreated(log types.Log) (*UniswapV2FactoryPairCreated, error) { + event := new(UniswapV2FactoryPairCreated) + if err := _UniswapV2Factory.contract.UnpackLog(event, "PairCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/uniswap/v2-core/contracts/uniswapv2pair.sol/uniswapv2pair.go b/pkg/contracts/uniswap/v2-core/contracts/uniswapv2pair.sol/uniswapv2pair.go new file mode 100644 index 0000000000..e96f23912f --- /dev/null +++ b/pkg/contracts/uniswap/v2-core/contracts/uniswapv2pair.sol/uniswapv2pair.go @@ -0,0 +1,1864 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package uniswapv2pair + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// UniswapV2PairMetaData contains all meta data concerning the UniswapV2Pair contract. +var UniswapV2PairMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0Out\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1Out\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint112\",\"name\":\"reserve0\",\"type\":\"uint112\"},{\"indexed\":false,\"internalType\":\"uint112\",\"name\":\"reserve1\",\"type\":\"uint112\"}],\"name\":\"Sync\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MINIMUM_LIQUIDITY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getReserves\",\"outputs\":[{\"internalType\":\"uint112\",\"name\":\"_reserve0\",\"type\":\"uint112\"},{\"internalType\":\"uint112\",\"name\":\"_reserve1\",\"type\":\"uint112\"},{\"internalType\":\"uint32\",\"name\":\"_blockTimestampLast\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token0\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token1\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"price0CumulativeLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"price1CumulativeLast\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"skim\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Out\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Out\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"sync\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token0\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token1\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040526001600c5534801561001557600080fd5b506040514690806052612d228239604080519182900360520182208282018252600a8352692ab734b9bbb0b8102b1960b11b6020938401528151808301835260018152603160f81b908401528151808401919091527fbfcc8ef98ffbf7b6c3fec7bf5185b566b9863e35a9d83acd49ad6824b5969738818301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101949094523060a0808601919091528151808603909101815260c09094019052825192019190912060035550600580546001600160a01b03191633179055612c1d806101056000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c80636a627842116100f9578063ba9a7a5611610097578063d21220a711610071578063d21220a7146105da578063d505accf146105e2578063dd62ed3e14610640578063fff6cae91461067b576101b9565b8063ba9a7a5614610597578063bc25cf771461059f578063c45a0155146105d2576101b9565b80637ecebe00116100d35780637ecebe00146104d757806389afcb441461050a57806395d89b4114610556578063a9059cbb1461055e576101b9565b80636a6278421461046957806370a082311461049c5780637464fc3d146104cf576101b9565b806323b872dd116101665780633644e515116101405780633644e51514610416578063485cc9551461041e5780635909c0d5146104595780635a3d549314610461576101b9565b806323b872dd146103ad57806330adf81f146103f0578063313ce567146103f8576101b9565b8063095ea7b311610197578063095ea7b3146103155780630dfe16811461036257806318160ddd14610393576101b9565b8063022c0d9f146101be57806306fdde03146102595780630902f1ac146102d6575b600080fd5b610257600480360360808110156101d457600080fd5b81359160208101359173ffffffffffffffffffffffffffffffffffffffff604083013516919081019060808101606082013564010000000081111561021857600080fd5b82018360208201111561022a57600080fd5b8035906020019184600183028401116401000000008311171561024c57600080fd5b509092509050610683565b005b610261610d57565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029b578181015183820152602001610283565b50505050905090810190601f1680156102c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102de610d90565b604080516dffffffffffffffffffffffffffff948516815292909316602083015263ffffffff168183015290519081900360600190f35b61034e6004803603604081101561032b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610de5565b604080519115158252519081900360200190f35b61036a610dfc565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039b610e18565b60408051918252519081900360200190f35b61034e600480360360608110156103c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610e1e565b61039b610efd565b610400610f21565b6040805160ff9092168252519081900360200190f35b61039b610f26565b6102576004803603604081101561043457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610f2c565b61039b611005565b61039b61100b565b61039b6004803603602081101561047f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611011565b61039b600480360360208110156104b257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113cb565b61039b6113dd565b61039b600480360360208110156104ed57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113e3565b61053d6004803603602081101561052057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113f5565b6040805192835260208301919091528051918290030190f35b610261611892565b61034e6004803603604081101561057457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356118cb565b61039b6118d8565b610257600480360360208110156105b557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118de565b61036a611ad4565b61036a611af0565b610257600480360360e08110156105f857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611b0c565b61039b6004803603604081101561065657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611dd8565b610257611df5565b600c546001146106f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55841515806107075750600084115b61075c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612b2f6025913960400191505060405180910390fd5b600080610767610d90565b5091509150816dffffffffffffffffffffffffffff168710801561079a5750806dffffffffffffffffffffffffffff1686105b6107ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612b786021913960400191505060405180910390fd5b600654600754600091829173ffffffffffffffffffffffffffffffffffffffff91821691908116908916821480159061085457508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614155b6108bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f556e697377617056323a20494e56414c49445f544f0000000000000000000000604482015290519081900360640190fd5b8a156108d0576108d0828a8d611fdb565b89156108e1576108e1818a8c611fdb565b86156109c3578873ffffffffffffffffffffffffffffffffffffffff166310d1e85c338d8d8c8c6040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b1580156109aa57600080fd5b505af11580156109be573d6000803e3d6000fd5b505050505b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b158015610a2f57600080fd5b505afa158015610a43573d6000803e3d6000fd5b505050506040513d6020811015610a5957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191955073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b158015610acb57600080fd5b505afa158015610adf573d6000803e3d6000fd5b505050506040513d6020811015610af557600080fd5b5051925060009150506dffffffffffffffffffffffffffff85168a90038311610b1f576000610b35565b89856dffffffffffffffffffffffffffff160383035b9050600089856dffffffffffffffffffffffffffff16038311610b59576000610b6f565b89856dffffffffffffffffffffffffffff160383035b90506000821180610b805750600081115b610bd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612b546024913960400191505060405180910390fd5b6000610c09610beb84600363ffffffff6121e816565b610bfd876103e863ffffffff6121e816565b9063ffffffff61226e16565b90506000610c21610beb84600363ffffffff6121e816565b9050610c59620f4240610c4d6dffffffffffffffffffffffffffff8b8116908b1663ffffffff6121e816565b9063ffffffff6121e816565b610c69838363ffffffff6121e816565b1015610cd657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f556e697377617056323a204b0000000000000000000000000000000000000000604482015290519081900360640190fd5b5050610ce4848488886122e0565b60408051838152602081018390528082018d9052606081018c9052905173ffffffffffffffffffffffffffffffffffffffff8b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600c55505050505050505050565b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b6008546dffffffffffffffffffffffffffff808216926e0100000000000000000000000000008304909116917c0100000000000000000000000000000000000000000000000000000000900463ffffffff1690565b6000610df233848461259c565b5060015b92915050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610ee85773ffffffffffffffffffffffffffffffffffffffff84166000908152600260209081526040808320338452909152902054610eb6908363ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020555b610ef384848461260b565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60035481565b60055473ffffffffffffffffffffffffffffffffffffffff163314610fb257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e697377617056323a20464f5242494444454e000000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560078054929093169116179055565b60095481565b600a5481565b6000600c5460011461108457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611094610d90565b50600654604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905193955091935060009273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b15801561110e57600080fd5b505afa158015611122573d6000803e3d6000fd5b505050506040513d602081101561113857600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905192935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156111b157600080fd5b505afa1580156111c5573d6000803e3d6000fd5b505050506040513d60208110156111db57600080fd5b505190506000611201836dffffffffffffffffffffffffffff871663ffffffff61226e16565b90506000611225836dffffffffffffffffffffffffffff871663ffffffff61226e16565b9050600061123387876126ec565b600054909150806112705761125c6103e8610bfd611257878763ffffffff6121e816565b612878565b985061126b60006103e86128ca565b6112cd565b6112ca6dffffffffffffffffffffffffffff8916611294868463ffffffff6121e816565b8161129b57fe5b046dffffffffffffffffffffffffffff89166112bd868563ffffffff6121e816565b816112c457fe5b0461297a565b98505b60008911611326576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612bc16028913960400191505060405180910390fd5b6113308a8a6128ca565b61133c86868a8a6122e0565b811561137e5760085461137a906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600c5550949695505050505050565b60016020526000908152604090205481565b600b5481565b60046020526000908152604090205481565b600080600c5460011461146957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611479610d90565b50600654600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905194965092945073ffffffffffffffffffffffffffffffffffffffff9182169391169160009184916370a08231916024808301926020929190829003018186803b1580156114fb57600080fd5b505afa15801561150f573d6000803e3d6000fd5b505050506040513d602081101561152557600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8516916370a08231916024808301926020929190829003018186803b15801561159957600080fd5b505afa1580156115ad573d6000803e3d6000fd5b505050506040513d60208110156115c357600080fd5b5051306000908152600160205260408120549192506115e288886126ec565b600054909150806115f9848763ffffffff6121e816565b8161160057fe5b049a5080611614848663ffffffff6121e816565b8161161b57fe5b04995060008b11801561162e575060008a115b611683576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612b996028913960400191505060405180910390fd5b61168d3084612992565b611698878d8d611fdb565b6116a3868d8c611fdb565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b15801561170f57600080fd5b505afa158015611723573d6000803e3d6000fd5b505050506040513d602081101561173957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191965073ffffffffffffffffffffffffffffffffffffffff8816916370a0823191602480820192602092909190829003018186803b1580156117ab57600080fd5b505afa1580156117bf573d6000803e3d6000fd5b505050506040513d60208110156117d557600080fd5b505193506117e585858b8b6122e0565b811561182757600854611823906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b604080518c8152602081018c9052815173ffffffffffffffffffffffffffffffffffffffff8f169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a35050505050505050506001600c81905550915091565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b6000610df233848461260b565b6103e881565b600c5460011461194f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654600754600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff9485169490931692611a2b9285928792611a26926dffffffffffffffffffffffffffff169185916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b505afa158015611a02573d6000803e3d6000fd5b505050506040513d6020811015611a1857600080fd5b50519063ffffffff61226e16565b611fdb565b600854604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611aca9284928792611a26926e01000000000000000000000000000090046dffffffffffffffffffffffffffff169173ffffffffffffffffffffffffffffffffffffffff8616916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b50506001600c5550565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b42841015611b7b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f556e697377617056323a20455850495245440000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff80891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015611cdc573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590611d5757508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611dc257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f556e697377617056323a20494e56414c49445f5349474e415455524500000000604482015290519081900360640190fd5b611dcd89898961259c565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b600c54600114611e6657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611fd49273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015611edd57600080fd5b505afa158015611ef1573d6000803e3d6000fd5b505050506040513d6020811015611f0757600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015611f7a57600080fd5b505afa158015611f8e573d6000803e3d6000fd5b505050506040513d6020811015611fa457600080fd5b50516008546dffffffffffffffffffffffffffff808216916e0100000000000000000000000000009004166122e0565b6001600c55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009460609489169392918291908083835b602083106120e157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016120a4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612143576040519150601f19603f3d011682016040523d82523d6000602084013e612148565b606091505b5091509150818015612176575080511580612176575080806020019051602081101561217357600080fd5b50515b6121e157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f556e697377617056323a205452414e534645525f4641494c4544000000000000604482015290519081900360640190fd5b5050505050565b60008115806122035750508082028282828161220057fe5b04145b610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b80820382811115610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b6dffffffffffffffffffffffffffff841180159061230c57506dffffffffffffffffffffffffffff8311155b61237757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f556e697377617056323a204f564552464c4f5700000000000000000000000000604482015290519081900360640190fd5b60085463ffffffff428116917c0100000000000000000000000000000000000000000000000000000000900481168203908116158015906123c757506dffffffffffffffffffffffffffff841615155b80156123e257506dffffffffffffffffffffffffffff831615155b15612492578063ffffffff16612425856123fb86612a57565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff612a7b16565b600980547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092169290920201905563ffffffff8116612465846123fb87612a57565b600a80547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216929092020190555b600880547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000166dffffffffffffffffffffffffffff888116919091177fffffffff0000000000000000000000000000ffffffffffffffffffffffffffff166e0100000000000000000000000000008883168102919091177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054612641908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054612683908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b15801561275757600080fd5b505afa15801561276b573d6000803e3d6000fd5b505050506040513d602081101561278157600080fd5b5051600b5473ffffffffffffffffffffffffffffffffffffffff821615801594509192509061286457801561285f5760006127d86112576dffffffffffffffffffffffffffff88811690881663ffffffff6121e816565b905060006127e583612878565b90508082111561285c576000612813612804848463ffffffff61226e16565b6000549063ffffffff6121e816565b905060006128388361282c86600563ffffffff6121e816565b9063ffffffff612abc16565b9050600081838161284557fe5b04905080156128585761285887826128ca565b5050505b50505b612870565b8015612870576000600b555b505092915050565b600060038211156128bb575080600160028204015b818110156128b5578091506002818285816128a457fe5b0401816128ad57fe5b04905061288d565b506128c5565b81156128c5575060015b919050565b6000546128dd908263ffffffff612abc16565b600090815573ffffffffffffffffffffffffffffffffffffffff8316815260016020526040902054612915908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000818310612989578161298b565b825b9392505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546129c8908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081209190915554612a02908263ffffffff61226e16565b600090815560408051838152905173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff841681612ab457fe5b049392505050565b80820182811015610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe556e697377617056323a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f494e5055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f4c4951554944495459556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4255524e4544556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4d494e544544a265627a7a72315820841b93a7dff584da07aecb7efe1de139d1b94052d48051f920879ff29f44c0f264736f6c63430005100032454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", +} + +// UniswapV2PairABI is the input ABI used to generate the binding from. +// Deprecated: Use UniswapV2PairMetaData.ABI instead. +var UniswapV2PairABI = UniswapV2PairMetaData.ABI + +// UniswapV2PairBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use UniswapV2PairMetaData.Bin instead. +var UniswapV2PairBin = UniswapV2PairMetaData.Bin + +// DeployUniswapV2Pair deploys a new Ethereum contract, binding an instance of UniswapV2Pair to it. +func DeployUniswapV2Pair(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *UniswapV2Pair, error) { + parsed, err := UniswapV2PairMetaData.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(UniswapV2PairBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &UniswapV2Pair{UniswapV2PairCaller: UniswapV2PairCaller{contract: contract}, UniswapV2PairTransactor: UniswapV2PairTransactor{contract: contract}, UniswapV2PairFilterer: UniswapV2PairFilterer{contract: contract}}, nil +} + +// UniswapV2Pair is an auto generated Go binding around an Ethereum contract. +type UniswapV2Pair struct { + UniswapV2PairCaller // Read-only binding to the contract + UniswapV2PairTransactor // Write-only binding to the contract + UniswapV2PairFilterer // Log filterer for contract events +} + +// UniswapV2PairCaller is an auto generated read-only Go binding around an Ethereum contract. +type UniswapV2PairCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2PairTransactor is an auto generated write-only Go binding around an Ethereum contract. +type UniswapV2PairTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2PairFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UniswapV2PairFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2PairSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UniswapV2PairSession struct { + Contract *UniswapV2Pair // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UniswapV2PairCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UniswapV2PairCallerSession struct { + Contract *UniswapV2PairCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UniswapV2PairTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UniswapV2PairTransactorSession struct { + Contract *UniswapV2PairTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UniswapV2PairRaw is an auto generated low-level Go binding around an Ethereum contract. +type UniswapV2PairRaw struct { + Contract *UniswapV2Pair // Generic contract binding to access the raw methods on +} + +// UniswapV2PairCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UniswapV2PairCallerRaw struct { + Contract *UniswapV2PairCaller // Generic read-only contract binding to access the raw methods on +} + +// UniswapV2PairTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UniswapV2PairTransactorRaw struct { + Contract *UniswapV2PairTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewUniswapV2Pair creates a new instance of UniswapV2Pair, bound to a specific deployed contract. +func NewUniswapV2Pair(address common.Address, backend bind.ContractBackend) (*UniswapV2Pair, error) { + contract, err := bindUniswapV2Pair(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UniswapV2Pair{UniswapV2PairCaller: UniswapV2PairCaller{contract: contract}, UniswapV2PairTransactor: UniswapV2PairTransactor{contract: contract}, UniswapV2PairFilterer: UniswapV2PairFilterer{contract: contract}}, nil +} + +// NewUniswapV2PairCaller creates a new read-only instance of UniswapV2Pair, bound to a specific deployed contract. +func NewUniswapV2PairCaller(address common.Address, caller bind.ContractCaller) (*UniswapV2PairCaller, error) { + contract, err := bindUniswapV2Pair(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UniswapV2PairCaller{contract: contract}, nil +} + +// NewUniswapV2PairTransactor creates a new write-only instance of UniswapV2Pair, bound to a specific deployed contract. +func NewUniswapV2PairTransactor(address common.Address, transactor bind.ContractTransactor) (*UniswapV2PairTransactor, error) { + contract, err := bindUniswapV2Pair(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UniswapV2PairTransactor{contract: contract}, nil +} + +// NewUniswapV2PairFilterer creates a new log filterer instance of UniswapV2Pair, bound to a specific deployed contract. +func NewUniswapV2PairFilterer(address common.Address, filterer bind.ContractFilterer) (*UniswapV2PairFilterer, error) { + contract, err := bindUniswapV2Pair(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UniswapV2PairFilterer{contract: contract}, nil +} + +// bindUniswapV2Pair binds a generic wrapper to an already deployed contract. +func bindUniswapV2Pair(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := UniswapV2PairMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UniswapV2Pair *UniswapV2PairRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2Pair.Contract.UniswapV2PairCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UniswapV2Pair *UniswapV2PairRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.UniswapV2PairTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapV2Pair *UniswapV2PairRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.UniswapV2PairTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UniswapV2Pair *UniswapV2PairCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2Pair.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UniswapV2Pair *UniswapV2PairTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapV2Pair *UniswapV2PairTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.contract.Transact(opts, method, params...) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_UniswapV2Pair *UniswapV2PairCaller) DOMAINSEPARATOR(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "DOMAIN_SEPARATOR") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_UniswapV2Pair *UniswapV2PairSession) DOMAINSEPARATOR() ([32]byte, error) { + return _UniswapV2Pair.Contract.DOMAINSEPARATOR(&_UniswapV2Pair.CallOpts) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_UniswapV2Pair *UniswapV2PairCallerSession) DOMAINSEPARATOR() ([32]byte, error) { + return _UniswapV2Pair.Contract.DOMAINSEPARATOR(&_UniswapV2Pair.CallOpts) +} + +// MINIMUMLIQUIDITY is a free data retrieval call binding the contract method 0xba9a7a56. +// +// Solidity: function MINIMUM_LIQUIDITY() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCaller) MINIMUMLIQUIDITY(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "MINIMUM_LIQUIDITY") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MINIMUMLIQUIDITY is a free data retrieval call binding the contract method 0xba9a7a56. +// +// Solidity: function MINIMUM_LIQUIDITY() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairSession) MINIMUMLIQUIDITY() (*big.Int, error) { + return _UniswapV2Pair.Contract.MINIMUMLIQUIDITY(&_UniswapV2Pair.CallOpts) +} + +// MINIMUMLIQUIDITY is a free data retrieval call binding the contract method 0xba9a7a56. +// +// Solidity: function MINIMUM_LIQUIDITY() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCallerSession) MINIMUMLIQUIDITY() (*big.Int, error) { + return _UniswapV2Pair.Contract.MINIMUMLIQUIDITY(&_UniswapV2Pair.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_UniswapV2Pair *UniswapV2PairCaller) PERMITTYPEHASH(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "PERMIT_TYPEHASH") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_UniswapV2Pair *UniswapV2PairSession) PERMITTYPEHASH() ([32]byte, error) { + return _UniswapV2Pair.Contract.PERMITTYPEHASH(&_UniswapV2Pair.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_UniswapV2Pair *UniswapV2PairCallerSession) PERMITTYPEHASH() ([32]byte, error) { + return _UniswapV2Pair.Contract.PERMITTYPEHASH(&_UniswapV2Pair.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "allowance", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _UniswapV2Pair.Contract.Allowance(&_UniswapV2Pair.CallOpts, arg0, arg1) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _UniswapV2Pair.Contract.Allowance(&_UniswapV2Pair.CallOpts, arg0, arg1) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "balanceOf", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _UniswapV2Pair.Contract.BalanceOf(&_UniswapV2Pair.CallOpts, arg0) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _UniswapV2Pair.Contract.BalanceOf(&_UniswapV2Pair.CallOpts, arg0) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_UniswapV2Pair *UniswapV2PairCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_UniswapV2Pair *UniswapV2PairSession) Decimals() (uint8, error) { + return _UniswapV2Pair.Contract.Decimals(&_UniswapV2Pair.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_UniswapV2Pair *UniswapV2PairCallerSession) Decimals() (uint8, error) { + return _UniswapV2Pair.Contract.Decimals(&_UniswapV2Pair.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_UniswapV2Pair *UniswapV2PairCaller) Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_UniswapV2Pair *UniswapV2PairSession) Factory() (common.Address, error) { + return _UniswapV2Pair.Contract.Factory(&_UniswapV2Pair.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_UniswapV2Pair *UniswapV2PairCallerSession) Factory() (common.Address, error) { + return _UniswapV2Pair.Contract.Factory(&_UniswapV2Pair.CallOpts) +} + +// GetReserves is a free data retrieval call binding the contract method 0x0902f1ac. +// +// Solidity: function getReserves() view returns(uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) +func (_UniswapV2Pair *UniswapV2PairCaller) GetReserves(opts *bind.CallOpts) (struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 +}, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "getReserves") + + outstruct := new(struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 + }) + if err != nil { + return *outstruct, err + } + + outstruct.Reserve0 = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Reserve1 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.BlockTimestampLast = *abi.ConvertType(out[2], new(uint32)).(*uint32) + + return *outstruct, err + +} + +// GetReserves is a free data retrieval call binding the contract method 0x0902f1ac. +// +// Solidity: function getReserves() view returns(uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) +func (_UniswapV2Pair *UniswapV2PairSession) GetReserves() (struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 +}, error) { + return _UniswapV2Pair.Contract.GetReserves(&_UniswapV2Pair.CallOpts) +} + +// GetReserves is a free data retrieval call binding the contract method 0x0902f1ac. +// +// Solidity: function getReserves() view returns(uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) +func (_UniswapV2Pair *UniswapV2PairCallerSession) GetReserves() (struct { + Reserve0 *big.Int + Reserve1 *big.Int + BlockTimestampLast uint32 +}, error) { + return _UniswapV2Pair.Contract.GetReserves(&_UniswapV2Pair.CallOpts) +} + +// KLast is a free data retrieval call binding the contract method 0x7464fc3d. +// +// Solidity: function kLast() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCaller) KLast(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "kLast") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// KLast is a free data retrieval call binding the contract method 0x7464fc3d. +// +// Solidity: function kLast() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairSession) KLast() (*big.Int, error) { + return _UniswapV2Pair.Contract.KLast(&_UniswapV2Pair.CallOpts) +} + +// KLast is a free data retrieval call binding the contract method 0x7464fc3d. +// +// Solidity: function kLast() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCallerSession) KLast() (*big.Int, error) { + return _UniswapV2Pair.Contract.KLast(&_UniswapV2Pair.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_UniswapV2Pair *UniswapV2PairCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_UniswapV2Pair *UniswapV2PairSession) Name() (string, error) { + return _UniswapV2Pair.Contract.Name(&_UniswapV2Pair.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_UniswapV2Pair *UniswapV2PairCallerSession) Name() (string, error) { + return _UniswapV2Pair.Contract.Name(&_UniswapV2Pair.CallOpts) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCaller) Nonces(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "nonces", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairSession) Nonces(arg0 common.Address) (*big.Int, error) { + return _UniswapV2Pair.Contract.Nonces(&_UniswapV2Pair.CallOpts, arg0) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCallerSession) Nonces(arg0 common.Address) (*big.Int, error) { + return _UniswapV2Pair.Contract.Nonces(&_UniswapV2Pair.CallOpts, arg0) +} + +// Price0CumulativeLast is a free data retrieval call binding the contract method 0x5909c0d5. +// +// Solidity: function price0CumulativeLast() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCaller) Price0CumulativeLast(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "price0CumulativeLast") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Price0CumulativeLast is a free data retrieval call binding the contract method 0x5909c0d5. +// +// Solidity: function price0CumulativeLast() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairSession) Price0CumulativeLast() (*big.Int, error) { + return _UniswapV2Pair.Contract.Price0CumulativeLast(&_UniswapV2Pair.CallOpts) +} + +// Price0CumulativeLast is a free data retrieval call binding the contract method 0x5909c0d5. +// +// Solidity: function price0CumulativeLast() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCallerSession) Price0CumulativeLast() (*big.Int, error) { + return _UniswapV2Pair.Contract.Price0CumulativeLast(&_UniswapV2Pair.CallOpts) +} + +// Price1CumulativeLast is a free data retrieval call binding the contract method 0x5a3d5493. +// +// Solidity: function price1CumulativeLast() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCaller) Price1CumulativeLast(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "price1CumulativeLast") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Price1CumulativeLast is a free data retrieval call binding the contract method 0x5a3d5493. +// +// Solidity: function price1CumulativeLast() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairSession) Price1CumulativeLast() (*big.Int, error) { + return _UniswapV2Pair.Contract.Price1CumulativeLast(&_UniswapV2Pair.CallOpts) +} + +// Price1CumulativeLast is a free data retrieval call binding the contract method 0x5a3d5493. +// +// Solidity: function price1CumulativeLast() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCallerSession) Price1CumulativeLast() (*big.Int, error) { + return _UniswapV2Pair.Contract.Price1CumulativeLast(&_UniswapV2Pair.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_UniswapV2Pair *UniswapV2PairCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_UniswapV2Pair *UniswapV2PairSession) Symbol() (string, error) { + return _UniswapV2Pair.Contract.Symbol(&_UniswapV2Pair.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_UniswapV2Pair *UniswapV2PairCallerSession) Symbol() (string, error) { + return _UniswapV2Pair.Contract.Symbol(&_UniswapV2Pair.CallOpts) +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_UniswapV2Pair *UniswapV2PairCaller) Token0(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "token0") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_UniswapV2Pair *UniswapV2PairSession) Token0() (common.Address, error) { + return _UniswapV2Pair.Contract.Token0(&_UniswapV2Pair.CallOpts) +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_UniswapV2Pair *UniswapV2PairCallerSession) Token0() (common.Address, error) { + return _UniswapV2Pair.Contract.Token0(&_UniswapV2Pair.CallOpts) +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_UniswapV2Pair *UniswapV2PairCaller) Token1(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "token1") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_UniswapV2Pair *UniswapV2PairSession) Token1() (common.Address, error) { + return _UniswapV2Pair.Contract.Token1(&_UniswapV2Pair.CallOpts) +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_UniswapV2Pair *UniswapV2PairCallerSession) Token1() (common.Address, error) { + return _UniswapV2Pair.Contract.Token1(&_UniswapV2Pair.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Pair.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairSession) TotalSupply() (*big.Int, error) { + return _UniswapV2Pair.Contract.TotalSupply(&_UniswapV2Pair.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_UniswapV2Pair *UniswapV2PairCallerSession) TotalSupply() (*big.Int, error) { + return _UniswapV2Pair.Contract.TotalSupply(&_UniswapV2Pair.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_UniswapV2Pair *UniswapV2PairTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2Pair.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_UniswapV2Pair *UniswapV2PairSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Approve(&_UniswapV2Pair.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_UniswapV2Pair *UniswapV2PairTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Approve(&_UniswapV2Pair.TransactOpts, spender, value) +} + +// Burn is a paid mutator transaction binding the contract method 0x89afcb44. +// +// Solidity: function burn(address to) returns(uint256 amount0, uint256 amount1) +func (_UniswapV2Pair *UniswapV2PairTransactor) Burn(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.contract.Transact(opts, "burn", to) +} + +// Burn is a paid mutator transaction binding the contract method 0x89afcb44. +// +// Solidity: function burn(address to) returns(uint256 amount0, uint256 amount1) +func (_UniswapV2Pair *UniswapV2PairSession) Burn(to common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Burn(&_UniswapV2Pair.TransactOpts, to) +} + +// Burn is a paid mutator transaction binding the contract method 0x89afcb44. +// +// Solidity: function burn(address to) returns(uint256 amount0, uint256 amount1) +func (_UniswapV2Pair *UniswapV2PairTransactorSession) Burn(to common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Burn(&_UniswapV2Pair.TransactOpts, to) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _token0, address _token1) returns() +func (_UniswapV2Pair *UniswapV2PairTransactor) Initialize(opts *bind.TransactOpts, _token0 common.Address, _token1 common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.contract.Transact(opts, "initialize", _token0, _token1) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _token0, address _token1) returns() +func (_UniswapV2Pair *UniswapV2PairSession) Initialize(_token0 common.Address, _token1 common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Initialize(&_UniswapV2Pair.TransactOpts, _token0, _token1) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _token0, address _token1) returns() +func (_UniswapV2Pair *UniswapV2PairTransactorSession) Initialize(_token0 common.Address, _token1 common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Initialize(&_UniswapV2Pair.TransactOpts, _token0, _token1) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address to) returns(uint256 liquidity) +func (_UniswapV2Pair *UniswapV2PairTransactor) Mint(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.contract.Transact(opts, "mint", to) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address to) returns(uint256 liquidity) +func (_UniswapV2Pair *UniswapV2PairSession) Mint(to common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Mint(&_UniswapV2Pair.TransactOpts, to) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address to) returns(uint256 liquidity) +func (_UniswapV2Pair *UniswapV2PairTransactorSession) Mint(to common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Mint(&_UniswapV2Pair.TransactOpts, to) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_UniswapV2Pair *UniswapV2PairTransactor) Permit(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Pair.contract.Transact(opts, "permit", owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_UniswapV2Pair *UniswapV2PairSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Permit(&_UniswapV2Pair.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_UniswapV2Pair *UniswapV2PairTransactorSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Permit(&_UniswapV2Pair.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Skim is a paid mutator transaction binding the contract method 0xbc25cf77. +// +// Solidity: function skim(address to) returns() +func (_UniswapV2Pair *UniswapV2PairTransactor) Skim(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.contract.Transact(opts, "skim", to) +} + +// Skim is a paid mutator transaction binding the contract method 0xbc25cf77. +// +// Solidity: function skim(address to) returns() +func (_UniswapV2Pair *UniswapV2PairSession) Skim(to common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Skim(&_UniswapV2Pair.TransactOpts, to) +} + +// Skim is a paid mutator transaction binding the contract method 0xbc25cf77. +// +// Solidity: function skim(address to) returns() +func (_UniswapV2Pair *UniswapV2PairTransactorSession) Skim(to common.Address) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Skim(&_UniswapV2Pair.TransactOpts, to) +} + +// Swap is a paid mutator transaction binding the contract method 0x022c0d9f. +// +// Solidity: function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes data) returns() +func (_UniswapV2Pair *UniswapV2PairTransactor) Swap(opts *bind.TransactOpts, amount0Out *big.Int, amount1Out *big.Int, to common.Address, data []byte) (*types.Transaction, error) { + return _UniswapV2Pair.contract.Transact(opts, "swap", amount0Out, amount1Out, to, data) +} + +// Swap is a paid mutator transaction binding the contract method 0x022c0d9f. +// +// Solidity: function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes data) returns() +func (_UniswapV2Pair *UniswapV2PairSession) Swap(amount0Out *big.Int, amount1Out *big.Int, to common.Address, data []byte) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Swap(&_UniswapV2Pair.TransactOpts, amount0Out, amount1Out, to, data) +} + +// Swap is a paid mutator transaction binding the contract method 0x022c0d9f. +// +// Solidity: function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes data) returns() +func (_UniswapV2Pair *UniswapV2PairTransactorSession) Swap(amount0Out *big.Int, amount1Out *big.Int, to common.Address, data []byte) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Swap(&_UniswapV2Pair.TransactOpts, amount0Out, amount1Out, to, data) +} + +// Sync is a paid mutator transaction binding the contract method 0xfff6cae9. +// +// Solidity: function sync() returns() +func (_UniswapV2Pair *UniswapV2PairTransactor) Sync(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2Pair.contract.Transact(opts, "sync") +} + +// Sync is a paid mutator transaction binding the contract method 0xfff6cae9. +// +// Solidity: function sync() returns() +func (_UniswapV2Pair *UniswapV2PairSession) Sync() (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Sync(&_UniswapV2Pair.TransactOpts) +} + +// Sync is a paid mutator transaction binding the contract method 0xfff6cae9. +// +// Solidity: function sync() returns() +func (_UniswapV2Pair *UniswapV2PairTransactorSession) Sync() (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Sync(&_UniswapV2Pair.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_UniswapV2Pair *UniswapV2PairTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2Pair.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_UniswapV2Pair *UniswapV2PairSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Transfer(&_UniswapV2Pair.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_UniswapV2Pair *UniswapV2PairTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.Transfer(&_UniswapV2Pair.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_UniswapV2Pair *UniswapV2PairTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2Pair.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_UniswapV2Pair *UniswapV2PairSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.TransferFrom(&_UniswapV2Pair.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_UniswapV2Pair *UniswapV2PairTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _UniswapV2Pair.Contract.TransferFrom(&_UniswapV2Pair.TransactOpts, from, to, value) +} + +// UniswapV2PairApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the UniswapV2Pair contract. +type UniswapV2PairApprovalIterator struct { + Event *UniswapV2PairApproval // 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 *UniswapV2PairApprovalIterator) 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(UniswapV2PairApproval) + 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(UniswapV2PairApproval) + 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 *UniswapV2PairApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapV2PairApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapV2PairApproval represents a Approval event raised by the UniswapV2Pair contract. +type UniswapV2PairApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_UniswapV2Pair *UniswapV2PairFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*UniswapV2PairApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _UniswapV2Pair.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &UniswapV2PairApprovalIterator{contract: _UniswapV2Pair.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_UniswapV2Pair *UniswapV2PairFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *UniswapV2PairApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _UniswapV2Pair.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + 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(UniswapV2PairApproval) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_UniswapV2Pair *UniswapV2PairFilterer) ParseApproval(log types.Log) (*UniswapV2PairApproval, error) { + event := new(UniswapV2PairApproval) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapV2PairBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the UniswapV2Pair contract. +type UniswapV2PairBurnIterator struct { + Event *UniswapV2PairBurn // 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 *UniswapV2PairBurnIterator) 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(UniswapV2PairBurn) + 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(UniswapV2PairBurn) + 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 *UniswapV2PairBurnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapV2PairBurnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapV2PairBurn represents a Burn event raised by the UniswapV2Pair contract. +type UniswapV2PairBurn struct { + Sender common.Address + Amount0 *big.Int + Amount1 *big.Int + To common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBurn is a free log retrieval operation binding the contract event 0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496. +// +// Solidity: event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to) +func (_UniswapV2Pair *UniswapV2PairFilterer) FilterBurn(opts *bind.FilterOpts, sender []common.Address, to []common.Address) (*UniswapV2PairBurnIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _UniswapV2Pair.contract.FilterLogs(opts, "Burn", senderRule, toRule) + if err != nil { + return nil, err + } + return &UniswapV2PairBurnIterator{contract: _UniswapV2Pair.contract, event: "Burn", logs: logs, sub: sub}, nil +} + +// WatchBurn is a free log subscription operation binding the contract event 0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496. +// +// Solidity: event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to) +func (_UniswapV2Pair *UniswapV2PairFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *UniswapV2PairBurn, sender []common.Address, to []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _UniswapV2Pair.contract.WatchLogs(opts, "Burn", senderRule, toRule) + 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(UniswapV2PairBurn) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Burn", 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 +} + +// ParseBurn is a log parse operation binding the contract event 0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496. +// +// Solidity: event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to) +func (_UniswapV2Pair *UniswapV2PairFilterer) ParseBurn(log types.Log) (*UniswapV2PairBurn, error) { + event := new(UniswapV2PairBurn) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Burn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapV2PairMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the UniswapV2Pair contract. +type UniswapV2PairMintIterator struct { + Event *UniswapV2PairMint // 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 *UniswapV2PairMintIterator) 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(UniswapV2PairMint) + 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(UniswapV2PairMint) + 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 *UniswapV2PairMintIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapV2PairMintIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapV2PairMint represents a Mint event raised by the UniswapV2Pair contract. +type UniswapV2PairMint struct { + Sender common.Address + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMint is a free log retrieval operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_UniswapV2Pair *UniswapV2PairFilterer) FilterMint(opts *bind.FilterOpts, sender []common.Address) (*UniswapV2PairMintIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _UniswapV2Pair.contract.FilterLogs(opts, "Mint", senderRule) + if err != nil { + return nil, err + } + return &UniswapV2PairMintIterator{contract: _UniswapV2Pair.contract, event: "Mint", logs: logs, sub: sub}, nil +} + +// WatchMint is a free log subscription operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_UniswapV2Pair *UniswapV2PairFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *UniswapV2PairMint, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _UniswapV2Pair.contract.WatchLogs(opts, "Mint", senderRule) + 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(UniswapV2PairMint) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Mint", 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 +} + +// ParseMint is a log parse operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_UniswapV2Pair *UniswapV2PairFilterer) ParseMint(log types.Log) (*UniswapV2PairMint, error) { + event := new(UniswapV2PairMint) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Mint", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapV2PairSwapIterator is returned from FilterSwap and is used to iterate over the raw logs and unpacked data for Swap events raised by the UniswapV2Pair contract. +type UniswapV2PairSwapIterator struct { + Event *UniswapV2PairSwap // 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 *UniswapV2PairSwapIterator) 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(UniswapV2PairSwap) + 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(UniswapV2PairSwap) + 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 *UniswapV2PairSwapIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapV2PairSwapIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapV2PairSwap represents a Swap event raised by the UniswapV2Pair contract. +type UniswapV2PairSwap struct { + Sender common.Address + Amount0In *big.Int + Amount1In *big.Int + Amount0Out *big.Int + Amount1Out *big.Int + To common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSwap is a free log retrieval operation binding the contract event 0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822. +// +// Solidity: event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to) +func (_UniswapV2Pair *UniswapV2PairFilterer) FilterSwap(opts *bind.FilterOpts, sender []common.Address, to []common.Address) (*UniswapV2PairSwapIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _UniswapV2Pair.contract.FilterLogs(opts, "Swap", senderRule, toRule) + if err != nil { + return nil, err + } + return &UniswapV2PairSwapIterator{contract: _UniswapV2Pair.contract, event: "Swap", logs: logs, sub: sub}, nil +} + +// WatchSwap is a free log subscription operation binding the contract event 0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822. +// +// Solidity: event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to) +func (_UniswapV2Pair *UniswapV2PairFilterer) WatchSwap(opts *bind.WatchOpts, sink chan<- *UniswapV2PairSwap, sender []common.Address, to []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _UniswapV2Pair.contract.WatchLogs(opts, "Swap", senderRule, toRule) + 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(UniswapV2PairSwap) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Swap", 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 +} + +// ParseSwap is a log parse operation binding the contract event 0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822. +// +// Solidity: event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to) +func (_UniswapV2Pair *UniswapV2PairFilterer) ParseSwap(log types.Log) (*UniswapV2PairSwap, error) { + event := new(UniswapV2PairSwap) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Swap", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapV2PairSyncIterator is returned from FilterSync and is used to iterate over the raw logs and unpacked data for Sync events raised by the UniswapV2Pair contract. +type UniswapV2PairSyncIterator struct { + Event *UniswapV2PairSync // 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 *UniswapV2PairSyncIterator) 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(UniswapV2PairSync) + 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(UniswapV2PairSync) + 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 *UniswapV2PairSyncIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapV2PairSyncIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapV2PairSync represents a Sync event raised by the UniswapV2Pair contract. +type UniswapV2PairSync struct { + Reserve0 *big.Int + Reserve1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSync is a free log retrieval operation binding the contract event 0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1. +// +// Solidity: event Sync(uint112 reserve0, uint112 reserve1) +func (_UniswapV2Pair *UniswapV2PairFilterer) FilterSync(opts *bind.FilterOpts) (*UniswapV2PairSyncIterator, error) { + + logs, sub, err := _UniswapV2Pair.contract.FilterLogs(opts, "Sync") + if err != nil { + return nil, err + } + return &UniswapV2PairSyncIterator{contract: _UniswapV2Pair.contract, event: "Sync", logs: logs, sub: sub}, nil +} + +// WatchSync is a free log subscription operation binding the contract event 0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1. +// +// Solidity: event Sync(uint112 reserve0, uint112 reserve1) +func (_UniswapV2Pair *UniswapV2PairFilterer) WatchSync(opts *bind.WatchOpts, sink chan<- *UniswapV2PairSync) (event.Subscription, error) { + + logs, sub, err := _UniswapV2Pair.contract.WatchLogs(opts, "Sync") + 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(UniswapV2PairSync) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Sync", 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 +} + +// ParseSync is a log parse operation binding the contract event 0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1. +// +// Solidity: event Sync(uint112 reserve0, uint112 reserve1) +func (_UniswapV2Pair *UniswapV2PairFilterer) ParseSync(log types.Log) (*UniswapV2PairSync, error) { + event := new(UniswapV2PairSync) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Sync", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapV2PairTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the UniswapV2Pair contract. +type UniswapV2PairTransferIterator struct { + Event *UniswapV2PairTransfer // 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 *UniswapV2PairTransferIterator) 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(UniswapV2PairTransfer) + 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(UniswapV2PairTransfer) + 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 *UniswapV2PairTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapV2PairTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapV2PairTransfer represents a Transfer event raised by the UniswapV2Pair contract. +type UniswapV2PairTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_UniswapV2Pair *UniswapV2PairFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*UniswapV2PairTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _UniswapV2Pair.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &UniswapV2PairTransferIterator{contract: _UniswapV2Pair.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_UniswapV2Pair *UniswapV2PairFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *UniswapV2PairTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _UniswapV2Pair.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + 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(UniswapV2PairTransfer) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_UniswapV2Pair *UniswapV2PairFilterer) ParseTransfer(log types.Log) (*UniswapV2PairTransfer, error) { + event := new(UniswapV2PairTransfer) + if err := _UniswapV2Pair.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/ierc20.sol/ierc20.go b/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/ierc20.sol/ierc20.go new file mode 100644 index 0000000000..31d0fc1f7c --- /dev/null +++ b/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/ierc20.sol/ierc20.go @@ -0,0 +1,738 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ierc20 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IERC20MetaData contains all meta data concerning the IERC20 contract. +var IERC20MetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IERC20ABI is the input ABI used to generate the binding from. +// Deprecated: Use IERC20MetaData.ABI instead. +var IERC20ABI = IERC20MetaData.ABI + +// IERC20 is an auto generated Go binding around an Ethereum contract. +type IERC20 struct { + IERC20Caller // Read-only binding to the contract + IERC20Transactor // Write-only binding to the contract + IERC20Filterer // Log filterer for contract events +} + +// IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. +type IERC20Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC20Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC20Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC20Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC20Session struct { + Contract *IERC20 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC20CallerSession struct { + Contract *IERC20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC20TransactorSession struct { + Contract *IERC20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. +type IERC20Raw struct { + Contract *IERC20 // Generic contract binding to access the raw methods on +} + +// IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC20CallerRaw struct { + Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on +} + +// IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC20TransactorRaw struct { + Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. +func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { + contract, err := bindIERC20(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil +} + +// NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. +func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { + contract, err := bindIERC20(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC20Caller{contract: contract}, nil +} + +// NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. +func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { + contract, err := bindIERC20(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC20Transactor{contract: contract}, nil +} + +// NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. +func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { + contract, err := bindIERC20(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC20Filterer{contract: contract}, nil +} + +// bindIERC20 binds a generic wrapper to an already deployed contract. +func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IERC20MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IERC20.Contract.IERC20Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC20.Contract.IERC20Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IERC20.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC20.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC20.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "balanceOf", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IERC20 *IERC20Session) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_IERC20 *IERC20CallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, owner) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_IERC20 *IERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_IERC20 *IERC20Session) Decimals() (uint8, error) { + return _IERC20.Contract.Decimals(&_IERC20.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_IERC20 *IERC20CallerSession) Decimals() (uint8, error) { + return _IERC20.Contract.Decimals(&_IERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC20 *IERC20Caller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC20 *IERC20Session) Name() (string, error) { + return _IERC20.Contract.Name(&_IERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC20 *IERC20CallerSession) Name() (string, error) { + return _IERC20.Contract.Name(&_IERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC20 *IERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC20 *IERC20Session) Symbol() (string, error) { + return _IERC20.Contract.Symbol(&_IERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC20 *IERC20CallerSession) Symbol() (string, error) { + return _IERC20.Contract.Symbol(&_IERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IERC20.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { + return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { + return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IERC20 *IERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IERC20 *IERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IERC20 *IERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_IERC20 *IERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, from, to, value) +} + +// IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. +type IERC20ApprovalIterator struct { + Event *IERC20Approval // 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 *IERC20ApprovalIterator) 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(IERC20Approval) + 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(IERC20Approval) + 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 *IERC20ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC20ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC20Approval represents a Approval event raised by the IERC20 contract. +type IERC20Approval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + 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(IERC20Approval) + if err := _IERC20.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { + event := new(IERC20Approval) + if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. +type IERC20TransferIterator struct { + Event *IERC20Transfer // 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 *IERC20TransferIterator) 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(IERC20Transfer) + 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(IERC20Transfer) + 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 *IERC20TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC20TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC20Transfer represents a Transfer event raised by the IERC20 contract. +type IERC20Transfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + 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(IERC20Transfer) + if err := _IERC20.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { + event := new(IERC20Transfer) + if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/iuniswapv2router01.sol/iuniswapv2router01.go b/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/iuniswapv2router01.sol/iuniswapv2router01.go new file mode 100644 index 0000000000..a3572ed21b --- /dev/null +++ b/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/iuniswapv2router01.sol/iuniswapv2router01.go @@ -0,0 +1,650 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv2router01 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV2Router01MetaData contains all meta data concerning the IUniswapV2Router01 contract. +var IUniswapV2Router01MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountADesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsIn\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveB\",\"type\":\"uint256\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapETHForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IUniswapV2Router01ABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV2Router01MetaData.ABI instead. +var IUniswapV2Router01ABI = IUniswapV2Router01MetaData.ABI + +// IUniswapV2Router01 is an auto generated Go binding around an Ethereum contract. +type IUniswapV2Router01 struct { + IUniswapV2Router01Caller // Read-only binding to the contract + IUniswapV2Router01Transactor // Write-only binding to the contract + IUniswapV2Router01Filterer // Log filterer for contract events +} + +// IUniswapV2Router01Caller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV2Router01Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2Router01Transactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV2Router01Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2Router01Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV2Router01Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2Router01Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV2Router01Session struct { + Contract *IUniswapV2Router01 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2Router01CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV2Router01CallerSession struct { + Contract *IUniswapV2Router01Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV2Router01TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV2Router01TransactorSession struct { + Contract *IUniswapV2Router01Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2Router01Raw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV2Router01Raw struct { + Contract *IUniswapV2Router01 // Generic contract binding to access the raw methods on +} + +// IUniswapV2Router01CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV2Router01CallerRaw struct { + Contract *IUniswapV2Router01Caller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV2Router01TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV2Router01TransactorRaw struct { + Contract *IUniswapV2Router01Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV2Router01 creates a new instance of IUniswapV2Router01, bound to a specific deployed contract. +func NewIUniswapV2Router01(address common.Address, backend bind.ContractBackend) (*IUniswapV2Router01, error) { + contract, err := bindIUniswapV2Router01(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV2Router01{IUniswapV2Router01Caller: IUniswapV2Router01Caller{contract: contract}, IUniswapV2Router01Transactor: IUniswapV2Router01Transactor{contract: contract}, IUniswapV2Router01Filterer: IUniswapV2Router01Filterer{contract: contract}}, nil +} + +// NewIUniswapV2Router01Caller creates a new read-only instance of IUniswapV2Router01, bound to a specific deployed contract. +func NewIUniswapV2Router01Caller(address common.Address, caller bind.ContractCaller) (*IUniswapV2Router01Caller, error) { + contract, err := bindIUniswapV2Router01(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV2Router01Caller{contract: contract}, nil +} + +// NewIUniswapV2Router01Transactor creates a new write-only instance of IUniswapV2Router01, bound to a specific deployed contract. +func NewIUniswapV2Router01Transactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV2Router01Transactor, error) { + contract, err := bindIUniswapV2Router01(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV2Router01Transactor{contract: contract}, nil +} + +// NewIUniswapV2Router01Filterer creates a new log filterer instance of IUniswapV2Router01, bound to a specific deployed contract. +func NewIUniswapV2Router01Filterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV2Router01Filterer, error) { + contract, err := bindIUniswapV2Router01(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV2Router01Filterer{contract: contract}, nil +} + +// bindIUniswapV2Router01 binds a generic wrapper to an already deployed contract. +func bindIUniswapV2Router01(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV2Router01MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2Router01 *IUniswapV2Router01Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2Router01.Contract.IUniswapV2Router01Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2Router01 *IUniswapV2Router01Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.IUniswapV2Router01Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2Router01 *IUniswapV2Router01Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.IUniswapV2Router01Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2Router01 *IUniswapV2Router01CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2Router01.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.contract.Transact(opts, method, params...) +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() pure returns(address) +func (_IUniswapV2Router01 *IUniswapV2Router01Caller) WETH(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV2Router01.contract.Call(opts, &out, "WETH") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() pure returns(address) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) WETH() (common.Address, error) { + return _IUniswapV2Router01.Contract.WETH(&_IUniswapV2Router01.CallOpts) +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() pure returns(address) +func (_IUniswapV2Router01 *IUniswapV2Router01CallerSession) WETH() (common.Address, error) { + return _IUniswapV2Router01.Contract.WETH(&_IUniswapV2Router01.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() pure returns(address) +func (_IUniswapV2Router01 *IUniswapV2Router01Caller) Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV2Router01.contract.Call(opts, &out, "factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() pure returns(address) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) Factory() (common.Address, error) { + return _IUniswapV2Router01.Contract.Factory(&_IUniswapV2Router01.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() pure returns(address) +func (_IUniswapV2Router01 *IUniswapV2Router01CallerSession) Factory() (common.Address, error) { + return _IUniswapV2Router01.Contract.Factory(&_IUniswapV2Router01.CallOpts) +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_IUniswapV2Router01 *IUniswapV2Router01Caller) GetAmountIn(opts *bind.CallOpts, amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Router01.contract.Call(opts, &out, "getAmountIn", amountOut, reserveIn, reserveOut) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) GetAmountIn(amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _IUniswapV2Router01.Contract.GetAmountIn(&_IUniswapV2Router01.CallOpts, amountOut, reserveIn, reserveOut) +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_IUniswapV2Router01 *IUniswapV2Router01CallerSession) GetAmountIn(amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _IUniswapV2Router01.Contract.GetAmountIn(&_IUniswapV2Router01.CallOpts, amountOut, reserveIn, reserveOut) +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_IUniswapV2Router01 *IUniswapV2Router01Caller) GetAmountOut(opts *bind.CallOpts, amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Router01.contract.Call(opts, &out, "getAmountOut", amountIn, reserveIn, reserveOut) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) GetAmountOut(amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _IUniswapV2Router01.Contract.GetAmountOut(&_IUniswapV2Router01.CallOpts, amountIn, reserveIn, reserveOut) +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_IUniswapV2Router01 *IUniswapV2Router01CallerSession) GetAmountOut(amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _IUniswapV2Router01.Contract.GetAmountOut(&_IUniswapV2Router01.CallOpts, amountIn, reserveIn, reserveOut) +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Caller) GetAmountsIn(opts *bind.CallOpts, amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + var out []interface{} + err := _IUniswapV2Router01.contract.Call(opts, &out, "getAmountsIn", amountOut, path) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) GetAmountsIn(amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + return _IUniswapV2Router01.Contract.GetAmountsIn(&_IUniswapV2Router01.CallOpts, amountOut, path) +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01CallerSession) GetAmountsIn(amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + return _IUniswapV2Router01.Contract.GetAmountsIn(&_IUniswapV2Router01.CallOpts, amountOut, path) +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Caller) GetAmountsOut(opts *bind.CallOpts, amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + var out []interface{} + err := _IUniswapV2Router01.contract.Call(opts, &out, "getAmountsOut", amountIn, path) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) GetAmountsOut(amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + return _IUniswapV2Router01.Contract.GetAmountsOut(&_IUniswapV2Router01.CallOpts, amountIn, path) +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01CallerSession) GetAmountsOut(amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + return _IUniswapV2Router01.Contract.GetAmountsOut(&_IUniswapV2Router01.CallOpts, amountIn, path) +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_IUniswapV2Router01 *IUniswapV2Router01Caller) Quote(opts *bind.CallOpts, amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Router01.contract.Call(opts, &out, "quote", amountA, reserveA, reserveB) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) Quote(amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + return _IUniswapV2Router01.Contract.Quote(&_IUniswapV2Router01.CallOpts, amountA, reserveA, reserveB) +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_IUniswapV2Router01 *IUniswapV2Router01CallerSession) Quote(amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + return _IUniswapV2Router01.Contract.Quote(&_IUniswapV2Router01.CallOpts, amountA, reserveA, reserveB) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) AddLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "addLiquidity", tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) AddLiquidity(tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.AddLiquidity(&_IUniswapV2Router01.TransactOpts, tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) AddLiquidity(tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.AddLiquidity(&_IUniswapV2Router01.TransactOpts, tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) AddLiquidityETH(opts *bind.TransactOpts, token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "addLiquidityETH", token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) AddLiquidityETH(token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.AddLiquidityETH(&_IUniswapV2Router01.TransactOpts, token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) AddLiquidityETH(token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.AddLiquidityETH(&_IUniswapV2Router01.TransactOpts, token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) RemoveLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "removeLiquidity", tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) RemoveLiquidity(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.RemoveLiquidity(&_IUniswapV2Router01.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) RemoveLiquidity(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.RemoveLiquidity(&_IUniswapV2Router01.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) RemoveLiquidityETH(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "removeLiquidityETH", token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) RemoveLiquidityETH(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.RemoveLiquidityETH(&_IUniswapV2Router01.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) RemoveLiquidityETH(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.RemoveLiquidityETH(&_IUniswapV2Router01.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) RemoveLiquidityETHWithPermit(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "removeLiquidityETHWithPermit", token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) RemoveLiquidityETHWithPermit(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.RemoveLiquidityETHWithPermit(&_IUniswapV2Router01.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) RemoveLiquidityETHWithPermit(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.RemoveLiquidityETHWithPermit(&_IUniswapV2Router01.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) RemoveLiquidityWithPermit(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "removeLiquidityWithPermit", tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) RemoveLiquidityWithPermit(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.RemoveLiquidityWithPermit(&_IUniswapV2Router01.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) RemoveLiquidityWithPermit(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.RemoveLiquidityWithPermit(&_IUniswapV2Router01.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) SwapETHForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "swapETHForExactTokens", amountOut, path, to, deadline) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapETHForExactTokens(&_IUniswapV2Router01.TransactOpts, amountOut, path, to, deadline) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapETHForExactTokens(&_IUniswapV2Router01.TransactOpts, amountOut, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) SwapExactETHForTokens(opts *bind.TransactOpts, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "swapExactETHForTokens", amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapExactETHForTokens(&_IUniswapV2Router01.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapExactETHForTokens(&_IUniswapV2Router01.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) SwapExactTokensForETH(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "swapExactTokensForETH", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapExactTokensForETH(&_IUniswapV2Router01.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapExactTokensForETH(&_IUniswapV2Router01.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) SwapExactTokensForTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "swapExactTokensForTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapExactTokensForTokens(&_IUniswapV2Router01.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapExactTokensForTokens(&_IUniswapV2Router01.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) SwapTokensForExactETH(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "swapTokensForExactETH", amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapTokensForExactETH(&_IUniswapV2Router01.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapTokensForExactETH(&_IUniswapV2Router01.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Transactor) SwapTokensForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.contract.Transact(opts, "swapTokensForExactTokens", amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01Session) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapTokensForExactTokens(&_IUniswapV2Router01.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router01 *IUniswapV2Router01TransactorSession) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router01.Contract.SwapTokensForExactTokens(&_IUniswapV2Router01.TransactOpts, amountOut, amountInMax, path, to, deadline) +} diff --git a/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/iuniswapv2router02.sol/iuniswapv2router02.go b/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/iuniswapv2router02.sol/iuniswapv2router02.go new file mode 100644 index 0000000000..69969100a9 --- /dev/null +++ b/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/iuniswapv2router02.sol/iuniswapv2router02.go @@ -0,0 +1,755 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv2router02 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV2Router02MetaData contains all meta data concerning the IUniswapV2Router02 contract. +var IUniswapV2Router02MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountADesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsIn\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveB\",\"type\":\"uint256\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityETHSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapETHForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETHSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IUniswapV2Router02ABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV2Router02MetaData.ABI instead. +var IUniswapV2Router02ABI = IUniswapV2Router02MetaData.ABI + +// IUniswapV2Router02 is an auto generated Go binding around an Ethereum contract. +type IUniswapV2Router02 struct { + IUniswapV2Router02Caller // Read-only binding to the contract + IUniswapV2Router02Transactor // Write-only binding to the contract + IUniswapV2Router02Filterer // Log filterer for contract events +} + +// IUniswapV2Router02Caller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV2Router02Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2Router02Transactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV2Router02Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2Router02Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV2Router02Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV2Router02Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV2Router02Session struct { + Contract *IUniswapV2Router02 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2Router02CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV2Router02CallerSession struct { + Contract *IUniswapV2Router02Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV2Router02TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV2Router02TransactorSession struct { + Contract *IUniswapV2Router02Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV2Router02Raw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV2Router02Raw struct { + Contract *IUniswapV2Router02 // Generic contract binding to access the raw methods on +} + +// IUniswapV2Router02CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV2Router02CallerRaw struct { + Contract *IUniswapV2Router02Caller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV2Router02TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV2Router02TransactorRaw struct { + Contract *IUniswapV2Router02Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV2Router02 creates a new instance of IUniswapV2Router02, bound to a specific deployed contract. +func NewIUniswapV2Router02(address common.Address, backend bind.ContractBackend) (*IUniswapV2Router02, error) { + contract, err := bindIUniswapV2Router02(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV2Router02{IUniswapV2Router02Caller: IUniswapV2Router02Caller{contract: contract}, IUniswapV2Router02Transactor: IUniswapV2Router02Transactor{contract: contract}, IUniswapV2Router02Filterer: IUniswapV2Router02Filterer{contract: contract}}, nil +} + +// NewIUniswapV2Router02Caller creates a new read-only instance of IUniswapV2Router02, bound to a specific deployed contract. +func NewIUniswapV2Router02Caller(address common.Address, caller bind.ContractCaller) (*IUniswapV2Router02Caller, error) { + contract, err := bindIUniswapV2Router02(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV2Router02Caller{contract: contract}, nil +} + +// NewIUniswapV2Router02Transactor creates a new write-only instance of IUniswapV2Router02, bound to a specific deployed contract. +func NewIUniswapV2Router02Transactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV2Router02Transactor, error) { + contract, err := bindIUniswapV2Router02(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV2Router02Transactor{contract: contract}, nil +} + +// NewIUniswapV2Router02Filterer creates a new log filterer instance of IUniswapV2Router02, bound to a specific deployed contract. +func NewIUniswapV2Router02Filterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV2Router02Filterer, error) { + contract, err := bindIUniswapV2Router02(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV2Router02Filterer{contract: contract}, nil +} + +// bindIUniswapV2Router02 binds a generic wrapper to an already deployed contract. +func bindIUniswapV2Router02(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV2Router02MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2Router02 *IUniswapV2Router02Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2Router02.Contract.IUniswapV2Router02Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2Router02 *IUniswapV2Router02Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.IUniswapV2Router02Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2Router02 *IUniswapV2Router02Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.IUniswapV2Router02Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV2Router02 *IUniswapV2Router02CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV2Router02.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.contract.Transact(opts, method, params...) +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() pure returns(address) +func (_IUniswapV2Router02 *IUniswapV2Router02Caller) WETH(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV2Router02.contract.Call(opts, &out, "WETH") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() pure returns(address) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) WETH() (common.Address, error) { + return _IUniswapV2Router02.Contract.WETH(&_IUniswapV2Router02.CallOpts) +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() pure returns(address) +func (_IUniswapV2Router02 *IUniswapV2Router02CallerSession) WETH() (common.Address, error) { + return _IUniswapV2Router02.Contract.WETH(&_IUniswapV2Router02.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() pure returns(address) +func (_IUniswapV2Router02 *IUniswapV2Router02Caller) Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV2Router02.contract.Call(opts, &out, "factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() pure returns(address) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) Factory() (common.Address, error) { + return _IUniswapV2Router02.Contract.Factory(&_IUniswapV2Router02.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() pure returns(address) +func (_IUniswapV2Router02 *IUniswapV2Router02CallerSession) Factory() (common.Address, error) { + return _IUniswapV2Router02.Contract.Factory(&_IUniswapV2Router02.CallOpts) +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_IUniswapV2Router02 *IUniswapV2Router02Caller) GetAmountIn(opts *bind.CallOpts, amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Router02.contract.Call(opts, &out, "getAmountIn", amountOut, reserveIn, reserveOut) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) GetAmountIn(amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _IUniswapV2Router02.Contract.GetAmountIn(&_IUniswapV2Router02.CallOpts, amountOut, reserveIn, reserveOut) +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_IUniswapV2Router02 *IUniswapV2Router02CallerSession) GetAmountIn(amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _IUniswapV2Router02.Contract.GetAmountIn(&_IUniswapV2Router02.CallOpts, amountOut, reserveIn, reserveOut) +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_IUniswapV2Router02 *IUniswapV2Router02Caller) GetAmountOut(opts *bind.CallOpts, amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Router02.contract.Call(opts, &out, "getAmountOut", amountIn, reserveIn, reserveOut) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) GetAmountOut(amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _IUniswapV2Router02.Contract.GetAmountOut(&_IUniswapV2Router02.CallOpts, amountIn, reserveIn, reserveOut) +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_IUniswapV2Router02 *IUniswapV2Router02CallerSession) GetAmountOut(amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _IUniswapV2Router02.Contract.GetAmountOut(&_IUniswapV2Router02.CallOpts, amountIn, reserveIn, reserveOut) +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Caller) GetAmountsIn(opts *bind.CallOpts, amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + var out []interface{} + err := _IUniswapV2Router02.contract.Call(opts, &out, "getAmountsIn", amountOut, path) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) GetAmountsIn(amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + return _IUniswapV2Router02.Contract.GetAmountsIn(&_IUniswapV2Router02.CallOpts, amountOut, path) +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02CallerSession) GetAmountsIn(amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + return _IUniswapV2Router02.Contract.GetAmountsIn(&_IUniswapV2Router02.CallOpts, amountOut, path) +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Caller) GetAmountsOut(opts *bind.CallOpts, amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + var out []interface{} + err := _IUniswapV2Router02.contract.Call(opts, &out, "getAmountsOut", amountIn, path) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) GetAmountsOut(amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + return _IUniswapV2Router02.Contract.GetAmountsOut(&_IUniswapV2Router02.CallOpts, amountIn, path) +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02CallerSession) GetAmountsOut(amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + return _IUniswapV2Router02.Contract.GetAmountsOut(&_IUniswapV2Router02.CallOpts, amountIn, path) +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_IUniswapV2Router02 *IUniswapV2Router02Caller) Quote(opts *bind.CallOpts, amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + var out []interface{} + err := _IUniswapV2Router02.contract.Call(opts, &out, "quote", amountA, reserveA, reserveB) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) Quote(amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + return _IUniswapV2Router02.Contract.Quote(&_IUniswapV2Router02.CallOpts, amountA, reserveA, reserveB) +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_IUniswapV2Router02 *IUniswapV2Router02CallerSession) Quote(amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + return _IUniswapV2Router02.Contract.Quote(&_IUniswapV2Router02.CallOpts, amountA, reserveA, reserveB) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) AddLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "addLiquidity", tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) AddLiquidity(tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.AddLiquidity(&_IUniswapV2Router02.TransactOpts, tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) AddLiquidity(tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.AddLiquidity(&_IUniswapV2Router02.TransactOpts, tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) AddLiquidityETH(opts *bind.TransactOpts, token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "addLiquidityETH", token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) AddLiquidityETH(token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.AddLiquidityETH(&_IUniswapV2Router02.TransactOpts, token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) AddLiquidityETH(token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.AddLiquidityETH(&_IUniswapV2Router02.TransactOpts, token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) RemoveLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "removeLiquidity", tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) RemoveLiquidity(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidity(&_IUniswapV2Router02.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) RemoveLiquidity(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidity(&_IUniswapV2Router02.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) RemoveLiquidityETH(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "removeLiquidityETH", token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) RemoveLiquidityETH(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidityETH(&_IUniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) RemoveLiquidityETH(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidityETH(&_IUniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) RemoveLiquidityETHSupportingFeeOnTransferTokens(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "removeLiquidityETHSupportingFeeOnTransferTokens", token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) RemoveLiquidityETHSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidityETHSupportingFeeOnTransferTokens(&_IUniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) RemoveLiquidityETHSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidityETHSupportingFeeOnTransferTokens(&_IUniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) RemoveLiquidityETHWithPermit(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "removeLiquidityETHWithPermit", token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) RemoveLiquidityETHWithPermit(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidityETHWithPermit(&_IUniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) RemoveLiquidityETHWithPermit(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidityETHWithPermit(&_IUniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(&_IUniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(&_IUniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) RemoveLiquidityWithPermit(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "removeLiquidityWithPermit", tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) RemoveLiquidityWithPermit(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidityWithPermit(&_IUniswapV2Router02.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) RemoveLiquidityWithPermit(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.RemoveLiquidityWithPermit(&_IUniswapV2Router02.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) SwapETHForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "swapETHForExactTokens", amountOut, path, to, deadline) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapETHForExactTokens(&_IUniswapV2Router02.TransactOpts, amountOut, path, to, deadline) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapETHForExactTokens(&_IUniswapV2Router02.TransactOpts, amountOut, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) SwapExactETHForTokens(opts *bind.TransactOpts, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "swapExactETHForTokens", amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactETHForTokens(&_IUniswapV2Router02.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactETHForTokens(&_IUniswapV2Router02.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) SwapExactETHForTokensSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "swapExactETHForTokensSupportingFeeOnTransferTokens", amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_IUniswapV2Router02 *IUniswapV2Router02Session) SwapExactETHForTokensSupportingFeeOnTransferTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactETHForTokensSupportingFeeOnTransferTokens(&_IUniswapV2Router02.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) SwapExactETHForTokensSupportingFeeOnTransferTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactETHForTokensSupportingFeeOnTransferTokens(&_IUniswapV2Router02.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) SwapExactTokensForETH(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "swapExactTokensForETH", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactTokensForETH(&_IUniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactTokensForETH(&_IUniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) SwapExactTokensForETHSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "swapExactTokensForETHSupportingFeeOnTransferTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_IUniswapV2Router02 *IUniswapV2Router02Session) SwapExactTokensForETHSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactTokensForETHSupportingFeeOnTransferTokens(&_IUniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) SwapExactTokensForETHSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactTokensForETHSupportingFeeOnTransferTokens(&_IUniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) SwapExactTokensForTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "swapExactTokensForTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactTokensForTokens(&_IUniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactTokensForTokens(&_IUniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) SwapExactTokensForTokensSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "swapExactTokensForTokensSupportingFeeOnTransferTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_IUniswapV2Router02 *IUniswapV2Router02Session) SwapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactTokensForTokensSupportingFeeOnTransferTokens(&_IUniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) SwapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapExactTokensForTokensSupportingFeeOnTransferTokens(&_IUniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) SwapTokensForExactETH(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "swapTokensForExactETH", amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapTokensForExactETH(&_IUniswapV2Router02.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapTokensForExactETH(&_IUniswapV2Router02.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Transactor) SwapTokensForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.contract.Transact(opts, "swapTokensForExactTokens", amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02Session) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapTokensForExactTokens(&_IUniswapV2Router02.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_IUniswapV2Router02 *IUniswapV2Router02TransactorSession) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _IUniswapV2Router02.Contract.SwapTokensForExactTokens(&_IUniswapV2Router02.TransactOpts, amountOut, amountInMax, path, to, deadline) +} diff --git a/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/iweth.sol/iweth.go b/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/iweth.sol/iweth.go new file mode 100644 index 0000000000..5e2c9dc551 --- /dev/null +++ b/pkg/contracts/uniswap/v2-periphery/contracts/interfaces/iweth.sol/iweth.go @@ -0,0 +1,244 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iweth + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IWETHMetaData contains all meta data concerning the IWETH contract. +var IWETHMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IWETHABI is the input ABI used to generate the binding from. +// Deprecated: Use IWETHMetaData.ABI instead. +var IWETHABI = IWETHMetaData.ABI + +// IWETH is an auto generated Go binding around an Ethereum contract. +type IWETH struct { + IWETHCaller // Read-only binding to the contract + IWETHTransactor // Write-only binding to the contract + IWETHFilterer // Log filterer for contract events +} + +// IWETHCaller is an auto generated read-only Go binding around an Ethereum contract. +type IWETHCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IWETHTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IWETHTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IWETHFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IWETHFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IWETHSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IWETHSession struct { + Contract *IWETH // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IWETHCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IWETHCallerSession struct { + Contract *IWETHCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IWETHTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IWETHTransactorSession struct { + Contract *IWETHTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IWETHRaw is an auto generated low-level Go binding around an Ethereum contract. +type IWETHRaw struct { + Contract *IWETH // Generic contract binding to access the raw methods on +} + +// IWETHCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IWETHCallerRaw struct { + Contract *IWETHCaller // Generic read-only contract binding to access the raw methods on +} + +// IWETHTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IWETHTransactorRaw struct { + Contract *IWETHTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIWETH creates a new instance of IWETH, bound to a specific deployed contract. +func NewIWETH(address common.Address, backend bind.ContractBackend) (*IWETH, error) { + contract, err := bindIWETH(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IWETH{IWETHCaller: IWETHCaller{contract: contract}, IWETHTransactor: IWETHTransactor{contract: contract}, IWETHFilterer: IWETHFilterer{contract: contract}}, nil +} + +// NewIWETHCaller creates a new read-only instance of IWETH, bound to a specific deployed contract. +func NewIWETHCaller(address common.Address, caller bind.ContractCaller) (*IWETHCaller, error) { + contract, err := bindIWETH(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IWETHCaller{contract: contract}, nil +} + +// NewIWETHTransactor creates a new write-only instance of IWETH, bound to a specific deployed contract. +func NewIWETHTransactor(address common.Address, transactor bind.ContractTransactor) (*IWETHTransactor, error) { + contract, err := bindIWETH(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IWETHTransactor{contract: contract}, nil +} + +// NewIWETHFilterer creates a new log filterer instance of IWETH, bound to a specific deployed contract. +func NewIWETHFilterer(address common.Address, filterer bind.ContractFilterer) (*IWETHFilterer, error) { + contract, err := bindIWETH(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IWETHFilterer{contract: contract}, nil +} + +// bindIWETH binds a generic wrapper to an already deployed contract. +func bindIWETH(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IWETHMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IWETH *IWETHRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IWETH.Contract.IWETHCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IWETH *IWETHRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IWETH.Contract.IWETHTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IWETH *IWETHRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IWETH.Contract.IWETHTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IWETH *IWETHCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IWETH.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IWETH *IWETHTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IWETH.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IWETH *IWETHTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IWETH.Contract.contract.Transact(opts, method, params...) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_IWETH *IWETHTransactor) Deposit(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IWETH.contract.Transact(opts, "deposit") +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_IWETH *IWETHSession) Deposit() (*types.Transaction, error) { + return _IWETH.Contract.Deposit(&_IWETH.TransactOpts) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_IWETH *IWETHTransactorSession) Deposit() (*types.Transaction, error) { + return _IWETH.Contract.Deposit(&_IWETH.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IWETH *IWETHTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _IWETH.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IWETH *IWETHSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IWETH.Contract.Transfer(&_IWETH.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_IWETH *IWETHTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _IWETH.Contract.Transfer(&_IWETH.TransactOpts, to, value) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 ) returns() +func (_IWETH *IWETHTransactor) Withdraw(opts *bind.TransactOpts, arg0 *big.Int) (*types.Transaction, error) { + return _IWETH.contract.Transact(opts, "withdraw", arg0) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 ) returns() +func (_IWETH *IWETHSession) Withdraw(arg0 *big.Int) (*types.Transaction, error) { + return _IWETH.Contract.Withdraw(&_IWETH.TransactOpts, arg0) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 ) returns() +func (_IWETH *IWETHTransactorSession) Withdraw(arg0 *big.Int) (*types.Transaction, error) { + return _IWETH.Contract.Withdraw(&_IWETH.TransactOpts, arg0) +} diff --git a/pkg/contracts/uniswap/v2-periphery/contracts/libraries/safemath.sol/safemath.go b/pkg/contracts/uniswap/v2-periphery/contracts/libraries/safemath.sol/safemath.go new file mode 100644 index 0000000000..cb7868e287 --- /dev/null +++ b/pkg/contracts/uniswap/v2-periphery/contracts/libraries/safemath.sol/safemath.go @@ -0,0 +1,203 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package safemath + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SafeMathMetaData contains all meta data concerning the SafeMath contract. +var SafeMathMetaData = &bind.MetaData{ + ABI: "[]", + Bin: "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209280478828a71436ad42fb262d99756ed7d7277ccde8fb7ef92c2abeb2d8f36164736f6c63430006060033", +} + +// SafeMathABI is the input ABI used to generate the binding from. +// Deprecated: Use SafeMathMetaData.ABI instead. +var SafeMathABI = SafeMathMetaData.ABI + +// SafeMathBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use SafeMathMetaData.Bin instead. +var SafeMathBin = SafeMathMetaData.Bin + +// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. +func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { + parsed, err := SafeMathMetaData.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(SafeMathBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// SafeMath is an auto generated Go binding around an Ethereum contract. +type SafeMath struct { + SafeMathCaller // Read-only binding to the contract + SafeMathTransactor // Write-only binding to the contract + SafeMathFilterer // Log filterer for contract events +} + +// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. +type SafeMathCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SafeMathTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SafeMathFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SafeMathSession struct { + Contract *SafeMath // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SafeMathCallerSession struct { + Contract *SafeMathCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SafeMathTransactorSession struct { + Contract *SafeMathTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. +type SafeMathRaw struct { + Contract *SafeMath // Generic contract binding to access the raw methods on +} + +// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SafeMathCallerRaw struct { + Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on +} + +// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SafeMathTransactorRaw struct { + Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. +func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { + contract, err := bindSafeMath(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { + contract, err := bindSafeMath(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SafeMathCaller{contract: contract}, nil +} + +// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { + contract, err := bindSafeMath(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SafeMathTransactor{contract: contract}, nil +} + +// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { + contract, err := bindSafeMath(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SafeMathFilterer{contract: contract}, nil +} + +// bindSafeMath binds a generic wrapper to an already deployed contract. +func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := SafeMathMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SafeMath.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transact(opts, method, params...) +} diff --git a/pkg/contracts/uniswap/v2-periphery/contracts/libraries/uniswapv2library.sol/uniswapv2library.go b/pkg/contracts/uniswap/v2-periphery/contracts/libraries/uniswapv2library.sol/uniswapv2library.go new file mode 100644 index 0000000000..ea7744ae14 --- /dev/null +++ b/pkg/contracts/uniswap/v2-periphery/contracts/libraries/uniswapv2library.sol/uniswapv2library.go @@ -0,0 +1,203 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package uniswapv2library + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// UniswapV2LibraryMetaData contains all meta data concerning the UniswapV2Library contract. +var UniswapV2LibraryMetaData = &bind.MetaData{ + ABI: "[]", + Bin: "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208421bd92ba607f7025ef11dd3ba3c30a46c62559adc890b6863b512efbd8984464736f6c63430006060033", +} + +// UniswapV2LibraryABI is the input ABI used to generate the binding from. +// Deprecated: Use UniswapV2LibraryMetaData.ABI instead. +var UniswapV2LibraryABI = UniswapV2LibraryMetaData.ABI + +// UniswapV2LibraryBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use UniswapV2LibraryMetaData.Bin instead. +var UniswapV2LibraryBin = UniswapV2LibraryMetaData.Bin + +// DeployUniswapV2Library deploys a new Ethereum contract, binding an instance of UniswapV2Library to it. +func DeployUniswapV2Library(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *UniswapV2Library, error) { + parsed, err := UniswapV2LibraryMetaData.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(UniswapV2LibraryBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &UniswapV2Library{UniswapV2LibraryCaller: UniswapV2LibraryCaller{contract: contract}, UniswapV2LibraryTransactor: UniswapV2LibraryTransactor{contract: contract}, UniswapV2LibraryFilterer: UniswapV2LibraryFilterer{contract: contract}}, nil +} + +// UniswapV2Library is an auto generated Go binding around an Ethereum contract. +type UniswapV2Library struct { + UniswapV2LibraryCaller // Read-only binding to the contract + UniswapV2LibraryTransactor // Write-only binding to the contract + UniswapV2LibraryFilterer // Log filterer for contract events +} + +// UniswapV2LibraryCaller is an auto generated read-only Go binding around an Ethereum contract. +type UniswapV2LibraryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2LibraryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type UniswapV2LibraryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2LibraryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UniswapV2LibraryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2LibrarySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UniswapV2LibrarySession struct { + Contract *UniswapV2Library // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UniswapV2LibraryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UniswapV2LibraryCallerSession struct { + Contract *UniswapV2LibraryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UniswapV2LibraryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UniswapV2LibraryTransactorSession struct { + Contract *UniswapV2LibraryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UniswapV2LibraryRaw is an auto generated low-level Go binding around an Ethereum contract. +type UniswapV2LibraryRaw struct { + Contract *UniswapV2Library // Generic contract binding to access the raw methods on +} + +// UniswapV2LibraryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UniswapV2LibraryCallerRaw struct { + Contract *UniswapV2LibraryCaller // Generic read-only contract binding to access the raw methods on +} + +// UniswapV2LibraryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UniswapV2LibraryTransactorRaw struct { + Contract *UniswapV2LibraryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewUniswapV2Library creates a new instance of UniswapV2Library, bound to a specific deployed contract. +func NewUniswapV2Library(address common.Address, backend bind.ContractBackend) (*UniswapV2Library, error) { + contract, err := bindUniswapV2Library(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UniswapV2Library{UniswapV2LibraryCaller: UniswapV2LibraryCaller{contract: contract}, UniswapV2LibraryTransactor: UniswapV2LibraryTransactor{contract: contract}, UniswapV2LibraryFilterer: UniswapV2LibraryFilterer{contract: contract}}, nil +} + +// NewUniswapV2LibraryCaller creates a new read-only instance of UniswapV2Library, bound to a specific deployed contract. +func NewUniswapV2LibraryCaller(address common.Address, caller bind.ContractCaller) (*UniswapV2LibraryCaller, error) { + contract, err := bindUniswapV2Library(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UniswapV2LibraryCaller{contract: contract}, nil +} + +// NewUniswapV2LibraryTransactor creates a new write-only instance of UniswapV2Library, bound to a specific deployed contract. +func NewUniswapV2LibraryTransactor(address common.Address, transactor bind.ContractTransactor) (*UniswapV2LibraryTransactor, error) { + contract, err := bindUniswapV2Library(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UniswapV2LibraryTransactor{contract: contract}, nil +} + +// NewUniswapV2LibraryFilterer creates a new log filterer instance of UniswapV2Library, bound to a specific deployed contract. +func NewUniswapV2LibraryFilterer(address common.Address, filterer bind.ContractFilterer) (*UniswapV2LibraryFilterer, error) { + contract, err := bindUniswapV2Library(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UniswapV2LibraryFilterer{contract: contract}, nil +} + +// bindUniswapV2Library binds a generic wrapper to an already deployed contract. +func bindUniswapV2Library(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := UniswapV2LibraryMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UniswapV2Library *UniswapV2LibraryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2Library.Contract.UniswapV2LibraryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UniswapV2Library *UniswapV2LibraryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2Library.Contract.UniswapV2LibraryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapV2Library *UniswapV2LibraryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2Library.Contract.UniswapV2LibraryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UniswapV2Library *UniswapV2LibraryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2Library.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UniswapV2Library *UniswapV2LibraryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2Library.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapV2Library *UniswapV2LibraryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2Library.Contract.contract.Transact(opts, method, params...) +} diff --git a/pkg/contracts/uniswap/v2-periphery/contracts/uniswapv2router02.sol/uniswapv2router02.go b/pkg/contracts/uniswap/v2-periphery/contracts/uniswapv2router02.sol/uniswapv2router02.go new file mode 100644 index 0000000000..42fa84898c --- /dev/null +++ b/pkg/contracts/uniswap/v2-periphery/contracts/uniswapv2router02.sol/uniswapv2router02.go @@ -0,0 +1,798 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package uniswapv2router02 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// UniswapV2Router02MetaData contains all meta data concerning the UniswapV2Router02 contract. +var UniswapV2Router02MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_WETH\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountADesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsIn\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveB\",\"type\":\"uint256\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityETHSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapETHForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETHSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60c06040523480156200001157600080fd5b506040516200573e3803806200573e833981810160405260408110156200003757600080fd5b5080516020909101516001600160601b0319606092831b8116608052911b1660a05260805160601c60a05160601c6155b762000187600039806101ac5280610e5d5280610e985280610fd5528061129852806116f252806118d65280611e1e5280611fa252806120725280612179528061232c52806123c15280612673528061271a52806127ef52806128f452806129dc5280612a5d52806130ec5280613422528061347852806134ac528061352d528061374752806138f7528061398c5250806110c752806111c5528061136b52806113a4528061154f52806117e452806118b45280611aa1528061225f528061240052806125a95280612a9c5280612ddf5280613071528061309a52806130ca52806132a75280613456528061382d52806139cb528061444a528061448d52806147ed52806149ce5280614f49528061502a52806150aa52506155b76000f3fe60806040526004361061018f5760003560e01c80638803dbee116100d6578063c45a01551161007f578063e8e3370011610059578063e8e3370014610c71578063f305d71914610cfe578063fb3bdb4114610d51576101d5565b8063c45a015514610b25578063d06ca61f14610b3a578063ded9382a14610bf1576101d5565b8063af2979eb116100b0578063af2979eb146109c8578063b6f9de9514610a28578063baa2abde14610abb576101d5565b80638803dbee146108af578063ad5c464814610954578063ad615dec14610992576101d5565b80634a25d94a11610138578063791ac94711610112578063791ac947146107415780637ff36ab5146107e657806385f8c25914610879576101d5565b80634a25d94a146105775780635b0d59841461061c5780635c11d7951461069c576101d5565b80631f00ca74116101695780631f00ca74146103905780632195995c1461044757806338ed1739146104d2576101d5565b806302751cec146101da578063054d50d41461025357806318cbafe51461029b576101d5565b366101d5573373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101d357fe5b005b600080fd5b3480156101e657600080fd5b5061023a600480360360c08110156101fd57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135916040820135916060810135916080820135169060a00135610de4565b6040805192835260208301919091528051918290030190f35b34801561025f57600080fd5b506102896004803603606081101561027657600080fd5b5080359060208101359060400135610f37565b60408051918252519081900360200190f35b3480156102a757600080fd5b50610340600480360360a08110156102be57600080fd5b8135916020810135918101906060810160408201356401000000008111156102e557600080fd5b8201836020820111156102f757600080fd5b8035906020019184602083028401116401000000008311171561031957600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f4c565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561037c578181015183820152602001610364565b505050509050019250505060405180910390f35b34801561039c57600080fd5b50610340600480360360408110156103b357600080fd5b813591908101906040810160208201356401000000008111156103d557600080fd5b8201836020820111156103e757600080fd5b8035906020019184602083028401116401000000008311171561040957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611364945050505050565b34801561045357600080fd5b5061023a600480360361016081101561046b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013582169160408201359160608101359160808201359160a08101359091169060c08101359060e081013515159060ff610100820135169061012081013590610140013561139a565b3480156104de57600080fd5b50610340600480360360a08110156104f557600080fd5b81359160208101359181019060608101604082013564010000000081111561051c57600080fd5b82018360208201111561052e57600080fd5b8035906020019184602083028401116401000000008311171561055057600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff81351690602001356114d8565b34801561058357600080fd5b50610340600480360360a081101561059a57600080fd5b8135916020810135918101906060810160408201356401000000008111156105c157600080fd5b8201836020820111156105d357600080fd5b803590602001918460208302840111640100000000831117156105f557600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff8135169060200135611669565b34801561062857600080fd5b50610289600480360361014081101561064057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e082013516906101008101359061012001356118ac565b3480156106a857600080fd5b506101d3600480360360a08110156106bf57600080fd5b8135916020810135918101906060810160408201356401000000008111156106e657600080fd5b8201836020820111156106f857600080fd5b8035906020019184602083028401116401000000008311171561071a57600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff81351690602001356119fe565b34801561074d57600080fd5b506101d3600480360360a081101561076457600080fd5b81359160208101359181019060608101604082013564010000000081111561078b57600080fd5b82018360208201111561079d57600080fd5b803590602001918460208302840111640100000000831117156107bf57600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff8135169060200135611d97565b610340600480360360808110156107fc57600080fd5b8135919081019060408101602082013564010000000081111561081e57600080fd5b82018360208201111561083057600080fd5b8035906020019184602083028401116401000000008311171561085257600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff8135169060200135612105565b34801561088557600080fd5b506102896004803603606081101561089c57600080fd5b5080359060208101359060400135612525565b3480156108bb57600080fd5b50610340600480360360a08110156108d257600080fd5b8135916020810135918101906060810160408201356401000000008111156108f957600080fd5b82018360208201111561090b57600080fd5b8035906020019184602083028401116401000000008311171561092d57600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff8135169060200135612532565b34801561096057600080fd5b50610969612671565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561099e57600080fd5b50610289600480360360608110156109b557600080fd5b5080359060208101359060400135612695565b3480156109d457600080fd5b50610289600480360360c08110156109eb57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135916040820135916060810135916080820135169060a001356126a2565b6101d360048036036080811015610a3e57600080fd5b81359190810190604081016020820135640100000000811115610a6057600080fd5b820183602082011115610a7257600080fd5b80359060200191846020830284011164010000000083111715610a9457600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff8135169060200135612882565b348015610ac757600080fd5b5061023a600480360360e0811015610ade57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013582169160408201359160608101359160808201359160a08101359091169060c00135612d65565b348015610b3157600080fd5b5061096961306f565b348015610b4657600080fd5b5061034060048036036040811015610b5d57600080fd5b81359190810190604081016020820135640100000000811115610b7f57600080fd5b820183602082011115610b9157600080fd5b80359060200191846020830284011164010000000083111715610bb357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550613093945050505050565b348015610bfd57600080fd5b5061023a6004803603610140811015610c1557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e082013516906101008101359061012001356130c0565b348015610c7d57600080fd5b50610ce06004803603610100811015610c9557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013582169160408201359160608101359160808201359160a08101359160c0820135169060e00135613218565b60408051938452602084019290925282820152519081900360600190f35b610ce0600480360360c0811015610d1457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135916040820135916060810135916080820135169060a001356133a7565b61034060048036036080811015610d6757600080fd5b81359190810190604081016020820135640100000000811115610d8957600080fd5b820183602082011115610d9b57600080fd5b80359060200191846020830284011164010000000083111715610dbd57600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff81351690602001356136d3565b6000808242811015610e5757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b610e86897f00000000000000000000000000000000000000000000000000000000000000008a8a8a308a612d65565b9093509150610e96898685613b22565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610f0957600080fd5b505af1158015610f1d573d6000803e3d6000fd5b50505050610f2b8583613cff565b50965096945050505050565b6000610f44848484613e3c565b949350505050565b60608142811015610fbe57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001686867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811061102357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f556e69737761705632526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b6111207f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613f6092505050565b9150868260018451038151811061113357fe5b60200260200101511015611192576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180615508602b913960400191505060405180910390fd5b611257868660008181106111a257fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff163361123d7f00000000000000000000000000000000000000000000000000000000000000008a8a60008181106111f157fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168b8b600181811061121b57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff166140c6565b8560008151811061124a57fe5b60200260200101516141b1565b61129682878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250614381915050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d836001855103815181106112e257fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561132057600080fd5b505af1158015611334573d6000803e3d6000fd5b50505050611359848360018551038151811061134c57fe5b6020026020010151613cff565b509695505050505050565b60606113917f00000000000000000000000000000000000000000000000000000000000000008484614608565b90505b92915050565b60008060006113ca7f00000000000000000000000000000000000000000000000000000000000000008f8f6140c6565b90506000876113d9578c6113fb565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b604080517fd505accf00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c48101889052905191925073ffffffffffffffffffffffffffffffffffffffff84169163d505accf9160e48082019260009290919082900301818387803b15801561149757600080fd5b505af11580156114ab573d6000803e3d6000fd5b505050506114be8f8f8f8f8f8f8f612d65565b809450819550505050509b509b9950505050505050505050565b6060814281101561154a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b6115a87f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613f6092505050565b915086826001845103815181106115bb57fe5b6020026020010151101561161a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180615508602b913960400191505060405180910390fd5b61162a868660008181106111a257fe5b61135982878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250614381915050565b606081428110156116db57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001686867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811061174057fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146117df57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f556e69737761705632526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b61183d7f00000000000000000000000000000000000000000000000000000000000000008988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061460892505050565b9150868260008151811061184d57fe5b60200260200101511115611192576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806154986027913960400191505060405180910390fd5b6000806118fa7f00000000000000000000000000000000000000000000000000000000000000008d7f00000000000000000000000000000000000000000000000000000000000000006140c6565b9050600086611909578b61192b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b604080517fd505accf00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101839052606481018b905260ff8916608482015260a4810188905260c48101879052905191925073ffffffffffffffffffffffffffffffffffffffff84169163d505accf9160e48082019260009290919082900301818387803b1580156119c757600080fd5b505af11580156119db573d6000803e3d6000fd5b505050506119ed8d8d8d8d8d8d6126a2565b9d9c50505050505050505050505050565b8042811015611a6e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b611afd85856000818110611a7e57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1633611af77f000000000000000000000000000000000000000000000000000000000000000089896000818110611acd57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168a8a600181811061121b57fe5b8a6141b1565b600085857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818110611b2d57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611bc657600080fd5b505afa158015611bda573d6000803e3d6000fd5b505050506040513d6020811015611bf057600080fd5b50516040805160208881028281018201909352888252929350611c32929091899189918291850190849080828437600092019190915250889250614796915050565b86611d368288887fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818110611c6557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611cfe57600080fd5b505afa158015611d12573d6000803e3d6000fd5b505050506040513d6020811015611d2857600080fd5b50519063ffffffff614b2916565b1015611d8d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180615508602b913960400191505060405180910390fd5b5050505050505050565b8042811015611e0757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001685857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818110611e6c57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f0b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f556e69737761705632526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b611f1b85856000818110611a7e57fe5b611f59858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250614796915050565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b158015611fe957600080fd5b505afa158015611ffd573d6000803e3d6000fd5b505050506040513d602081101561201357600080fd5b5051905086811015612070576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180615508602b913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156120e357600080fd5b505af11580156120f7573d6000803e3d6000fd5b50505050611d8d8482613cff565b6060814281101561217757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16868660008181106121bb57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461225a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f556e69737761705632526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b6122b87f000000000000000000000000000000000000000000000000000000000000000034888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613f6092505050565b915086826001845103815181106122cb57fe5b6020026020010151101561232a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180615508602b913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db08360008151811061237357fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156123a657600080fd5b505af11580156123ba573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61242c7f000000000000000000000000000000000000000000000000000000000000000089896000818110611acd57fe5b8460008151811061243957fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156124aa57600080fd5b505af11580156124be573d6000803e3d6000fd5b505050506040513d60208110156124d457600080fd5b50516124dc57fe5b61251b82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250614381915050565b5095945050505050565b6000610f44848484614b9b565b606081428110156125a457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b6126027f00000000000000000000000000000000000000000000000000000000000000008988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061460892505050565b9150868260008151811061261257fe5b6020026020010151111561161a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806154986027913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610f44848484614cbf565b6000814281101561271457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b612743887f00000000000000000000000000000000000000000000000000000000000000008989893089612d65565b604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290519194506127ed92508a91879173ffffffffffffffffffffffffffffffffffffffff8416916370a0823191602480820192602092909190829003018186803b1580156127bc57600080fd5b505afa1580156127d0573d6000803e3d6000fd5b505050506040513d60208110156127e657600080fd5b5051613b22565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561286057600080fd5b505af1158015612874573d6000803e3d6000fd5b505050506113598483613cff565b80428110156128f257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168585600081811061293657fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146129d557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f556e69737761705632526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b60003490507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015612a4257600080fd5b505af1158015612a56573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb612ac87f000000000000000000000000000000000000000000000000000000000000000089896000818110611acd57fe5b836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b3257600080fd5b505af1158015612b46573d6000803e3d6000fd5b505050506040513d6020811015612b5c57600080fd5b5051612b6457fe5b600086867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818110612b9457fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612c2d57600080fd5b505afa158015612c41573d6000803e3d6000fd5b505050506040513d6020811015612c5757600080fd5b50516040805160208981028281018201909352898252929350612c999290918a918a918291850190849080828437600092019190915250899250614796915050565b87611d368289897fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818110612ccc57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231896040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611cfe57600080fd5b6000808242811015612dd857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b6000612e057f00000000000000000000000000000000000000000000000000000000000000008c8c6140c6565b604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff831660248201819052604482018d9052915192935090916323b872dd916064808201926020929091908290030181600087803b158015612e8657600080fd5b505af1158015612e9a573d6000803e3d6000fd5b505050506040513d6020811015612eb057600080fd5b5050604080517f89afcb4400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015282516000938493928616926389afcb44926024808301939282900301818787803b158015612f2357600080fd5b505af1158015612f37573d6000803e3d6000fd5b505050506040513d6040811015612f4d57600080fd5b50805160209091015190925090506000612f678e8e614d9f565b5090508073ffffffffffffffffffffffffffffffffffffffff168e73ffffffffffffffffffffffffffffffffffffffff1614612fa4578183612fa7565b82825b90975095508a871015613005576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806154bf6026913960400191505060405180910390fd5b8986101561305e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806154256026913960400191505060405180910390fd5b505050505097509795505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606113917f00000000000000000000000000000000000000000000000000000000000000008484613f60565b60008060006131107f00000000000000000000000000000000000000000000000000000000000000008e7f00000000000000000000000000000000000000000000000000000000000000006140c6565b905060008761311f578c613141565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b604080517fd505accf00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c48101889052905191925073ffffffffffffffffffffffffffffffffffffffff84169163d505accf9160e48082019260009290919082900301818387803b1580156131dd57600080fd5b505af11580156131f1573d6000803e3d6000fd5b505050506132038e8e8e8e8e8e610de4565b909f909e509c50505050505050505050505050565b6000806000834281101561328d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b61329b8c8c8c8c8c8c614ef2565b909450925060006132cd7f00000000000000000000000000000000000000000000000000000000000000008e8e6140c6565b90506132db8d3383886141b1565b6132e78c3383876141b1565b8073ffffffffffffffffffffffffffffffffffffffff16636a627842886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561336657600080fd5b505af115801561337a573d6000803e3d6000fd5b505050506040513d602081101561339057600080fd5b5051949d939c50939a509198505050505050505050565b6000806000834281101561341c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b61344a8a7f00000000000000000000000000000000000000000000000000000000000000008b348c8c614ef2565b9094509250600061349c7f00000000000000000000000000000000000000000000000000000000000000008c7f00000000000000000000000000000000000000000000000000000000000000006140c6565b90506134aa8b3383886141b1565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561351257600080fd5b505af1158015613526573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156135d257600080fd5b505af11580156135e6573d6000803e3d6000fd5b505050506040513d60208110156135fc57600080fd5b505161360457fe5b8073ffffffffffffffffffffffffffffffffffffffff16636a627842886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561368357600080fd5b505af1158015613697573d6000803e3d6000fd5b505050506040513d60208110156136ad57600080fd5b50519250348410156136c5576136c533853403613cff565b505096509650969350505050565b6060814281101561374557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f556e69737761705632526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168686600081811061378957fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461382857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f556e69737761705632526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b6138867f00000000000000000000000000000000000000000000000000000000000000008888888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061460892505050565b9150348260008151811061389657fe5b602002602001015111156138f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806154986027913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db08360008151811061393e57fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561397157600080fd5b505af1158015613985573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6139f77f000000000000000000000000000000000000000000000000000000000000000089896000818110611acd57fe5b84600081518110613a0457fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613a7557600080fd5b505af1158015613a89573d6000803e3d6000fd5b505050506040513d6020811015613a9f57600080fd5b5051613aa757fe5b613ae682878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250614381915050565b81600081518110613af357fe5b602002602001015134111561251b5761251b3383600081518110613b1357fe5b60200260200101513403613cff565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b60208310613bf857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613bbb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613c5a576040519150601f19603f3d011682016040523d82523d6000602084013e613c5f565b606091505b5091509150818015613c8d575080511580613c8d5750808060200190516020811015613c8a57600080fd5b50515b613cf857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015290519081900360640190fd5b5050505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040518082805190602001908083835b60208310613d7657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613d39565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613dd8576040519150601f19603f3d011682016040523d82523d6000602084013e613ddd565b606091505b5050905080613e37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806154e56023913960400191505060405180910390fd5b505050565b6000808411613e96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180615557602b913960400191505060405180910390fd5b600083118015613ea65750600082115b613efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061544b6028913960400191505060405180910390fd5b6000613f0f856103e563ffffffff6151f316565b90506000613f23828563ffffffff6151f316565b90506000613f4983613f3d886103e863ffffffff6151f316565b9063ffffffff61527916565b9050808281613f5457fe5b04979650505050505050565b6060600282511015613fd357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a20494e56414c49445f504154480000604482015290519081900360640190fd5b815167ffffffffffffffff81118015613feb57600080fd5b50604051908082528060200260200182016040528015614015578160200160208202803683370190505b509050828160008151811061402657fe5b60200260200101818152505060005b60018351038110156140be576000806140788786858151811061405457fe5b602002602001015187866001018151811061406b57fe5b60200260200101516152eb565b9150915061409a84848151811061408b57fe5b60200260200101518383613e3c565b8484600101815181106140a957fe5b60209081029190910101525050600101614035565b509392505050565b60008060006140d58585614d9f565b604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017815292518251600094606094938a169392918291908083835b6020831061428f57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101614252565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146142f1576040519150601f19603f3d011682016040523d82523d6000602084013e6142f6565b606091505b5091509150818015614324575080511580614324575080806020019051602081101561432157600080fd5b50515b614379576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806155336024913960400191505060405180910390fd5b505050505050565b60005b60018351038110156146025760008084838151811061439f57fe5b60200260200101518584600101815181106143b657fe5b60200260200101519150915060006143ce8383614d9f565b50905060008785600101815181106143e257fe5b602002602001015190506000808373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461442a5782600061442e565b6000835b91509150600060028a510388106144455788614486565b6144867f0000000000000000000000000000000000000000000000000000000000000000878c8b6002018151811061447957fe5b60200260200101516140c6565b90506144b37f000000000000000000000000000000000000000000000000000000000000000088886140c6565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f84848460006040519080825280601f01601f1916602001820160405280156144fd576020820181803683370190505b506040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614588578181015183820152602001614570565b50505050905090810190601f1680156145b55780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156145d757600080fd5b505af11580156145eb573d6000803e3d6000fd5b505060019099019850614384975050505050505050565b50505050565b606060028251101561467b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a20494e56414c49445f504154480000604482015290519081900360640190fd5b815167ffffffffffffffff8111801561469357600080fd5b506040519080825280602002602001820160405280156146bd578160200160208202803683370190505b50905082816001835103815181106146d157fe5b602090810291909101015281517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b80156140be576000806147318786600186038151811061471d57fe5b602002602001015187868151811061406b57fe5b9150915061475384848151811061474457fe5b60200260200101518383614b9b565b84600185038151811061476257fe5b602090810291909101015250507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01614701565b60005b6001835103811015613e37576000808483815181106147b457fe5b60200260200101518584600101815181106147cb57fe5b60200260200101519150915060006147e38383614d9f565b50905060006148137f000000000000000000000000000000000000000000000000000000000000000085856140c6565b90506000806000808473ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561486157600080fd5b505afa158015614875573d6000803e3d6000fd5b505050506040513d606081101561488b57600080fd5b5080516020909101516dffffffffffffffffffffffffffff918216935016905060008073ffffffffffffffffffffffffffffffffffffffff8a8116908916146148d55782846148d8565b83835b9150915061495d828b73ffffffffffffffffffffffffffffffffffffffff166370a082318a6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611cfe57600080fd5b955061496a868383613e3c565b9450505050506000808573ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146149ae578260006149b2565b6000835b91509150600060028c51038a106149c9578a6149fd565b6149fd7f0000000000000000000000000000000000000000000000000000000000000000898e8d6002018151811061447957fe5b60408051600080825260208201928390527f022c0d9f000000000000000000000000000000000000000000000000000000008352602482018781526044830187905273ffffffffffffffffffffffffffffffffffffffff8086166064850152608060848501908152845160a48601819052969750908c169563022c0d9f958a958a958a9591949193919260c486019290918190849084905b83811015614aad578181015183820152602001614a95565b50505050905090810190601f168015614ada5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015614afc57600080fd5b505af1158015614b10573d6000803e3d6000fd5b50506001909b019a506147999950505050505050505050565b8082038281111561139457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b6000808411614bf5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806153d4602c913960400191505060405180910390fd5b600083118015614c055750600082115b614c5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061544b6028913960400191505060405180910390fd5b6000614c7e6103e8614c72868863ffffffff6151f316565b9063ffffffff6151f316565b90506000614c986103e5614c72868963ffffffff614b2916565b9050614cb56001828481614ca857fe5b049063ffffffff61527916565b9695505050505050565b6000808411614d19576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806154736025913960400191505060405180910390fd5b600083118015614d295750600082115b614d7e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061544b6028913960400191505060405180910390fd5b82614d8f858463ffffffff6151f316565b81614d9657fe5b04949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415614e27576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806154006025913960400191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610614e61578284614e64565b83835b909250905073ffffffffffffffffffffffffffffffffffffffff8216614eeb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b604080517fe6a4390500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015287811660248301529151600092839283927f00000000000000000000000000000000000000000000000000000000000000009092169163e6a4390591604480820192602092909190829003018186803b158015614f9257600080fd5b505afa158015614fa6573d6000803e3d6000fd5b505050506040513d6020811015614fbc57600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1614156150a257604080517fc9c6539600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152898116602483015291517f00000000000000000000000000000000000000000000000000000000000000009092169163c9c65396916044808201926020929091908290030181600087803b15801561507557600080fd5b505af1158015615089573d6000803e3d6000fd5b505050506040513d602081101561509f57600080fd5b50505b6000806150d07f00000000000000000000000000000000000000000000000000000000000000008b8b6152eb565b915091508160001480156150e2575080155b156150f2578793508692506151e6565b60006150ff898484614cbf565b905087811161516c5785811015615161576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806154256026913960400191505060405180910390fd5b8894509250826151e4565b6000615179898486614cbf565b90508981111561518557fe5b878110156151de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806154bf6026913960400191505060405180910390fd5b94508793505b505b5050965096945050505050565b600081158061520e5750508082028282828161520b57fe5b04145b61139457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b8082018281101561139457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b60008060006152fa8585614d9f565b50905060008061530b8888886140c6565b73ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561535057600080fd5b505afa158015615364573d6000803e3d6000fd5b505050506040513d606081101561537a57600080fd5b5080516020909101516dffffffffffffffffffffffffffff918216935016905073ffffffffffffffffffffffffffffffffffffffff878116908416146153c15780826153c4565b81815b9099909850965050505050505056fe556e697377617056324c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553556e69737761705632526f757465723a20494e53554646494349454e545f425f414d4f554e54556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459556e697377617056324c6962726172793a20494e53554646494349454e545f414d4f554e54556e69737761705632526f757465723a204558434553534956455f494e5055545f414d4f554e54556e69737761705632526f757465723a20494e53554646494349454e545f415f414d4f554e545472616e7366657248656c7065723a204554485f5452414e534645525f4641494c4544556e69737761705632526f757465723a20494e53554646494349454e545f4f55545055545f414d4f554e545472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54a2646970667358221220d767e6d3ae379997e75048713bb6ac2dcd987d96aa9e28fe4d4f219ea31a4f8864736f6c63430006060033", +} + +// UniswapV2Router02ABI is the input ABI used to generate the binding from. +// Deprecated: Use UniswapV2Router02MetaData.ABI instead. +var UniswapV2Router02ABI = UniswapV2Router02MetaData.ABI + +// UniswapV2Router02Bin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use UniswapV2Router02MetaData.Bin instead. +var UniswapV2Router02Bin = UniswapV2Router02MetaData.Bin + +// DeployUniswapV2Router02 deploys a new Ethereum contract, binding an instance of UniswapV2Router02 to it. +func DeployUniswapV2Router02(auth *bind.TransactOpts, backend bind.ContractBackend, _factory common.Address, _WETH common.Address) (common.Address, *types.Transaction, *UniswapV2Router02, error) { + parsed, err := UniswapV2Router02MetaData.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(UniswapV2Router02Bin), backend, _factory, _WETH) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &UniswapV2Router02{UniswapV2Router02Caller: UniswapV2Router02Caller{contract: contract}, UniswapV2Router02Transactor: UniswapV2Router02Transactor{contract: contract}, UniswapV2Router02Filterer: UniswapV2Router02Filterer{contract: contract}}, nil +} + +// UniswapV2Router02 is an auto generated Go binding around an Ethereum contract. +type UniswapV2Router02 struct { + UniswapV2Router02Caller // Read-only binding to the contract + UniswapV2Router02Transactor // Write-only binding to the contract + UniswapV2Router02Filterer // Log filterer for contract events +} + +// UniswapV2Router02Caller is an auto generated read-only Go binding around an Ethereum contract. +type UniswapV2Router02Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2Router02Transactor is an auto generated write-only Go binding around an Ethereum contract. +type UniswapV2Router02Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2Router02Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UniswapV2Router02Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapV2Router02Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UniswapV2Router02Session struct { + Contract *UniswapV2Router02 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UniswapV2Router02CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UniswapV2Router02CallerSession struct { + Contract *UniswapV2Router02Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UniswapV2Router02TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UniswapV2Router02TransactorSession struct { + Contract *UniswapV2Router02Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UniswapV2Router02Raw is an auto generated low-level Go binding around an Ethereum contract. +type UniswapV2Router02Raw struct { + Contract *UniswapV2Router02 // Generic contract binding to access the raw methods on +} + +// UniswapV2Router02CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UniswapV2Router02CallerRaw struct { + Contract *UniswapV2Router02Caller // Generic read-only contract binding to access the raw methods on +} + +// UniswapV2Router02TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UniswapV2Router02TransactorRaw struct { + Contract *UniswapV2Router02Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewUniswapV2Router02 creates a new instance of UniswapV2Router02, bound to a specific deployed contract. +func NewUniswapV2Router02(address common.Address, backend bind.ContractBackend) (*UniswapV2Router02, error) { + contract, err := bindUniswapV2Router02(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UniswapV2Router02{UniswapV2Router02Caller: UniswapV2Router02Caller{contract: contract}, UniswapV2Router02Transactor: UniswapV2Router02Transactor{contract: contract}, UniswapV2Router02Filterer: UniswapV2Router02Filterer{contract: contract}}, nil +} + +// NewUniswapV2Router02Caller creates a new read-only instance of UniswapV2Router02, bound to a specific deployed contract. +func NewUniswapV2Router02Caller(address common.Address, caller bind.ContractCaller) (*UniswapV2Router02Caller, error) { + contract, err := bindUniswapV2Router02(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UniswapV2Router02Caller{contract: contract}, nil +} + +// NewUniswapV2Router02Transactor creates a new write-only instance of UniswapV2Router02, bound to a specific deployed contract. +func NewUniswapV2Router02Transactor(address common.Address, transactor bind.ContractTransactor) (*UniswapV2Router02Transactor, error) { + contract, err := bindUniswapV2Router02(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UniswapV2Router02Transactor{contract: contract}, nil +} + +// NewUniswapV2Router02Filterer creates a new log filterer instance of UniswapV2Router02, bound to a specific deployed contract. +func NewUniswapV2Router02Filterer(address common.Address, filterer bind.ContractFilterer) (*UniswapV2Router02Filterer, error) { + contract, err := bindUniswapV2Router02(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UniswapV2Router02Filterer{contract: contract}, nil +} + +// bindUniswapV2Router02 binds a generic wrapper to an already deployed contract. +func bindUniswapV2Router02(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := UniswapV2Router02MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UniswapV2Router02 *UniswapV2Router02Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2Router02.Contract.UniswapV2Router02Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UniswapV2Router02 *UniswapV2Router02Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.UniswapV2Router02Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapV2Router02 *UniswapV2Router02Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.UniswapV2Router02Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UniswapV2Router02 *UniswapV2Router02CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapV2Router02.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UniswapV2Router02 *UniswapV2Router02TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapV2Router02 *UniswapV2Router02TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.contract.Transact(opts, method, params...) +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() view returns(address) +func (_UniswapV2Router02 *UniswapV2Router02Caller) WETH(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _UniswapV2Router02.contract.Call(opts, &out, "WETH") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() view returns(address) +func (_UniswapV2Router02 *UniswapV2Router02Session) WETH() (common.Address, error) { + return _UniswapV2Router02.Contract.WETH(&_UniswapV2Router02.CallOpts) +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() view returns(address) +func (_UniswapV2Router02 *UniswapV2Router02CallerSession) WETH() (common.Address, error) { + return _UniswapV2Router02.Contract.WETH(&_UniswapV2Router02.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_UniswapV2Router02 *UniswapV2Router02Caller) Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _UniswapV2Router02.contract.Call(opts, &out, "factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_UniswapV2Router02 *UniswapV2Router02Session) Factory() (common.Address, error) { + return _UniswapV2Router02.Contract.Factory(&_UniswapV2Router02.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_UniswapV2Router02 *UniswapV2Router02CallerSession) Factory() (common.Address, error) { + return _UniswapV2Router02.Contract.Factory(&_UniswapV2Router02.CallOpts) +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_UniswapV2Router02 *UniswapV2Router02Caller) GetAmountIn(opts *bind.CallOpts, amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Router02.contract.Call(opts, &out, "getAmountIn", amountOut, reserveIn, reserveOut) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_UniswapV2Router02 *UniswapV2Router02Session) GetAmountIn(amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _UniswapV2Router02.Contract.GetAmountIn(&_UniswapV2Router02.CallOpts, amountOut, reserveIn, reserveOut) +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_UniswapV2Router02 *UniswapV2Router02CallerSession) GetAmountIn(amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _UniswapV2Router02.Contract.GetAmountIn(&_UniswapV2Router02.CallOpts, amountOut, reserveIn, reserveOut) +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_UniswapV2Router02 *UniswapV2Router02Caller) GetAmountOut(opts *bind.CallOpts, amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Router02.contract.Call(opts, &out, "getAmountOut", amountIn, reserveIn, reserveOut) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_UniswapV2Router02 *UniswapV2Router02Session) GetAmountOut(amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _UniswapV2Router02.Contract.GetAmountOut(&_UniswapV2Router02.CallOpts, amountIn, reserveIn, reserveOut) +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_UniswapV2Router02 *UniswapV2Router02CallerSession) GetAmountOut(amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _UniswapV2Router02.Contract.GetAmountOut(&_UniswapV2Router02.CallOpts, amountIn, reserveIn, reserveOut) +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Caller) GetAmountsIn(opts *bind.CallOpts, amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + var out []interface{} + err := _UniswapV2Router02.contract.Call(opts, &out, "getAmountsIn", amountOut, path) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Session) GetAmountsIn(amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + return _UniswapV2Router02.Contract.GetAmountsIn(&_UniswapV2Router02.CallOpts, amountOut, path) +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02CallerSession) GetAmountsIn(amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + return _UniswapV2Router02.Contract.GetAmountsIn(&_UniswapV2Router02.CallOpts, amountOut, path) +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Caller) GetAmountsOut(opts *bind.CallOpts, amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + var out []interface{} + err := _UniswapV2Router02.contract.Call(opts, &out, "getAmountsOut", amountIn, path) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Session) GetAmountsOut(amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + return _UniswapV2Router02.Contract.GetAmountsOut(&_UniswapV2Router02.CallOpts, amountIn, path) +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02CallerSession) GetAmountsOut(amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + return _UniswapV2Router02.Contract.GetAmountsOut(&_UniswapV2Router02.CallOpts, amountIn, path) +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_UniswapV2Router02 *UniswapV2Router02Caller) Quote(opts *bind.CallOpts, amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + var out []interface{} + err := _UniswapV2Router02.contract.Call(opts, &out, "quote", amountA, reserveA, reserveB) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_UniswapV2Router02 *UniswapV2Router02Session) Quote(amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + return _UniswapV2Router02.Contract.Quote(&_UniswapV2Router02.CallOpts, amountA, reserveA, reserveB) +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_UniswapV2Router02 *UniswapV2Router02CallerSession) Quote(amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + return _UniswapV2Router02.Contract.Quote(&_UniswapV2Router02.CallOpts, amountA, reserveA, reserveB) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) AddLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "addLiquidity", tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_UniswapV2Router02 *UniswapV2Router02Session) AddLiquidity(tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.AddLiquidity(&_UniswapV2Router02.TransactOpts, tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) AddLiquidity(tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.AddLiquidity(&_UniswapV2Router02.TransactOpts, tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) AddLiquidityETH(opts *bind.TransactOpts, token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "addLiquidityETH", token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_UniswapV2Router02 *UniswapV2Router02Session) AddLiquidityETH(token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.AddLiquidityETH(&_UniswapV2Router02.TransactOpts, token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) AddLiquidityETH(token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.AddLiquidityETH(&_UniswapV2Router02.TransactOpts, token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) RemoveLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "removeLiquidity", tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_UniswapV2Router02 *UniswapV2Router02Session) RemoveLiquidity(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidity(&_UniswapV2Router02.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) RemoveLiquidity(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidity(&_UniswapV2Router02.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) RemoveLiquidityETH(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "removeLiquidityETH", token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02Session) RemoveLiquidityETH(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidityETH(&_UniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) RemoveLiquidityETH(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidityETH(&_UniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) RemoveLiquidityETHSupportingFeeOnTransferTokens(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "removeLiquidityETHSupportingFeeOnTransferTokens", token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02Session) RemoveLiquidityETHSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidityETHSupportingFeeOnTransferTokens(&_UniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) RemoveLiquidityETHSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidityETHSupportingFeeOnTransferTokens(&_UniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) RemoveLiquidityETHWithPermit(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "removeLiquidityETHWithPermit", token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02Session) RemoveLiquidityETHWithPermit(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidityETHWithPermit(&_UniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) RemoveLiquidityETHWithPermit(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidityETHWithPermit(&_UniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02Session) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(&_UniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(&_UniswapV2Router02.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) RemoveLiquidityWithPermit(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "removeLiquidityWithPermit", tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_UniswapV2Router02 *UniswapV2Router02Session) RemoveLiquidityWithPermit(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidityWithPermit(&_UniswapV2Router02.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) RemoveLiquidityWithPermit(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.RemoveLiquidityWithPermit(&_UniswapV2Router02.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) SwapETHForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "swapETHForExactTokens", amountOut, path, to, deadline) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Session) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapETHForExactTokens(&_UniswapV2Router02.TransactOpts, amountOut, path, to, deadline) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapETHForExactTokens(&_UniswapV2Router02.TransactOpts, amountOut, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) SwapExactETHForTokens(opts *bind.TransactOpts, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "swapExactETHForTokens", amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Session) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactETHForTokens(&_UniswapV2Router02.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactETHForTokens(&_UniswapV2Router02.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_UniswapV2Router02 *UniswapV2Router02Transactor) SwapExactETHForTokensSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "swapExactETHForTokensSupportingFeeOnTransferTokens", amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_UniswapV2Router02 *UniswapV2Router02Session) SwapExactETHForTokensSupportingFeeOnTransferTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactETHForTokensSupportingFeeOnTransferTokens(&_UniswapV2Router02.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) SwapExactETHForTokensSupportingFeeOnTransferTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactETHForTokensSupportingFeeOnTransferTokens(&_UniswapV2Router02.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) SwapExactTokensForETH(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "swapExactTokensForETH", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Session) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactTokensForETH(&_UniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactTokensForETH(&_UniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_UniswapV2Router02 *UniswapV2Router02Transactor) SwapExactTokensForETHSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "swapExactTokensForETHSupportingFeeOnTransferTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_UniswapV2Router02 *UniswapV2Router02Session) SwapExactTokensForETHSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactTokensForETHSupportingFeeOnTransferTokens(&_UniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) SwapExactTokensForETHSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactTokensForETHSupportingFeeOnTransferTokens(&_UniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) SwapExactTokensForTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "swapExactTokensForTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Session) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactTokensForTokens(&_UniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactTokensForTokens(&_UniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_UniswapV2Router02 *UniswapV2Router02Transactor) SwapExactTokensForTokensSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "swapExactTokensForTokensSupportingFeeOnTransferTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_UniswapV2Router02 *UniswapV2Router02Session) SwapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactTokensForTokensSupportingFeeOnTransferTokens(&_UniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) SwapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapExactTokensForTokensSupportingFeeOnTransferTokens(&_UniswapV2Router02.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) SwapTokensForExactETH(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "swapTokensForExactETH", amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Session) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapTokensForExactETH(&_UniswapV2Router02.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapTokensForExactETH(&_UniswapV2Router02.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Transactor) SwapTokensForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.contract.Transact(opts, "swapTokensForExactTokens", amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02Session) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapTokensForExactTokens(&_UniswapV2Router02.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _UniswapV2Router02.Contract.SwapTokensForExactTokens(&_UniswapV2Router02.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_UniswapV2Router02 *UniswapV2Router02Transactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapV2Router02.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_UniswapV2Router02 *UniswapV2Router02Session) Receive() (*types.Transaction, error) { + return _UniswapV2Router02.Contract.Receive(&_UniswapV2Router02.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_UniswapV2Router02 *UniswapV2Router02TransactorSession) Receive() (*types.Transaction, error) { + return _UniswapV2Router02.Contract.Receive(&_UniswapV2Router02.TransactOpts) +} diff --git a/pkg/contracts/uniswap/v3-core/contracts/interfaces/callback/iuniswapv3swapcallback.sol/iuniswapv3swapcallback.go b/pkg/contracts/uniswap/v3-core/contracts/interfaces/callback/iuniswapv3swapcallback.sol/iuniswapv3swapcallback.go new file mode 100644 index 0000000000..cefe43474a --- /dev/null +++ b/pkg/contracts/uniswap/v3-core/contracts/interfaces/callback/iuniswapv3swapcallback.sol/iuniswapv3swapcallback.go @@ -0,0 +1,202 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv3swapcallback + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV3SwapCallbackMetaData contains all meta data concerning the IUniswapV3SwapCallback contract. +var IUniswapV3SwapCallbackMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"amount0Delta\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"amount1Delta\",\"type\":\"int256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV3SwapCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IUniswapV3SwapCallbackABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV3SwapCallbackMetaData.ABI instead. +var IUniswapV3SwapCallbackABI = IUniswapV3SwapCallbackMetaData.ABI + +// IUniswapV3SwapCallback is an auto generated Go binding around an Ethereum contract. +type IUniswapV3SwapCallback struct { + IUniswapV3SwapCallbackCaller // Read-only binding to the contract + IUniswapV3SwapCallbackTransactor // Write-only binding to the contract + IUniswapV3SwapCallbackFilterer // Log filterer for contract events +} + +// IUniswapV3SwapCallbackCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV3SwapCallbackCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3SwapCallbackTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV3SwapCallbackTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3SwapCallbackFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV3SwapCallbackFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3SwapCallbackSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV3SwapCallbackSession struct { + Contract *IUniswapV3SwapCallback // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3SwapCallbackCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV3SwapCallbackCallerSession struct { + Contract *IUniswapV3SwapCallbackCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV3SwapCallbackTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV3SwapCallbackTransactorSession struct { + Contract *IUniswapV3SwapCallbackTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3SwapCallbackRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV3SwapCallbackRaw struct { + Contract *IUniswapV3SwapCallback // Generic contract binding to access the raw methods on +} + +// IUniswapV3SwapCallbackCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV3SwapCallbackCallerRaw struct { + Contract *IUniswapV3SwapCallbackCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV3SwapCallbackTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV3SwapCallbackTransactorRaw struct { + Contract *IUniswapV3SwapCallbackTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV3SwapCallback creates a new instance of IUniswapV3SwapCallback, bound to a specific deployed contract. +func NewIUniswapV3SwapCallback(address common.Address, backend bind.ContractBackend) (*IUniswapV3SwapCallback, error) { + contract, err := bindIUniswapV3SwapCallback(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV3SwapCallback{IUniswapV3SwapCallbackCaller: IUniswapV3SwapCallbackCaller{contract: contract}, IUniswapV3SwapCallbackTransactor: IUniswapV3SwapCallbackTransactor{contract: contract}, IUniswapV3SwapCallbackFilterer: IUniswapV3SwapCallbackFilterer{contract: contract}}, nil +} + +// NewIUniswapV3SwapCallbackCaller creates a new read-only instance of IUniswapV3SwapCallback, bound to a specific deployed contract. +func NewIUniswapV3SwapCallbackCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV3SwapCallbackCaller, error) { + contract, err := bindIUniswapV3SwapCallback(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV3SwapCallbackCaller{contract: contract}, nil +} + +// NewIUniswapV3SwapCallbackTransactor creates a new write-only instance of IUniswapV3SwapCallback, bound to a specific deployed contract. +func NewIUniswapV3SwapCallbackTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV3SwapCallbackTransactor, error) { + contract, err := bindIUniswapV3SwapCallback(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV3SwapCallbackTransactor{contract: contract}, nil +} + +// NewIUniswapV3SwapCallbackFilterer creates a new log filterer instance of IUniswapV3SwapCallback, bound to a specific deployed contract. +func NewIUniswapV3SwapCallbackFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV3SwapCallbackFilterer, error) { + contract, err := bindIUniswapV3SwapCallback(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV3SwapCallbackFilterer{contract: contract}, nil +} + +// bindIUniswapV3SwapCallback binds a generic wrapper to an already deployed contract. +func bindIUniswapV3SwapCallback(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV3SwapCallbackMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3SwapCallback *IUniswapV3SwapCallbackRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3SwapCallback.Contract.IUniswapV3SwapCallbackCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3SwapCallback *IUniswapV3SwapCallbackRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3SwapCallback.Contract.IUniswapV3SwapCallbackTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3SwapCallback *IUniswapV3SwapCallbackRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3SwapCallback.Contract.IUniswapV3SwapCallbackTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3SwapCallback *IUniswapV3SwapCallbackCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3SwapCallback.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3SwapCallback *IUniswapV3SwapCallbackTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3SwapCallback.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3SwapCallback *IUniswapV3SwapCallbackTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3SwapCallback.Contract.contract.Transact(opts, method, params...) +} + +// UniswapV3SwapCallback is a paid mutator transaction binding the contract method 0xfa461e33. +// +// Solidity: function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes data) returns() +func (_IUniswapV3SwapCallback *IUniswapV3SwapCallbackTransactor) UniswapV3SwapCallback(opts *bind.TransactOpts, amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3SwapCallback.contract.Transact(opts, "uniswapV3SwapCallback", amount0Delta, amount1Delta, data) +} + +// UniswapV3SwapCallback is a paid mutator transaction binding the contract method 0xfa461e33. +// +// Solidity: function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes data) returns() +func (_IUniswapV3SwapCallback *IUniswapV3SwapCallbackSession) UniswapV3SwapCallback(amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3SwapCallback.Contract.UniswapV3SwapCallback(&_IUniswapV3SwapCallback.TransactOpts, amount0Delta, amount1Delta, data) +} + +// UniswapV3SwapCallback is a paid mutator transaction binding the contract method 0xfa461e33. +// +// Solidity: function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes data) returns() +func (_IUniswapV3SwapCallback *IUniswapV3SwapCallbackTransactorSession) UniswapV3SwapCallback(amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3SwapCallback.Contract.UniswapV3SwapCallback(&_IUniswapV3SwapCallback.TransactOpts, amount0Delta, amount1Delta, data) +} diff --git a/pkg/contracts/uniswap/v3-core/contracts/interfaces/iuniswapv3factory.sol/iuniswapv3factory.go b/pkg/contracts/uniswap/v3-core/contracts/interfaces/iuniswapv3factory.sol/iuniswapv3factory.go new file mode 100644 index 0000000000..048c69bd11 --- /dev/null +++ b/pkg/contracts/uniswap/v3-core/contracts/interfaces/iuniswapv3factory.sol/iuniswapv3factory.go @@ -0,0 +1,807 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv3factory + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV3FactoryMetaData contains all meta data concerning the IUniswapV3Factory contract. +var IUniswapV3FactoryMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"}],\"name\":\"FeeAmountEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"PoolCreated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"}],\"name\":\"createPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"tickSpacing\",\"type\":\"int24\"}],\"name\":\"enableFeeAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"}],\"name\":\"feeAmountTickSpacing\",\"outputs\":[{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IUniswapV3FactoryABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV3FactoryMetaData.ABI instead. +var IUniswapV3FactoryABI = IUniswapV3FactoryMetaData.ABI + +// IUniswapV3Factory is an auto generated Go binding around an Ethereum contract. +type IUniswapV3Factory struct { + IUniswapV3FactoryCaller // Read-only binding to the contract + IUniswapV3FactoryTransactor // Write-only binding to the contract + IUniswapV3FactoryFilterer // Log filterer for contract events +} + +// IUniswapV3FactoryCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV3FactoryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3FactoryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV3FactoryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3FactoryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV3FactoryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3FactorySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV3FactorySession struct { + Contract *IUniswapV3Factory // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3FactoryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV3FactoryCallerSession struct { + Contract *IUniswapV3FactoryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV3FactoryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV3FactoryTransactorSession struct { + Contract *IUniswapV3FactoryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3FactoryRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV3FactoryRaw struct { + Contract *IUniswapV3Factory // Generic contract binding to access the raw methods on +} + +// IUniswapV3FactoryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV3FactoryCallerRaw struct { + Contract *IUniswapV3FactoryCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV3FactoryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV3FactoryTransactorRaw struct { + Contract *IUniswapV3FactoryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV3Factory creates a new instance of IUniswapV3Factory, bound to a specific deployed contract. +func NewIUniswapV3Factory(address common.Address, backend bind.ContractBackend) (*IUniswapV3Factory, error) { + contract, err := bindIUniswapV3Factory(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV3Factory{IUniswapV3FactoryCaller: IUniswapV3FactoryCaller{contract: contract}, IUniswapV3FactoryTransactor: IUniswapV3FactoryTransactor{contract: contract}, IUniswapV3FactoryFilterer: IUniswapV3FactoryFilterer{contract: contract}}, nil +} + +// NewIUniswapV3FactoryCaller creates a new read-only instance of IUniswapV3Factory, bound to a specific deployed contract. +func NewIUniswapV3FactoryCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV3FactoryCaller, error) { + contract, err := bindIUniswapV3Factory(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV3FactoryCaller{contract: contract}, nil +} + +// NewIUniswapV3FactoryTransactor creates a new write-only instance of IUniswapV3Factory, bound to a specific deployed contract. +func NewIUniswapV3FactoryTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV3FactoryTransactor, error) { + contract, err := bindIUniswapV3Factory(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV3FactoryTransactor{contract: contract}, nil +} + +// NewIUniswapV3FactoryFilterer creates a new log filterer instance of IUniswapV3Factory, bound to a specific deployed contract. +func NewIUniswapV3FactoryFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV3FactoryFilterer, error) { + contract, err := bindIUniswapV3Factory(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV3FactoryFilterer{contract: contract}, nil +} + +// bindIUniswapV3Factory binds a generic wrapper to an already deployed contract. +func bindIUniswapV3Factory(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV3FactoryMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3Factory *IUniswapV3FactoryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3Factory.Contract.IUniswapV3FactoryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3Factory *IUniswapV3FactoryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3Factory.Contract.IUniswapV3FactoryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3Factory *IUniswapV3FactoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3Factory.Contract.IUniswapV3FactoryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3Factory *IUniswapV3FactoryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3Factory.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3Factory *IUniswapV3FactoryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3Factory.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3Factory *IUniswapV3FactoryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3Factory.Contract.contract.Transact(opts, method, params...) +} + +// FeeAmountTickSpacing is a free data retrieval call binding the contract method 0x22afcccb. +// +// Solidity: function feeAmountTickSpacing(uint24 fee) view returns(int24) +func (_IUniswapV3Factory *IUniswapV3FactoryCaller) FeeAmountTickSpacing(opts *bind.CallOpts, fee *big.Int) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3Factory.contract.Call(opts, &out, "feeAmountTickSpacing", fee) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FeeAmountTickSpacing is a free data retrieval call binding the contract method 0x22afcccb. +// +// Solidity: function feeAmountTickSpacing(uint24 fee) view returns(int24) +func (_IUniswapV3Factory *IUniswapV3FactorySession) FeeAmountTickSpacing(fee *big.Int) (*big.Int, error) { + return _IUniswapV3Factory.Contract.FeeAmountTickSpacing(&_IUniswapV3Factory.CallOpts, fee) +} + +// FeeAmountTickSpacing is a free data retrieval call binding the contract method 0x22afcccb. +// +// Solidity: function feeAmountTickSpacing(uint24 fee) view returns(int24) +func (_IUniswapV3Factory *IUniswapV3FactoryCallerSession) FeeAmountTickSpacing(fee *big.Int) (*big.Int, error) { + return _IUniswapV3Factory.Contract.FeeAmountTickSpacing(&_IUniswapV3Factory.CallOpts, fee) +} + +// GetPool is a free data retrieval call binding the contract method 0x1698ee82. +// +// Solidity: function getPool(address tokenA, address tokenB, uint24 fee) view returns(address pool) +func (_IUniswapV3Factory *IUniswapV3FactoryCaller) GetPool(opts *bind.CallOpts, tokenA common.Address, tokenB common.Address, fee *big.Int) (common.Address, error) { + var out []interface{} + err := _IUniswapV3Factory.contract.Call(opts, &out, "getPool", tokenA, tokenB, fee) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetPool is a free data retrieval call binding the contract method 0x1698ee82. +// +// Solidity: function getPool(address tokenA, address tokenB, uint24 fee) view returns(address pool) +func (_IUniswapV3Factory *IUniswapV3FactorySession) GetPool(tokenA common.Address, tokenB common.Address, fee *big.Int) (common.Address, error) { + return _IUniswapV3Factory.Contract.GetPool(&_IUniswapV3Factory.CallOpts, tokenA, tokenB, fee) +} + +// GetPool is a free data retrieval call binding the contract method 0x1698ee82. +// +// Solidity: function getPool(address tokenA, address tokenB, uint24 fee) view returns(address pool) +func (_IUniswapV3Factory *IUniswapV3FactoryCallerSession) GetPool(tokenA common.Address, tokenB common.Address, fee *big.Int) (common.Address, error) { + return _IUniswapV3Factory.Contract.GetPool(&_IUniswapV3Factory.CallOpts, tokenA, tokenB, fee) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_IUniswapV3Factory *IUniswapV3FactoryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV3Factory.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_IUniswapV3Factory *IUniswapV3FactorySession) Owner() (common.Address, error) { + return _IUniswapV3Factory.Contract.Owner(&_IUniswapV3Factory.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_IUniswapV3Factory *IUniswapV3FactoryCallerSession) Owner() (common.Address, error) { + return _IUniswapV3Factory.Contract.Owner(&_IUniswapV3Factory.CallOpts) +} + +// CreatePool is a paid mutator transaction binding the contract method 0xa1671295. +// +// Solidity: function createPool(address tokenA, address tokenB, uint24 fee) returns(address pool) +func (_IUniswapV3Factory *IUniswapV3FactoryTransactor) CreatePool(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, fee *big.Int) (*types.Transaction, error) { + return _IUniswapV3Factory.contract.Transact(opts, "createPool", tokenA, tokenB, fee) +} + +// CreatePool is a paid mutator transaction binding the contract method 0xa1671295. +// +// Solidity: function createPool(address tokenA, address tokenB, uint24 fee) returns(address pool) +func (_IUniswapV3Factory *IUniswapV3FactorySession) CreatePool(tokenA common.Address, tokenB common.Address, fee *big.Int) (*types.Transaction, error) { + return _IUniswapV3Factory.Contract.CreatePool(&_IUniswapV3Factory.TransactOpts, tokenA, tokenB, fee) +} + +// CreatePool is a paid mutator transaction binding the contract method 0xa1671295. +// +// Solidity: function createPool(address tokenA, address tokenB, uint24 fee) returns(address pool) +func (_IUniswapV3Factory *IUniswapV3FactoryTransactorSession) CreatePool(tokenA common.Address, tokenB common.Address, fee *big.Int) (*types.Transaction, error) { + return _IUniswapV3Factory.Contract.CreatePool(&_IUniswapV3Factory.TransactOpts, tokenA, tokenB, fee) +} + +// EnableFeeAmount is a paid mutator transaction binding the contract method 0x8a7c195f. +// +// Solidity: function enableFeeAmount(uint24 fee, int24 tickSpacing) returns() +func (_IUniswapV3Factory *IUniswapV3FactoryTransactor) EnableFeeAmount(opts *bind.TransactOpts, fee *big.Int, tickSpacing *big.Int) (*types.Transaction, error) { + return _IUniswapV3Factory.contract.Transact(opts, "enableFeeAmount", fee, tickSpacing) +} + +// EnableFeeAmount is a paid mutator transaction binding the contract method 0x8a7c195f. +// +// Solidity: function enableFeeAmount(uint24 fee, int24 tickSpacing) returns() +func (_IUniswapV3Factory *IUniswapV3FactorySession) EnableFeeAmount(fee *big.Int, tickSpacing *big.Int) (*types.Transaction, error) { + return _IUniswapV3Factory.Contract.EnableFeeAmount(&_IUniswapV3Factory.TransactOpts, fee, tickSpacing) +} + +// EnableFeeAmount is a paid mutator transaction binding the contract method 0x8a7c195f. +// +// Solidity: function enableFeeAmount(uint24 fee, int24 tickSpacing) returns() +func (_IUniswapV3Factory *IUniswapV3FactoryTransactorSession) EnableFeeAmount(fee *big.Int, tickSpacing *big.Int) (*types.Transaction, error) { + return _IUniswapV3Factory.Contract.EnableFeeAmount(&_IUniswapV3Factory.TransactOpts, fee, tickSpacing) +} + +// SetOwner is a paid mutator transaction binding the contract method 0x13af4035. +// +// Solidity: function setOwner(address _owner) returns() +func (_IUniswapV3Factory *IUniswapV3FactoryTransactor) SetOwner(opts *bind.TransactOpts, _owner common.Address) (*types.Transaction, error) { + return _IUniswapV3Factory.contract.Transact(opts, "setOwner", _owner) +} + +// SetOwner is a paid mutator transaction binding the contract method 0x13af4035. +// +// Solidity: function setOwner(address _owner) returns() +func (_IUniswapV3Factory *IUniswapV3FactorySession) SetOwner(_owner common.Address) (*types.Transaction, error) { + return _IUniswapV3Factory.Contract.SetOwner(&_IUniswapV3Factory.TransactOpts, _owner) +} + +// SetOwner is a paid mutator transaction binding the contract method 0x13af4035. +// +// Solidity: function setOwner(address _owner) returns() +func (_IUniswapV3Factory *IUniswapV3FactoryTransactorSession) SetOwner(_owner common.Address) (*types.Transaction, error) { + return _IUniswapV3Factory.Contract.SetOwner(&_IUniswapV3Factory.TransactOpts, _owner) +} + +// IUniswapV3FactoryFeeAmountEnabledIterator is returned from FilterFeeAmountEnabled and is used to iterate over the raw logs and unpacked data for FeeAmountEnabled events raised by the IUniswapV3Factory contract. +type IUniswapV3FactoryFeeAmountEnabledIterator struct { + Event *IUniswapV3FactoryFeeAmountEnabled // 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 *IUniswapV3FactoryFeeAmountEnabledIterator) 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(IUniswapV3FactoryFeeAmountEnabled) + 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(IUniswapV3FactoryFeeAmountEnabled) + 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 *IUniswapV3FactoryFeeAmountEnabledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3FactoryFeeAmountEnabledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3FactoryFeeAmountEnabled represents a FeeAmountEnabled event raised by the IUniswapV3Factory contract. +type IUniswapV3FactoryFeeAmountEnabled struct { + Fee *big.Int + TickSpacing *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeAmountEnabled is a free log retrieval operation binding the contract event 0xc66a3fdf07232cdd185febcc6579d408c241b47ae2f9907d84be655141eeaecc. +// +// Solidity: event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing) +func (_IUniswapV3Factory *IUniswapV3FactoryFilterer) FilterFeeAmountEnabled(opts *bind.FilterOpts, fee []*big.Int, tickSpacing []*big.Int) (*IUniswapV3FactoryFeeAmountEnabledIterator, error) { + + var feeRule []interface{} + for _, feeItem := range fee { + feeRule = append(feeRule, feeItem) + } + var tickSpacingRule []interface{} + for _, tickSpacingItem := range tickSpacing { + tickSpacingRule = append(tickSpacingRule, tickSpacingItem) + } + + logs, sub, err := _IUniswapV3Factory.contract.FilterLogs(opts, "FeeAmountEnabled", feeRule, tickSpacingRule) + if err != nil { + return nil, err + } + return &IUniswapV3FactoryFeeAmountEnabledIterator{contract: _IUniswapV3Factory.contract, event: "FeeAmountEnabled", logs: logs, sub: sub}, nil +} + +// WatchFeeAmountEnabled is a free log subscription operation binding the contract event 0xc66a3fdf07232cdd185febcc6579d408c241b47ae2f9907d84be655141eeaecc. +// +// Solidity: event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing) +func (_IUniswapV3Factory *IUniswapV3FactoryFilterer) WatchFeeAmountEnabled(opts *bind.WatchOpts, sink chan<- *IUniswapV3FactoryFeeAmountEnabled, fee []*big.Int, tickSpacing []*big.Int) (event.Subscription, error) { + + var feeRule []interface{} + for _, feeItem := range fee { + feeRule = append(feeRule, feeItem) + } + var tickSpacingRule []interface{} + for _, tickSpacingItem := range tickSpacing { + tickSpacingRule = append(tickSpacingRule, tickSpacingItem) + } + + logs, sub, err := _IUniswapV3Factory.contract.WatchLogs(opts, "FeeAmountEnabled", feeRule, tickSpacingRule) + 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(IUniswapV3FactoryFeeAmountEnabled) + if err := _IUniswapV3Factory.contract.UnpackLog(event, "FeeAmountEnabled", 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 +} + +// ParseFeeAmountEnabled is a log parse operation binding the contract event 0xc66a3fdf07232cdd185febcc6579d408c241b47ae2f9907d84be655141eeaecc. +// +// Solidity: event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing) +func (_IUniswapV3Factory *IUniswapV3FactoryFilterer) ParseFeeAmountEnabled(log types.Log) (*IUniswapV3FactoryFeeAmountEnabled, error) { + event := new(IUniswapV3FactoryFeeAmountEnabled) + if err := _IUniswapV3Factory.contract.UnpackLog(event, "FeeAmountEnabled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3FactoryOwnerChangedIterator is returned from FilterOwnerChanged and is used to iterate over the raw logs and unpacked data for OwnerChanged events raised by the IUniswapV3Factory contract. +type IUniswapV3FactoryOwnerChangedIterator struct { + Event *IUniswapV3FactoryOwnerChanged // 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 *IUniswapV3FactoryOwnerChangedIterator) 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(IUniswapV3FactoryOwnerChanged) + 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(IUniswapV3FactoryOwnerChanged) + 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 *IUniswapV3FactoryOwnerChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3FactoryOwnerChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3FactoryOwnerChanged represents a OwnerChanged event raised by the IUniswapV3Factory contract. +type IUniswapV3FactoryOwnerChanged struct { + OldOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnerChanged is a free log retrieval operation binding the contract event 0xb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c. +// +// Solidity: event OwnerChanged(address indexed oldOwner, address indexed newOwner) +func (_IUniswapV3Factory *IUniswapV3FactoryFilterer) FilterOwnerChanged(opts *bind.FilterOpts, oldOwner []common.Address, newOwner []common.Address) (*IUniswapV3FactoryOwnerChangedIterator, error) { + + var oldOwnerRule []interface{} + for _, oldOwnerItem := range oldOwner { + oldOwnerRule = append(oldOwnerRule, oldOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _IUniswapV3Factory.contract.FilterLogs(opts, "OwnerChanged", oldOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &IUniswapV3FactoryOwnerChangedIterator{contract: _IUniswapV3Factory.contract, event: "OwnerChanged", logs: logs, sub: sub}, nil +} + +// WatchOwnerChanged is a free log subscription operation binding the contract event 0xb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c. +// +// Solidity: event OwnerChanged(address indexed oldOwner, address indexed newOwner) +func (_IUniswapV3Factory *IUniswapV3FactoryFilterer) WatchOwnerChanged(opts *bind.WatchOpts, sink chan<- *IUniswapV3FactoryOwnerChanged, oldOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var oldOwnerRule []interface{} + for _, oldOwnerItem := range oldOwner { + oldOwnerRule = append(oldOwnerRule, oldOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _IUniswapV3Factory.contract.WatchLogs(opts, "OwnerChanged", oldOwnerRule, newOwnerRule) + 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(IUniswapV3FactoryOwnerChanged) + if err := _IUniswapV3Factory.contract.UnpackLog(event, "OwnerChanged", 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 +} + +// ParseOwnerChanged is a log parse operation binding the contract event 0xb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c. +// +// Solidity: event OwnerChanged(address indexed oldOwner, address indexed newOwner) +func (_IUniswapV3Factory *IUniswapV3FactoryFilterer) ParseOwnerChanged(log types.Log) (*IUniswapV3FactoryOwnerChanged, error) { + event := new(IUniswapV3FactoryOwnerChanged) + if err := _IUniswapV3Factory.contract.UnpackLog(event, "OwnerChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3FactoryPoolCreatedIterator is returned from FilterPoolCreated and is used to iterate over the raw logs and unpacked data for PoolCreated events raised by the IUniswapV3Factory contract. +type IUniswapV3FactoryPoolCreatedIterator struct { + Event *IUniswapV3FactoryPoolCreated // 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 *IUniswapV3FactoryPoolCreatedIterator) 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(IUniswapV3FactoryPoolCreated) + 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(IUniswapV3FactoryPoolCreated) + 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 *IUniswapV3FactoryPoolCreatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3FactoryPoolCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3FactoryPoolCreated represents a PoolCreated event raised by the IUniswapV3Factory contract. +type IUniswapV3FactoryPoolCreated struct { + Token0 common.Address + Token1 common.Address + Fee *big.Int + TickSpacing *big.Int + Pool common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPoolCreated is a free log retrieval operation binding the contract event 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118. +// +// Solidity: event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool) +func (_IUniswapV3Factory *IUniswapV3FactoryFilterer) FilterPoolCreated(opts *bind.FilterOpts, token0 []common.Address, token1 []common.Address, fee []*big.Int) (*IUniswapV3FactoryPoolCreatedIterator, error) { + + var token0Rule []interface{} + for _, token0Item := range token0 { + token0Rule = append(token0Rule, token0Item) + } + var token1Rule []interface{} + for _, token1Item := range token1 { + token1Rule = append(token1Rule, token1Item) + } + var feeRule []interface{} + for _, feeItem := range fee { + feeRule = append(feeRule, feeItem) + } + + logs, sub, err := _IUniswapV3Factory.contract.FilterLogs(opts, "PoolCreated", token0Rule, token1Rule, feeRule) + if err != nil { + return nil, err + } + return &IUniswapV3FactoryPoolCreatedIterator{contract: _IUniswapV3Factory.contract, event: "PoolCreated", logs: logs, sub: sub}, nil +} + +// WatchPoolCreated is a free log subscription operation binding the contract event 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118. +// +// Solidity: event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool) +func (_IUniswapV3Factory *IUniswapV3FactoryFilterer) WatchPoolCreated(opts *bind.WatchOpts, sink chan<- *IUniswapV3FactoryPoolCreated, token0 []common.Address, token1 []common.Address, fee []*big.Int) (event.Subscription, error) { + + var token0Rule []interface{} + for _, token0Item := range token0 { + token0Rule = append(token0Rule, token0Item) + } + var token1Rule []interface{} + for _, token1Item := range token1 { + token1Rule = append(token1Rule, token1Item) + } + var feeRule []interface{} + for _, feeItem := range fee { + feeRule = append(feeRule, feeItem) + } + + logs, sub, err := _IUniswapV3Factory.contract.WatchLogs(opts, "PoolCreated", token0Rule, token1Rule, feeRule) + 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(IUniswapV3FactoryPoolCreated) + if err := _IUniswapV3Factory.contract.UnpackLog(event, "PoolCreated", 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 +} + +// ParsePoolCreated is a log parse operation binding the contract event 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118. +// +// Solidity: event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool) +func (_IUniswapV3Factory *IUniswapV3FactoryFilterer) ParsePoolCreated(log types.Log) (*IUniswapV3FactoryPoolCreated, error) { + event := new(IUniswapV3FactoryPoolCreated) + if err := _IUniswapV3Factory.contract.UnpackLog(event, "PoolCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/uniswap/v3-core/contracts/interfaces/iuniswapv3pool.sol/iuniswapv3pool.go b/pkg/contracts/uniswap/v3-core/contracts/interfaces/iuniswapv3pool.sol/iuniswapv3pool.go new file mode 100644 index 0000000000..9a6f17abfc --- /dev/null +++ b/pkg/contracts/uniswap/v3-core/contracts/interfaces/iuniswapv3pool.sol/iuniswapv3pool.go @@ -0,0 +1,2455 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv3pool + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV3PoolMetaData contains all meta data concerning the IUniswapV3Pool contract. +var IUniswapV3PoolMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"name\":\"Collect\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"name\":\"CollectProtocol\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"paid0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"paid1\",\"type\":\"uint256\"}],\"name\":\"Flash\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"observationCardinalityNextOld\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"observationCardinalityNextNew\",\"type\":\"uint16\"}],\"name\":\"IncreaseObservationCardinalityNext\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"},{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"}],\"name\":\"Initialize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol0Old\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol1Old\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol0New\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol1New\",\"type\":\"uint8\"}],\"name\":\"SetFeeProtocol\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"amount0\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"amount1\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"liquidity\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"uint128\",\"name\":\"amount0Requested\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1Requested\",\"type\":\"uint128\"}],\"name\":\"collect\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount0Requested\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1Requested\",\"type\":\"uint128\"}],\"name\":\"collectProtocol\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint24\",\"name\":\"\",\"type\":\"uint24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeGrowthGlobal0X128\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeGrowthGlobal1X128\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"flash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"observationCardinalityNext\",\"type\":\"uint16\"}],\"name\":\"increaseObservationCardinalityNext\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"liquidity\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxLiquidityPerTick\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"observations\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"blockTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"int56\",\"name\":\"tickCumulative\",\"type\":\"int56\"},{\"internalType\":\"uint160\",\"name\":\"secondsPerLiquidityCumulativeX128\",\"type\":\"uint160\"},{\"internalType\":\"bool\",\"name\":\"initialized\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"secondsAgos\",\"type\":\"uint32[]\"}],\"name\":\"observe\",\"outputs\":[{\"internalType\":\"int56[]\",\"name\":\"tickCumulatives\",\"type\":\"int56[]\"},{\"internalType\":\"uint160[]\",\"name\":\"secondsPerLiquidityCumulativeX128s\",\"type\":\"uint160[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"}],\"name\":\"positions\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"_liquidity\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthInside0LastX128\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthInside1LastX128\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"tokensOwed0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"tokensOwed1\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolFees\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"token0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"token1\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"feeProtocol0\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"feeProtocol1\",\"type\":\"uint8\"}],\"name\":\"setFeeProtocol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slot0\",\"outputs\":[{\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"},{\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"},{\"internalType\":\"uint16\",\"name\":\"observationIndex\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"observationCardinality\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"observationCardinalityNext\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"feeProtocol\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"unlocked\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"}],\"name\":\"snapshotCumulativesInside\",\"outputs\":[{\"internalType\":\"int56\",\"name\":\"tickCumulativeInside\",\"type\":\"int56\"},{\"internalType\":\"uint160\",\"name\":\"secondsPerLiquidityInsideX128\",\"type\":\"uint160\"},{\"internalType\":\"uint32\",\"name\":\"secondsInside\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"zeroForOne\",\"type\":\"bool\"},{\"internalType\":\"int256\",\"name\":\"amountSpecified\",\"type\":\"int256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"amount0\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"amount1\",\"type\":\"int256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int16\",\"name\":\"wordPosition\",\"type\":\"int16\"}],\"name\":\"tickBitmap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tickSpacing\",\"outputs\":[{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"}],\"name\":\"ticks\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"liquidityGross\",\"type\":\"uint128\"},{\"internalType\":\"int128\",\"name\":\"liquidityNet\",\"type\":\"int128\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthOutside0X128\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthOutside1X128\",\"type\":\"uint256\"},{\"internalType\":\"int56\",\"name\":\"tickCumulativeOutside\",\"type\":\"int56\"},{\"internalType\":\"uint160\",\"name\":\"secondsPerLiquidityOutsideX128\",\"type\":\"uint160\"},{\"internalType\":\"uint32\",\"name\":\"secondsOutside\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"initialized\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token0\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token1\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +} + +// IUniswapV3PoolABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV3PoolMetaData.ABI instead. +var IUniswapV3PoolABI = IUniswapV3PoolMetaData.ABI + +// IUniswapV3Pool is an auto generated Go binding around an Ethereum contract. +type IUniswapV3Pool struct { + IUniswapV3PoolCaller // Read-only binding to the contract + IUniswapV3PoolTransactor // Write-only binding to the contract + IUniswapV3PoolFilterer // Log filterer for contract events +} + +// IUniswapV3PoolCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV3PoolCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV3PoolTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV3PoolFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV3PoolSession struct { + Contract *IUniswapV3Pool // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV3PoolCallerSession struct { + Contract *IUniswapV3PoolCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV3PoolTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV3PoolTransactorSession struct { + Contract *IUniswapV3PoolTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV3PoolRaw struct { + Contract *IUniswapV3Pool // Generic contract binding to access the raw methods on +} + +// IUniswapV3PoolCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV3PoolCallerRaw struct { + Contract *IUniswapV3PoolCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV3PoolTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV3PoolTransactorRaw struct { + Contract *IUniswapV3PoolTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV3Pool creates a new instance of IUniswapV3Pool, bound to a specific deployed contract. +func NewIUniswapV3Pool(address common.Address, backend bind.ContractBackend) (*IUniswapV3Pool, error) { + contract, err := bindIUniswapV3Pool(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV3Pool{IUniswapV3PoolCaller: IUniswapV3PoolCaller{contract: contract}, IUniswapV3PoolTransactor: IUniswapV3PoolTransactor{contract: contract}, IUniswapV3PoolFilterer: IUniswapV3PoolFilterer{contract: contract}}, nil +} + +// NewIUniswapV3PoolCaller creates a new read-only instance of IUniswapV3Pool, bound to a specific deployed contract. +func NewIUniswapV3PoolCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV3PoolCaller, error) { + contract, err := bindIUniswapV3Pool(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolCaller{contract: contract}, nil +} + +// NewIUniswapV3PoolTransactor creates a new write-only instance of IUniswapV3Pool, bound to a specific deployed contract. +func NewIUniswapV3PoolTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV3PoolTransactor, error) { + contract, err := bindIUniswapV3Pool(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolTransactor{contract: contract}, nil +} + +// NewIUniswapV3PoolFilterer creates a new log filterer instance of IUniswapV3Pool, bound to a specific deployed contract. +func NewIUniswapV3PoolFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV3PoolFilterer, error) { + contract, err := bindIUniswapV3Pool(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV3PoolFilterer{contract: contract}, nil +} + +// bindIUniswapV3Pool binds a generic wrapper to an already deployed contract. +func bindIUniswapV3Pool(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV3PoolMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3Pool *IUniswapV3PoolRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3Pool.Contract.IUniswapV3PoolCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3Pool *IUniswapV3PoolRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.IUniswapV3PoolTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3Pool *IUniswapV3PoolRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.IUniswapV3PoolTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3Pool *IUniswapV3PoolCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3Pool.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3Pool *IUniswapV3PoolTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3Pool *IUniswapV3PoolTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.contract.Transact(opts, method, params...) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Factory() (common.Address, error) { + return _IUniswapV3Pool.Contract.Factory(&_IUniswapV3Pool.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) Factory() (common.Address, error) { + return _IUniswapV3Pool.Contract.Factory(&_IUniswapV3Pool.CallOpts) +} + +// Fee is a free data retrieval call binding the contract method 0xddca3f43. +// +// Solidity: function fee() view returns(uint24) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) Fee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "fee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Fee is a free data retrieval call binding the contract method 0xddca3f43. +// +// Solidity: function fee() view returns(uint24) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Fee() (*big.Int, error) { + return _IUniswapV3Pool.Contract.Fee(&_IUniswapV3Pool.CallOpts) +} + +// Fee is a free data retrieval call binding the contract method 0xddca3f43. +// +// Solidity: function fee() view returns(uint24) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) Fee() (*big.Int, error) { + return _IUniswapV3Pool.Contract.Fee(&_IUniswapV3Pool.CallOpts) +} + +// FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399. +// +// Solidity: function feeGrowthGlobal0X128() view returns(uint256) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) FeeGrowthGlobal0X128(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "feeGrowthGlobal0X128") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399. +// +// Solidity: function feeGrowthGlobal0X128() view returns(uint256) +func (_IUniswapV3Pool *IUniswapV3PoolSession) FeeGrowthGlobal0X128() (*big.Int, error) { + return _IUniswapV3Pool.Contract.FeeGrowthGlobal0X128(&_IUniswapV3Pool.CallOpts) +} + +// FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399. +// +// Solidity: function feeGrowthGlobal0X128() view returns(uint256) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) FeeGrowthGlobal0X128() (*big.Int, error) { + return _IUniswapV3Pool.Contract.FeeGrowthGlobal0X128(&_IUniswapV3Pool.CallOpts) +} + +// FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319. +// +// Solidity: function feeGrowthGlobal1X128() view returns(uint256) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) FeeGrowthGlobal1X128(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "feeGrowthGlobal1X128") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319. +// +// Solidity: function feeGrowthGlobal1X128() view returns(uint256) +func (_IUniswapV3Pool *IUniswapV3PoolSession) FeeGrowthGlobal1X128() (*big.Int, error) { + return _IUniswapV3Pool.Contract.FeeGrowthGlobal1X128(&_IUniswapV3Pool.CallOpts) +} + +// FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319. +// +// Solidity: function feeGrowthGlobal1X128() view returns(uint256) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) FeeGrowthGlobal1X128() (*big.Int, error) { + return _IUniswapV3Pool.Contract.FeeGrowthGlobal1X128(&_IUniswapV3Pool.CallOpts) +} + +// Liquidity is a free data retrieval call binding the contract method 0x1a686502. +// +// Solidity: function liquidity() view returns(uint128) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) Liquidity(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "liquidity") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Liquidity is a free data retrieval call binding the contract method 0x1a686502. +// +// Solidity: function liquidity() view returns(uint128) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Liquidity() (*big.Int, error) { + return _IUniswapV3Pool.Contract.Liquidity(&_IUniswapV3Pool.CallOpts) +} + +// Liquidity is a free data retrieval call binding the contract method 0x1a686502. +// +// Solidity: function liquidity() view returns(uint128) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) Liquidity() (*big.Int, error) { + return _IUniswapV3Pool.Contract.Liquidity(&_IUniswapV3Pool.CallOpts) +} + +// MaxLiquidityPerTick is a free data retrieval call binding the contract method 0x70cf754a. +// +// Solidity: function maxLiquidityPerTick() view returns(uint128) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) MaxLiquidityPerTick(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "maxLiquidityPerTick") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MaxLiquidityPerTick is a free data retrieval call binding the contract method 0x70cf754a. +// +// Solidity: function maxLiquidityPerTick() view returns(uint128) +func (_IUniswapV3Pool *IUniswapV3PoolSession) MaxLiquidityPerTick() (*big.Int, error) { + return _IUniswapV3Pool.Contract.MaxLiquidityPerTick(&_IUniswapV3Pool.CallOpts) +} + +// MaxLiquidityPerTick is a free data retrieval call binding the contract method 0x70cf754a. +// +// Solidity: function maxLiquidityPerTick() view returns(uint128) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) MaxLiquidityPerTick() (*big.Int, error) { + return _IUniswapV3Pool.Contract.MaxLiquidityPerTick(&_IUniswapV3Pool.CallOpts) +} + +// Observations is a free data retrieval call binding the contract method 0x252c09d7. +// +// Solidity: function observations(uint256 index) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) Observations(opts *bind.CallOpts, index *big.Int) (struct { + BlockTimestamp uint32 + TickCumulative *big.Int + SecondsPerLiquidityCumulativeX128 *big.Int + Initialized bool +}, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "observations", index) + + outstruct := new(struct { + BlockTimestamp uint32 + TickCumulative *big.Int + SecondsPerLiquidityCumulativeX128 *big.Int + Initialized bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.BlockTimestamp = *abi.ConvertType(out[0], new(uint32)).(*uint32) + outstruct.TickCumulative = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.SecondsPerLiquidityCumulativeX128 = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.Initialized = *abi.ConvertType(out[3], new(bool)).(*bool) + + return *outstruct, err + +} + +// Observations is a free data retrieval call binding the contract method 0x252c09d7. +// +// Solidity: function observations(uint256 index) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Observations(index *big.Int) (struct { + BlockTimestamp uint32 + TickCumulative *big.Int + SecondsPerLiquidityCumulativeX128 *big.Int + Initialized bool +}, error) { + return _IUniswapV3Pool.Contract.Observations(&_IUniswapV3Pool.CallOpts, index) +} + +// Observations is a free data retrieval call binding the contract method 0x252c09d7. +// +// Solidity: function observations(uint256 index) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) Observations(index *big.Int) (struct { + BlockTimestamp uint32 + TickCumulative *big.Int + SecondsPerLiquidityCumulativeX128 *big.Int + Initialized bool +}, error) { + return _IUniswapV3Pool.Contract.Observations(&_IUniswapV3Pool.CallOpts, index) +} + +// Observe is a free data retrieval call binding the contract method 0x883bdbfd. +// +// Solidity: function observe(uint32[] secondsAgos) view returns(int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulativeX128s) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) Observe(opts *bind.CallOpts, secondsAgos []uint32) (struct { + TickCumulatives []*big.Int + SecondsPerLiquidityCumulativeX128s []*big.Int +}, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "observe", secondsAgos) + + outstruct := new(struct { + TickCumulatives []*big.Int + SecondsPerLiquidityCumulativeX128s []*big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.TickCumulatives = *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + outstruct.SecondsPerLiquidityCumulativeX128s = *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int) + + return *outstruct, err + +} + +// Observe is a free data retrieval call binding the contract method 0x883bdbfd. +// +// Solidity: function observe(uint32[] secondsAgos) view returns(int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulativeX128s) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Observe(secondsAgos []uint32) (struct { + TickCumulatives []*big.Int + SecondsPerLiquidityCumulativeX128s []*big.Int +}, error) { + return _IUniswapV3Pool.Contract.Observe(&_IUniswapV3Pool.CallOpts, secondsAgos) +} + +// Observe is a free data retrieval call binding the contract method 0x883bdbfd. +// +// Solidity: function observe(uint32[] secondsAgos) view returns(int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulativeX128s) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) Observe(secondsAgos []uint32) (struct { + TickCumulatives []*big.Int + SecondsPerLiquidityCumulativeX128s []*big.Int +}, error) { + return _IUniswapV3Pool.Contract.Observe(&_IUniswapV3Pool.CallOpts, secondsAgos) +} + +// Positions is a free data retrieval call binding the contract method 0x514ea4bf. +// +// Solidity: function positions(bytes32 key) view returns(uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) Positions(opts *bind.CallOpts, key [32]byte) (struct { + Liquidity *big.Int + FeeGrowthInside0LastX128 *big.Int + FeeGrowthInside1LastX128 *big.Int + TokensOwed0 *big.Int + TokensOwed1 *big.Int +}, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "positions", key) + + outstruct := new(struct { + Liquidity *big.Int + FeeGrowthInside0LastX128 *big.Int + FeeGrowthInside1LastX128 *big.Int + TokensOwed0 *big.Int + TokensOwed1 *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Liquidity = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.FeeGrowthInside0LastX128 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.FeeGrowthInside1LastX128 = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.TokensOwed0 = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.TokensOwed1 = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// Positions is a free data retrieval call binding the contract method 0x514ea4bf. +// +// Solidity: function positions(bytes32 key) view returns(uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Positions(key [32]byte) (struct { + Liquidity *big.Int + FeeGrowthInside0LastX128 *big.Int + FeeGrowthInside1LastX128 *big.Int + TokensOwed0 *big.Int + TokensOwed1 *big.Int +}, error) { + return _IUniswapV3Pool.Contract.Positions(&_IUniswapV3Pool.CallOpts, key) +} + +// Positions is a free data retrieval call binding the contract method 0x514ea4bf. +// +// Solidity: function positions(bytes32 key) view returns(uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) Positions(key [32]byte) (struct { + Liquidity *big.Int + FeeGrowthInside0LastX128 *big.Int + FeeGrowthInside1LastX128 *big.Int + TokensOwed0 *big.Int + TokensOwed1 *big.Int +}, error) { + return _IUniswapV3Pool.Contract.Positions(&_IUniswapV3Pool.CallOpts, key) +} + +// ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b. +// +// Solidity: function protocolFees() view returns(uint128 token0, uint128 token1) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) ProtocolFees(opts *bind.CallOpts) (struct { + Token0 *big.Int + Token1 *big.Int +}, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "protocolFees") + + outstruct := new(struct { + Token0 *big.Int + Token1 *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Token0 = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Token1 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b. +// +// Solidity: function protocolFees() view returns(uint128 token0, uint128 token1) +func (_IUniswapV3Pool *IUniswapV3PoolSession) ProtocolFees() (struct { + Token0 *big.Int + Token1 *big.Int +}, error) { + return _IUniswapV3Pool.Contract.ProtocolFees(&_IUniswapV3Pool.CallOpts) +} + +// ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b. +// +// Solidity: function protocolFees() view returns(uint128 token0, uint128 token1) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) ProtocolFees() (struct { + Token0 *big.Int + Token1 *big.Int +}, error) { + return _IUniswapV3Pool.Contract.ProtocolFees(&_IUniswapV3Pool.CallOpts) +} + +// Slot0 is a free data retrieval call binding the contract method 0x3850c7bd. +// +// Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) Slot0(opts *bind.CallOpts) (struct { + SqrtPriceX96 *big.Int + Tick *big.Int + ObservationIndex uint16 + ObservationCardinality uint16 + ObservationCardinalityNext uint16 + FeeProtocol uint8 + Unlocked bool +}, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "slot0") + + outstruct := new(struct { + SqrtPriceX96 *big.Int + Tick *big.Int + ObservationIndex uint16 + ObservationCardinality uint16 + ObservationCardinalityNext uint16 + FeeProtocol uint8 + Unlocked bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.SqrtPriceX96 = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Tick = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.ObservationIndex = *abi.ConvertType(out[2], new(uint16)).(*uint16) + outstruct.ObservationCardinality = *abi.ConvertType(out[3], new(uint16)).(*uint16) + outstruct.ObservationCardinalityNext = *abi.ConvertType(out[4], new(uint16)).(*uint16) + outstruct.FeeProtocol = *abi.ConvertType(out[5], new(uint8)).(*uint8) + outstruct.Unlocked = *abi.ConvertType(out[6], new(bool)).(*bool) + + return *outstruct, err + +} + +// Slot0 is a free data retrieval call binding the contract method 0x3850c7bd. +// +// Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Slot0() (struct { + SqrtPriceX96 *big.Int + Tick *big.Int + ObservationIndex uint16 + ObservationCardinality uint16 + ObservationCardinalityNext uint16 + FeeProtocol uint8 + Unlocked bool +}, error) { + return _IUniswapV3Pool.Contract.Slot0(&_IUniswapV3Pool.CallOpts) +} + +// Slot0 is a free data retrieval call binding the contract method 0x3850c7bd. +// +// Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) Slot0() (struct { + SqrtPriceX96 *big.Int + Tick *big.Int + ObservationIndex uint16 + ObservationCardinality uint16 + ObservationCardinalityNext uint16 + FeeProtocol uint8 + Unlocked bool +}, error) { + return _IUniswapV3Pool.Contract.Slot0(&_IUniswapV3Pool.CallOpts) +} + +// SnapshotCumulativesInside is a free data retrieval call binding the contract method 0xa38807f2. +// +// Solidity: function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) view returns(int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) SnapshotCumulativesInside(opts *bind.CallOpts, tickLower *big.Int, tickUpper *big.Int) (struct { + TickCumulativeInside *big.Int + SecondsPerLiquidityInsideX128 *big.Int + SecondsInside uint32 +}, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "snapshotCumulativesInside", tickLower, tickUpper) + + outstruct := new(struct { + TickCumulativeInside *big.Int + SecondsPerLiquidityInsideX128 *big.Int + SecondsInside uint32 + }) + if err != nil { + return *outstruct, err + } + + outstruct.TickCumulativeInside = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.SecondsPerLiquidityInsideX128 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.SecondsInside = *abi.ConvertType(out[2], new(uint32)).(*uint32) + + return *outstruct, err + +} + +// SnapshotCumulativesInside is a free data retrieval call binding the contract method 0xa38807f2. +// +// Solidity: function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) view returns(int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside) +func (_IUniswapV3Pool *IUniswapV3PoolSession) SnapshotCumulativesInside(tickLower *big.Int, tickUpper *big.Int) (struct { + TickCumulativeInside *big.Int + SecondsPerLiquidityInsideX128 *big.Int + SecondsInside uint32 +}, error) { + return _IUniswapV3Pool.Contract.SnapshotCumulativesInside(&_IUniswapV3Pool.CallOpts, tickLower, tickUpper) +} + +// SnapshotCumulativesInside is a free data retrieval call binding the contract method 0xa38807f2. +// +// Solidity: function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) view returns(int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) SnapshotCumulativesInside(tickLower *big.Int, tickUpper *big.Int) (struct { + TickCumulativeInside *big.Int + SecondsPerLiquidityInsideX128 *big.Int + SecondsInside uint32 +}, error) { + return _IUniswapV3Pool.Contract.SnapshotCumulativesInside(&_IUniswapV3Pool.CallOpts, tickLower, tickUpper) +} + +// TickBitmap is a free data retrieval call binding the contract method 0x5339c296. +// +// Solidity: function tickBitmap(int16 wordPosition) view returns(uint256) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) TickBitmap(opts *bind.CallOpts, wordPosition int16) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "tickBitmap", wordPosition) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TickBitmap is a free data retrieval call binding the contract method 0x5339c296. +// +// Solidity: function tickBitmap(int16 wordPosition) view returns(uint256) +func (_IUniswapV3Pool *IUniswapV3PoolSession) TickBitmap(wordPosition int16) (*big.Int, error) { + return _IUniswapV3Pool.Contract.TickBitmap(&_IUniswapV3Pool.CallOpts, wordPosition) +} + +// TickBitmap is a free data retrieval call binding the contract method 0x5339c296. +// +// Solidity: function tickBitmap(int16 wordPosition) view returns(uint256) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) TickBitmap(wordPosition int16) (*big.Int, error) { + return _IUniswapV3Pool.Contract.TickBitmap(&_IUniswapV3Pool.CallOpts, wordPosition) +} + +// TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c. +// +// Solidity: function tickSpacing() view returns(int24) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) TickSpacing(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "tickSpacing") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c. +// +// Solidity: function tickSpacing() view returns(int24) +func (_IUniswapV3Pool *IUniswapV3PoolSession) TickSpacing() (*big.Int, error) { + return _IUniswapV3Pool.Contract.TickSpacing(&_IUniswapV3Pool.CallOpts) +} + +// TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c. +// +// Solidity: function tickSpacing() view returns(int24) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) TickSpacing() (*big.Int, error) { + return _IUniswapV3Pool.Contract.TickSpacing(&_IUniswapV3Pool.CallOpts) +} + +// Ticks is a free data retrieval call binding the contract method 0xf30dba93. +// +// Solidity: function ticks(int24 tick) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) Ticks(opts *bind.CallOpts, tick *big.Int) (struct { + LiquidityGross *big.Int + LiquidityNet *big.Int + FeeGrowthOutside0X128 *big.Int + FeeGrowthOutside1X128 *big.Int + TickCumulativeOutside *big.Int + SecondsPerLiquidityOutsideX128 *big.Int + SecondsOutside uint32 + Initialized bool +}, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "ticks", tick) + + outstruct := new(struct { + LiquidityGross *big.Int + LiquidityNet *big.Int + FeeGrowthOutside0X128 *big.Int + FeeGrowthOutside1X128 *big.Int + TickCumulativeOutside *big.Int + SecondsPerLiquidityOutsideX128 *big.Int + SecondsOutside uint32 + Initialized bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.LiquidityGross = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.LiquidityNet = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.FeeGrowthOutside0X128 = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.FeeGrowthOutside1X128 = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.TickCumulativeOutside = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + outstruct.SecondsPerLiquidityOutsideX128 = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int) + outstruct.SecondsOutside = *abi.ConvertType(out[6], new(uint32)).(*uint32) + outstruct.Initialized = *abi.ConvertType(out[7], new(bool)).(*bool) + + return *outstruct, err + +} + +// Ticks is a free data retrieval call binding the contract method 0xf30dba93. +// +// Solidity: function ticks(int24 tick) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Ticks(tick *big.Int) (struct { + LiquidityGross *big.Int + LiquidityNet *big.Int + FeeGrowthOutside0X128 *big.Int + FeeGrowthOutside1X128 *big.Int + TickCumulativeOutside *big.Int + SecondsPerLiquidityOutsideX128 *big.Int + SecondsOutside uint32 + Initialized bool +}, error) { + return _IUniswapV3Pool.Contract.Ticks(&_IUniswapV3Pool.CallOpts, tick) +} + +// Ticks is a free data retrieval call binding the contract method 0xf30dba93. +// +// Solidity: function ticks(int24 tick) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) Ticks(tick *big.Int) (struct { + LiquidityGross *big.Int + LiquidityNet *big.Int + FeeGrowthOutside0X128 *big.Int + FeeGrowthOutside1X128 *big.Int + TickCumulativeOutside *big.Int + SecondsPerLiquidityOutsideX128 *big.Int + SecondsOutside uint32 + Initialized bool +}, error) { + return _IUniswapV3Pool.Contract.Ticks(&_IUniswapV3Pool.CallOpts, tick) +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) Token0(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "token0") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Token0() (common.Address, error) { + return _IUniswapV3Pool.Contract.Token0(&_IUniswapV3Pool.CallOpts) +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) Token0() (common.Address, error) { + return _IUniswapV3Pool.Contract.Token0(&_IUniswapV3Pool.CallOpts) +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_IUniswapV3Pool *IUniswapV3PoolCaller) Token1(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV3Pool.contract.Call(opts, &out, "token1") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Token1() (common.Address, error) { + return _IUniswapV3Pool.Contract.Token1(&_IUniswapV3Pool.CallOpts) +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_IUniswapV3Pool *IUniswapV3PoolCallerSession) Token1() (common.Address, error) { + return _IUniswapV3Pool.Contract.Token1(&_IUniswapV3Pool.CallOpts) +} + +// Burn is a paid mutator transaction binding the contract method 0xa34123a7. +// +// Solidity: function burn(int24 tickLower, int24 tickUpper, uint128 amount) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolTransactor) Burn(opts *bind.TransactOpts, tickLower *big.Int, tickUpper *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.contract.Transact(opts, "burn", tickLower, tickUpper, amount) +} + +// Burn is a paid mutator transaction binding the contract method 0xa34123a7. +// +// Solidity: function burn(int24 tickLower, int24 tickUpper, uint128 amount) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Burn(tickLower *big.Int, tickUpper *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Burn(&_IUniswapV3Pool.TransactOpts, tickLower, tickUpper, amount) +} + +// Burn is a paid mutator transaction binding the contract method 0xa34123a7. +// +// Solidity: function burn(int24 tickLower, int24 tickUpper, uint128 amount) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolTransactorSession) Burn(tickLower *big.Int, tickUpper *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Burn(&_IUniswapV3Pool.TransactOpts, tickLower, tickUpper, amount) +} + +// Collect is a paid mutator transaction binding the contract method 0x4f1eb3d8. +// +// Solidity: function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolTransactor) Collect(opts *bind.TransactOpts, recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.contract.Transact(opts, "collect", recipient, tickLower, tickUpper, amount0Requested, amount1Requested) +} + +// Collect is a paid mutator transaction binding the contract method 0x4f1eb3d8. +// +// Solidity: function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Collect(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Collect(&_IUniswapV3Pool.TransactOpts, recipient, tickLower, tickUpper, amount0Requested, amount1Requested) +} + +// Collect is a paid mutator transaction binding the contract method 0x4f1eb3d8. +// +// Solidity: function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolTransactorSession) Collect(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Collect(&_IUniswapV3Pool.TransactOpts, recipient, tickLower, tickUpper, amount0Requested, amount1Requested) +} + +// CollectProtocol is a paid mutator transaction binding the contract method 0x85b66729. +// +// Solidity: function collectProtocol(address recipient, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolTransactor) CollectProtocol(opts *bind.TransactOpts, recipient common.Address, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.contract.Transact(opts, "collectProtocol", recipient, amount0Requested, amount1Requested) +} + +// CollectProtocol is a paid mutator transaction binding the contract method 0x85b66729. +// +// Solidity: function collectProtocol(address recipient, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolSession) CollectProtocol(recipient common.Address, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.CollectProtocol(&_IUniswapV3Pool.TransactOpts, recipient, amount0Requested, amount1Requested) +} + +// CollectProtocol is a paid mutator transaction binding the contract method 0x85b66729. +// +// Solidity: function collectProtocol(address recipient, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolTransactorSession) CollectProtocol(recipient common.Address, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.CollectProtocol(&_IUniswapV3Pool.TransactOpts, recipient, amount0Requested, amount1Requested) +} + +// Flash is a paid mutator transaction binding the contract method 0x490e6cbc. +// +// Solidity: function flash(address recipient, uint256 amount0, uint256 amount1, bytes data) returns() +func (_IUniswapV3Pool *IUniswapV3PoolTransactor) Flash(opts *bind.TransactOpts, recipient common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3Pool.contract.Transact(opts, "flash", recipient, amount0, amount1, data) +} + +// Flash is a paid mutator transaction binding the contract method 0x490e6cbc. +// +// Solidity: function flash(address recipient, uint256 amount0, uint256 amount1, bytes data) returns() +func (_IUniswapV3Pool *IUniswapV3PoolSession) Flash(recipient common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Flash(&_IUniswapV3Pool.TransactOpts, recipient, amount0, amount1, data) +} + +// Flash is a paid mutator transaction binding the contract method 0x490e6cbc. +// +// Solidity: function flash(address recipient, uint256 amount0, uint256 amount1, bytes data) returns() +func (_IUniswapV3Pool *IUniswapV3PoolTransactorSession) Flash(recipient common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Flash(&_IUniswapV3Pool.TransactOpts, recipient, amount0, amount1, data) +} + +// IncreaseObservationCardinalityNext is a paid mutator transaction binding the contract method 0x32148f67. +// +// Solidity: function increaseObservationCardinalityNext(uint16 observationCardinalityNext) returns() +func (_IUniswapV3Pool *IUniswapV3PoolTransactor) IncreaseObservationCardinalityNext(opts *bind.TransactOpts, observationCardinalityNext uint16) (*types.Transaction, error) { + return _IUniswapV3Pool.contract.Transact(opts, "increaseObservationCardinalityNext", observationCardinalityNext) +} + +// IncreaseObservationCardinalityNext is a paid mutator transaction binding the contract method 0x32148f67. +// +// Solidity: function increaseObservationCardinalityNext(uint16 observationCardinalityNext) returns() +func (_IUniswapV3Pool *IUniswapV3PoolSession) IncreaseObservationCardinalityNext(observationCardinalityNext uint16) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.IncreaseObservationCardinalityNext(&_IUniswapV3Pool.TransactOpts, observationCardinalityNext) +} + +// IncreaseObservationCardinalityNext is a paid mutator transaction binding the contract method 0x32148f67. +// +// Solidity: function increaseObservationCardinalityNext(uint16 observationCardinalityNext) returns() +func (_IUniswapV3Pool *IUniswapV3PoolTransactorSession) IncreaseObservationCardinalityNext(observationCardinalityNext uint16) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.IncreaseObservationCardinalityNext(&_IUniswapV3Pool.TransactOpts, observationCardinalityNext) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf637731d. +// +// Solidity: function initialize(uint160 sqrtPriceX96) returns() +func (_IUniswapV3Pool *IUniswapV3PoolTransactor) Initialize(opts *bind.TransactOpts, sqrtPriceX96 *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.contract.Transact(opts, "initialize", sqrtPriceX96) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf637731d. +// +// Solidity: function initialize(uint160 sqrtPriceX96) returns() +func (_IUniswapV3Pool *IUniswapV3PoolSession) Initialize(sqrtPriceX96 *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Initialize(&_IUniswapV3Pool.TransactOpts, sqrtPriceX96) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf637731d. +// +// Solidity: function initialize(uint160 sqrtPriceX96) returns() +func (_IUniswapV3Pool *IUniswapV3PoolTransactorSession) Initialize(sqrtPriceX96 *big.Int) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Initialize(&_IUniswapV3Pool.TransactOpts, sqrtPriceX96) +} + +// Mint is a paid mutator transaction binding the contract method 0x3c8a7d8d. +// +// Solidity: function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes data) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolTransactor) Mint(opts *bind.TransactOpts, recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3Pool.contract.Transact(opts, "mint", recipient, tickLower, tickUpper, amount, data) +} + +// Mint is a paid mutator transaction binding the contract method 0x3c8a7d8d. +// +// Solidity: function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes data) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Mint(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Mint(&_IUniswapV3Pool.TransactOpts, recipient, tickLower, tickUpper, amount, data) +} + +// Mint is a paid mutator transaction binding the contract method 0x3c8a7d8d. +// +// Solidity: function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes data) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolTransactorSession) Mint(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Mint(&_IUniswapV3Pool.TransactOpts, recipient, tickLower, tickUpper, amount, data) +} + +// SetFeeProtocol is a paid mutator transaction binding the contract method 0x8206a4d1. +// +// Solidity: function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) returns() +func (_IUniswapV3Pool *IUniswapV3PoolTransactor) SetFeeProtocol(opts *bind.TransactOpts, feeProtocol0 uint8, feeProtocol1 uint8) (*types.Transaction, error) { + return _IUniswapV3Pool.contract.Transact(opts, "setFeeProtocol", feeProtocol0, feeProtocol1) +} + +// SetFeeProtocol is a paid mutator transaction binding the contract method 0x8206a4d1. +// +// Solidity: function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) returns() +func (_IUniswapV3Pool *IUniswapV3PoolSession) SetFeeProtocol(feeProtocol0 uint8, feeProtocol1 uint8) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.SetFeeProtocol(&_IUniswapV3Pool.TransactOpts, feeProtocol0, feeProtocol1) +} + +// SetFeeProtocol is a paid mutator transaction binding the contract method 0x8206a4d1. +// +// Solidity: function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) returns() +func (_IUniswapV3Pool *IUniswapV3PoolTransactorSession) SetFeeProtocol(feeProtocol0 uint8, feeProtocol1 uint8) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.SetFeeProtocol(&_IUniswapV3Pool.TransactOpts, feeProtocol0, feeProtocol1) +} + +// Swap is a paid mutator transaction binding the contract method 0x128acb08. +// +// Solidity: function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes data) returns(int256 amount0, int256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolTransactor) Swap(opts *bind.TransactOpts, recipient common.Address, zeroForOne bool, amountSpecified *big.Int, sqrtPriceLimitX96 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3Pool.contract.Transact(opts, "swap", recipient, zeroForOne, amountSpecified, sqrtPriceLimitX96, data) +} + +// Swap is a paid mutator transaction binding the contract method 0x128acb08. +// +// Solidity: function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes data) returns(int256 amount0, int256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolSession) Swap(recipient common.Address, zeroForOne bool, amountSpecified *big.Int, sqrtPriceLimitX96 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Swap(&_IUniswapV3Pool.TransactOpts, recipient, zeroForOne, amountSpecified, sqrtPriceLimitX96, data) +} + +// Swap is a paid mutator transaction binding the contract method 0x128acb08. +// +// Solidity: function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes data) returns(int256 amount0, int256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolTransactorSession) Swap(recipient common.Address, zeroForOne bool, amountSpecified *big.Int, sqrtPriceLimitX96 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3Pool.Contract.Swap(&_IUniswapV3Pool.TransactOpts, recipient, zeroForOne, amountSpecified, sqrtPriceLimitX96, data) +} + +// IUniswapV3PoolBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the IUniswapV3Pool contract. +type IUniswapV3PoolBurnIterator struct { + Event *IUniswapV3PoolBurn // 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 *IUniswapV3PoolBurnIterator) 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(IUniswapV3PoolBurn) + 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(IUniswapV3PoolBurn) + 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 *IUniswapV3PoolBurnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolBurnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolBurn represents a Burn event raised by the IUniswapV3Pool contract. +type IUniswapV3PoolBurn struct { + Owner common.Address + TickLower *big.Int + TickUpper *big.Int + Amount *big.Int + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBurn is a free log retrieval operation binding the contract event 0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c. +// +// Solidity: event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) FilterBurn(opts *bind.FilterOpts, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (*IUniswapV3PoolBurnIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.FilterLogs(opts, "Burn", ownerRule, tickLowerRule, tickUpperRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolBurnIterator{contract: _IUniswapV3Pool.contract, event: "Burn", logs: logs, sub: sub}, nil +} + +// WatchBurn is a free log subscription operation binding the contract event 0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c. +// +// Solidity: event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolBurn, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.WatchLogs(opts, "Burn", ownerRule, tickLowerRule, tickUpperRule) + 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(IUniswapV3PoolBurn) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Burn", 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 +} + +// ParseBurn is a log parse operation binding the contract event 0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c. +// +// Solidity: event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) ParseBurn(log types.Log) (*IUniswapV3PoolBurn, error) { + event := new(IUniswapV3PoolBurn) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Burn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolCollectIterator is returned from FilterCollect and is used to iterate over the raw logs and unpacked data for Collect events raised by the IUniswapV3Pool contract. +type IUniswapV3PoolCollectIterator struct { + Event *IUniswapV3PoolCollect // 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 *IUniswapV3PoolCollectIterator) 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(IUniswapV3PoolCollect) + 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(IUniswapV3PoolCollect) + 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 *IUniswapV3PoolCollectIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolCollectIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolCollect represents a Collect event raised by the IUniswapV3Pool contract. +type IUniswapV3PoolCollect struct { + Owner common.Address + Recipient common.Address + TickLower *big.Int + TickUpper *big.Int + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollect is a free log retrieval operation binding the contract event 0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0. +// +// Solidity: event Collect(address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) FilterCollect(opts *bind.FilterOpts, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (*IUniswapV3PoolCollectIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.FilterLogs(opts, "Collect", ownerRule, tickLowerRule, tickUpperRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolCollectIterator{contract: _IUniswapV3Pool.contract, event: "Collect", logs: logs, sub: sub}, nil +} + +// WatchCollect is a free log subscription operation binding the contract event 0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0. +// +// Solidity: event Collect(address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) WatchCollect(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolCollect, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.WatchLogs(opts, "Collect", ownerRule, tickLowerRule, tickUpperRule) + 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(IUniswapV3PoolCollect) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Collect", 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 +} + +// ParseCollect is a log parse operation binding the contract event 0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0. +// +// Solidity: event Collect(address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) ParseCollect(log types.Log) (*IUniswapV3PoolCollect, error) { + event := new(IUniswapV3PoolCollect) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Collect", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolCollectProtocolIterator is returned from FilterCollectProtocol and is used to iterate over the raw logs and unpacked data for CollectProtocol events raised by the IUniswapV3Pool contract. +type IUniswapV3PoolCollectProtocolIterator struct { + Event *IUniswapV3PoolCollectProtocol // 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 *IUniswapV3PoolCollectProtocolIterator) 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(IUniswapV3PoolCollectProtocol) + 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(IUniswapV3PoolCollectProtocol) + 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 *IUniswapV3PoolCollectProtocolIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolCollectProtocolIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolCollectProtocol represents a CollectProtocol event raised by the IUniswapV3Pool contract. +type IUniswapV3PoolCollectProtocol struct { + Sender common.Address + Recipient common.Address + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollectProtocol is a free log retrieval operation binding the contract event 0x596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151. +// +// Solidity: event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) FilterCollectProtocol(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*IUniswapV3PoolCollectProtocolIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.FilterLogs(opts, "CollectProtocol", senderRule, recipientRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolCollectProtocolIterator{contract: _IUniswapV3Pool.contract, event: "CollectProtocol", logs: logs, sub: sub}, nil +} + +// WatchCollectProtocol is a free log subscription operation binding the contract event 0x596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151. +// +// Solidity: event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) WatchCollectProtocol(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolCollectProtocol, sender []common.Address, recipient []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.WatchLogs(opts, "CollectProtocol", senderRule, recipientRule) + 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(IUniswapV3PoolCollectProtocol) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "CollectProtocol", 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 +} + +// ParseCollectProtocol is a log parse operation binding the contract event 0x596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151. +// +// Solidity: event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) ParseCollectProtocol(log types.Log) (*IUniswapV3PoolCollectProtocol, error) { + event := new(IUniswapV3PoolCollectProtocol) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "CollectProtocol", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolFlashIterator is returned from FilterFlash and is used to iterate over the raw logs and unpacked data for Flash events raised by the IUniswapV3Pool contract. +type IUniswapV3PoolFlashIterator struct { + Event *IUniswapV3PoolFlash // 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 *IUniswapV3PoolFlashIterator) 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(IUniswapV3PoolFlash) + 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(IUniswapV3PoolFlash) + 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 *IUniswapV3PoolFlashIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolFlashIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolFlash represents a Flash event raised by the IUniswapV3Pool contract. +type IUniswapV3PoolFlash struct { + Sender common.Address + Recipient common.Address + Amount0 *big.Int + Amount1 *big.Int + Paid0 *big.Int + Paid1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFlash is a free log retrieval operation binding the contract event 0xbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca633. +// +// Solidity: event Flash(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) FilterFlash(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*IUniswapV3PoolFlashIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.FilterLogs(opts, "Flash", senderRule, recipientRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolFlashIterator{contract: _IUniswapV3Pool.contract, event: "Flash", logs: logs, sub: sub}, nil +} + +// WatchFlash is a free log subscription operation binding the contract event 0xbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca633. +// +// Solidity: event Flash(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) WatchFlash(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolFlash, sender []common.Address, recipient []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.WatchLogs(opts, "Flash", senderRule, recipientRule) + 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(IUniswapV3PoolFlash) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Flash", 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 +} + +// ParseFlash is a log parse operation binding the contract event 0xbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca633. +// +// Solidity: event Flash(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) ParseFlash(log types.Log) (*IUniswapV3PoolFlash, error) { + event := new(IUniswapV3PoolFlash) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Flash", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolIncreaseObservationCardinalityNextIterator is returned from FilterIncreaseObservationCardinalityNext and is used to iterate over the raw logs and unpacked data for IncreaseObservationCardinalityNext events raised by the IUniswapV3Pool contract. +type IUniswapV3PoolIncreaseObservationCardinalityNextIterator struct { + Event *IUniswapV3PoolIncreaseObservationCardinalityNext // 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 *IUniswapV3PoolIncreaseObservationCardinalityNextIterator) 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(IUniswapV3PoolIncreaseObservationCardinalityNext) + 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(IUniswapV3PoolIncreaseObservationCardinalityNext) + 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 *IUniswapV3PoolIncreaseObservationCardinalityNextIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolIncreaseObservationCardinalityNextIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolIncreaseObservationCardinalityNext represents a IncreaseObservationCardinalityNext event raised by the IUniswapV3Pool contract. +type IUniswapV3PoolIncreaseObservationCardinalityNext struct { + ObservationCardinalityNextOld uint16 + ObservationCardinalityNextNew uint16 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterIncreaseObservationCardinalityNext is a free log retrieval operation binding the contract event 0xac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a. +// +// Solidity: event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) FilterIncreaseObservationCardinalityNext(opts *bind.FilterOpts) (*IUniswapV3PoolIncreaseObservationCardinalityNextIterator, error) { + + logs, sub, err := _IUniswapV3Pool.contract.FilterLogs(opts, "IncreaseObservationCardinalityNext") + if err != nil { + return nil, err + } + return &IUniswapV3PoolIncreaseObservationCardinalityNextIterator{contract: _IUniswapV3Pool.contract, event: "IncreaseObservationCardinalityNext", logs: logs, sub: sub}, nil +} + +// WatchIncreaseObservationCardinalityNext is a free log subscription operation binding the contract event 0xac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a. +// +// Solidity: event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) WatchIncreaseObservationCardinalityNext(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolIncreaseObservationCardinalityNext) (event.Subscription, error) { + + logs, sub, err := _IUniswapV3Pool.contract.WatchLogs(opts, "IncreaseObservationCardinalityNext") + 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(IUniswapV3PoolIncreaseObservationCardinalityNext) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "IncreaseObservationCardinalityNext", 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 +} + +// ParseIncreaseObservationCardinalityNext is a log parse operation binding the contract event 0xac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a. +// +// Solidity: event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) ParseIncreaseObservationCardinalityNext(log types.Log) (*IUniswapV3PoolIncreaseObservationCardinalityNext, error) { + event := new(IUniswapV3PoolIncreaseObservationCardinalityNext) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "IncreaseObservationCardinalityNext", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolInitializeIterator is returned from FilterInitialize and is used to iterate over the raw logs and unpacked data for Initialize events raised by the IUniswapV3Pool contract. +type IUniswapV3PoolInitializeIterator struct { + Event *IUniswapV3PoolInitialize // 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 *IUniswapV3PoolInitializeIterator) 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(IUniswapV3PoolInitialize) + 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(IUniswapV3PoolInitialize) + 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 *IUniswapV3PoolInitializeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolInitializeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolInitialize represents a Initialize event raised by the IUniswapV3Pool contract. +type IUniswapV3PoolInitialize struct { + SqrtPriceX96 *big.Int + Tick *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialize is a free log retrieval operation binding the contract event 0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95. +// +// Solidity: event Initialize(uint160 sqrtPriceX96, int24 tick) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) FilterInitialize(opts *bind.FilterOpts) (*IUniswapV3PoolInitializeIterator, error) { + + logs, sub, err := _IUniswapV3Pool.contract.FilterLogs(opts, "Initialize") + if err != nil { + return nil, err + } + return &IUniswapV3PoolInitializeIterator{contract: _IUniswapV3Pool.contract, event: "Initialize", logs: logs, sub: sub}, nil +} + +// WatchInitialize is a free log subscription operation binding the contract event 0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95. +// +// Solidity: event Initialize(uint160 sqrtPriceX96, int24 tick) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) WatchInitialize(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolInitialize) (event.Subscription, error) { + + logs, sub, err := _IUniswapV3Pool.contract.WatchLogs(opts, "Initialize") + 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(IUniswapV3PoolInitialize) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Initialize", 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 +} + +// ParseInitialize is a log parse operation binding the contract event 0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95. +// +// Solidity: event Initialize(uint160 sqrtPriceX96, int24 tick) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) ParseInitialize(log types.Log) (*IUniswapV3PoolInitialize, error) { + event := new(IUniswapV3PoolInitialize) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Initialize", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the IUniswapV3Pool contract. +type IUniswapV3PoolMintIterator struct { + Event *IUniswapV3PoolMint // 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 *IUniswapV3PoolMintIterator) 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(IUniswapV3PoolMint) + 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(IUniswapV3PoolMint) + 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 *IUniswapV3PoolMintIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolMintIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolMint represents a Mint event raised by the IUniswapV3Pool contract. +type IUniswapV3PoolMint struct { + Sender common.Address + Owner common.Address + TickLower *big.Int + TickUpper *big.Int + Amount *big.Int + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMint is a free log retrieval operation binding the contract event 0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde. +// +// Solidity: event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) FilterMint(opts *bind.FilterOpts, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (*IUniswapV3PoolMintIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.FilterLogs(opts, "Mint", ownerRule, tickLowerRule, tickUpperRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolMintIterator{contract: _IUniswapV3Pool.contract, event: "Mint", logs: logs, sub: sub}, nil +} + +// WatchMint is a free log subscription operation binding the contract event 0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde. +// +// Solidity: event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolMint, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.WatchLogs(opts, "Mint", ownerRule, tickLowerRule, tickUpperRule) + 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(IUniswapV3PoolMint) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Mint", 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 +} + +// ParseMint is a log parse operation binding the contract event 0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde. +// +// Solidity: event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) ParseMint(log types.Log) (*IUniswapV3PoolMint, error) { + event := new(IUniswapV3PoolMint) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Mint", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolSetFeeProtocolIterator is returned from FilterSetFeeProtocol and is used to iterate over the raw logs and unpacked data for SetFeeProtocol events raised by the IUniswapV3Pool contract. +type IUniswapV3PoolSetFeeProtocolIterator struct { + Event *IUniswapV3PoolSetFeeProtocol // 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 *IUniswapV3PoolSetFeeProtocolIterator) 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(IUniswapV3PoolSetFeeProtocol) + 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(IUniswapV3PoolSetFeeProtocol) + 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 *IUniswapV3PoolSetFeeProtocolIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolSetFeeProtocolIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolSetFeeProtocol represents a SetFeeProtocol event raised by the IUniswapV3Pool contract. +type IUniswapV3PoolSetFeeProtocol struct { + FeeProtocol0Old uint8 + FeeProtocol1Old uint8 + FeeProtocol0New uint8 + FeeProtocol1New uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetFeeProtocol is a free log retrieval operation binding the contract event 0x973d8d92bb299f4af6ce49b52a8adb85ae46b9f214c4c4fc06ac77401237b133. +// +// Solidity: event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) FilterSetFeeProtocol(opts *bind.FilterOpts) (*IUniswapV3PoolSetFeeProtocolIterator, error) { + + logs, sub, err := _IUniswapV3Pool.contract.FilterLogs(opts, "SetFeeProtocol") + if err != nil { + return nil, err + } + return &IUniswapV3PoolSetFeeProtocolIterator{contract: _IUniswapV3Pool.contract, event: "SetFeeProtocol", logs: logs, sub: sub}, nil +} + +// WatchSetFeeProtocol is a free log subscription operation binding the contract event 0x973d8d92bb299f4af6ce49b52a8adb85ae46b9f214c4c4fc06ac77401237b133. +// +// Solidity: event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) WatchSetFeeProtocol(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolSetFeeProtocol) (event.Subscription, error) { + + logs, sub, err := _IUniswapV3Pool.contract.WatchLogs(opts, "SetFeeProtocol") + 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(IUniswapV3PoolSetFeeProtocol) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "SetFeeProtocol", 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 +} + +// ParseSetFeeProtocol is a log parse operation binding the contract event 0x973d8d92bb299f4af6ce49b52a8adb85ae46b9f214c4c4fc06ac77401237b133. +// +// Solidity: event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) ParseSetFeeProtocol(log types.Log) (*IUniswapV3PoolSetFeeProtocol, error) { + event := new(IUniswapV3PoolSetFeeProtocol) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "SetFeeProtocol", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolSwapIterator is returned from FilterSwap and is used to iterate over the raw logs and unpacked data for Swap events raised by the IUniswapV3Pool contract. +type IUniswapV3PoolSwapIterator struct { + Event *IUniswapV3PoolSwap // 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 *IUniswapV3PoolSwapIterator) 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(IUniswapV3PoolSwap) + 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(IUniswapV3PoolSwap) + 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 *IUniswapV3PoolSwapIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolSwapIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolSwap represents a Swap event raised by the IUniswapV3Pool contract. +type IUniswapV3PoolSwap struct { + Sender common.Address + Recipient common.Address + Amount0 *big.Int + Amount1 *big.Int + SqrtPriceX96 *big.Int + Liquidity *big.Int + Tick *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSwap is a free log retrieval operation binding the contract event 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67. +// +// Solidity: event Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) FilterSwap(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*IUniswapV3PoolSwapIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.FilterLogs(opts, "Swap", senderRule, recipientRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolSwapIterator{contract: _IUniswapV3Pool.contract, event: "Swap", logs: logs, sub: sub}, nil +} + +// WatchSwap is a free log subscription operation binding the contract event 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67. +// +// Solidity: event Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) WatchSwap(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolSwap, sender []common.Address, recipient []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3Pool.contract.WatchLogs(opts, "Swap", senderRule, recipientRule) + 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(IUniswapV3PoolSwap) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Swap", 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 +} + +// ParseSwap is a log parse operation binding the contract event 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67. +// +// Solidity: event Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick) +func (_IUniswapV3Pool *IUniswapV3PoolFilterer) ParseSwap(log types.Log) (*IUniswapV3PoolSwap, error) { + event := new(IUniswapV3PoolSwap) + if err := _IUniswapV3Pool.contract.UnpackLog(event, "Swap", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolactions.sol/iuniswapv3poolactions.go b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolactions.sol/iuniswapv3poolactions.go new file mode 100644 index 0000000000..faa639bc54 --- /dev/null +++ b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolactions.sol/iuniswapv3poolactions.go @@ -0,0 +1,328 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv3poolactions + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV3PoolActionsMetaData contains all meta data concerning the IUniswapV3PoolActions contract. +var IUniswapV3PoolActionsMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"uint128\",\"name\":\"amount0Requested\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1Requested\",\"type\":\"uint128\"}],\"name\":\"collect\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"flash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"observationCardinalityNext\",\"type\":\"uint16\"}],\"name\":\"increaseObservationCardinalityNext\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"zeroForOne\",\"type\":\"bool\"},{\"internalType\":\"int256\",\"name\":\"amountSpecified\",\"type\":\"int256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"amount0\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"amount1\",\"type\":\"int256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IUniswapV3PoolActionsABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV3PoolActionsMetaData.ABI instead. +var IUniswapV3PoolActionsABI = IUniswapV3PoolActionsMetaData.ABI + +// IUniswapV3PoolActions is an auto generated Go binding around an Ethereum contract. +type IUniswapV3PoolActions struct { + IUniswapV3PoolActionsCaller // Read-only binding to the contract + IUniswapV3PoolActionsTransactor // Write-only binding to the contract + IUniswapV3PoolActionsFilterer // Log filterer for contract events +} + +// IUniswapV3PoolActionsCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV3PoolActionsCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolActionsTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV3PoolActionsTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolActionsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV3PoolActionsFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolActionsSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV3PoolActionsSession struct { + Contract *IUniswapV3PoolActions // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolActionsCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV3PoolActionsCallerSession struct { + Contract *IUniswapV3PoolActionsCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV3PoolActionsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV3PoolActionsTransactorSession struct { + Contract *IUniswapV3PoolActionsTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolActionsRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV3PoolActionsRaw struct { + Contract *IUniswapV3PoolActions // Generic contract binding to access the raw methods on +} + +// IUniswapV3PoolActionsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV3PoolActionsCallerRaw struct { + Contract *IUniswapV3PoolActionsCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV3PoolActionsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV3PoolActionsTransactorRaw struct { + Contract *IUniswapV3PoolActionsTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV3PoolActions creates a new instance of IUniswapV3PoolActions, bound to a specific deployed contract. +func NewIUniswapV3PoolActions(address common.Address, backend bind.ContractBackend) (*IUniswapV3PoolActions, error) { + contract, err := bindIUniswapV3PoolActions(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV3PoolActions{IUniswapV3PoolActionsCaller: IUniswapV3PoolActionsCaller{contract: contract}, IUniswapV3PoolActionsTransactor: IUniswapV3PoolActionsTransactor{contract: contract}, IUniswapV3PoolActionsFilterer: IUniswapV3PoolActionsFilterer{contract: contract}}, nil +} + +// NewIUniswapV3PoolActionsCaller creates a new read-only instance of IUniswapV3PoolActions, bound to a specific deployed contract. +func NewIUniswapV3PoolActionsCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV3PoolActionsCaller, error) { + contract, err := bindIUniswapV3PoolActions(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolActionsCaller{contract: contract}, nil +} + +// NewIUniswapV3PoolActionsTransactor creates a new write-only instance of IUniswapV3PoolActions, bound to a specific deployed contract. +func NewIUniswapV3PoolActionsTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV3PoolActionsTransactor, error) { + contract, err := bindIUniswapV3PoolActions(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolActionsTransactor{contract: contract}, nil +} + +// NewIUniswapV3PoolActionsFilterer creates a new log filterer instance of IUniswapV3PoolActions, bound to a specific deployed contract. +func NewIUniswapV3PoolActionsFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV3PoolActionsFilterer, error) { + contract, err := bindIUniswapV3PoolActions(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV3PoolActionsFilterer{contract: contract}, nil +} + +// bindIUniswapV3PoolActions binds a generic wrapper to an already deployed contract. +func bindIUniswapV3PoolActions(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV3PoolActionsMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolActions.Contract.IUniswapV3PoolActionsCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.IUniswapV3PoolActionsTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.IUniswapV3PoolActionsTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolActions.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.contract.Transact(opts, method, params...) +} + +// Burn is a paid mutator transaction binding the contract method 0xa34123a7. +// +// Solidity: function burn(int24 tickLower, int24 tickUpper, uint128 amount) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactor) Burn(opts *bind.TransactOpts, tickLower *big.Int, tickUpper *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolActions.contract.Transact(opts, "burn", tickLower, tickUpper, amount) +} + +// Burn is a paid mutator transaction binding the contract method 0xa34123a7. +// +// Solidity: function burn(int24 tickLower, int24 tickUpper, uint128 amount) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsSession) Burn(tickLower *big.Int, tickUpper *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Burn(&_IUniswapV3PoolActions.TransactOpts, tickLower, tickUpper, amount) +} + +// Burn is a paid mutator transaction binding the contract method 0xa34123a7. +// +// Solidity: function burn(int24 tickLower, int24 tickUpper, uint128 amount) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactorSession) Burn(tickLower *big.Int, tickUpper *big.Int, amount *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Burn(&_IUniswapV3PoolActions.TransactOpts, tickLower, tickUpper, amount) +} + +// Collect is a paid mutator transaction binding the contract method 0x4f1eb3d8. +// +// Solidity: function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactor) Collect(opts *bind.TransactOpts, recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolActions.contract.Transact(opts, "collect", recipient, tickLower, tickUpper, amount0Requested, amount1Requested) +} + +// Collect is a paid mutator transaction binding the contract method 0x4f1eb3d8. +// +// Solidity: function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsSession) Collect(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Collect(&_IUniswapV3PoolActions.TransactOpts, recipient, tickLower, tickUpper, amount0Requested, amount1Requested) +} + +// Collect is a paid mutator transaction binding the contract method 0x4f1eb3d8. +// +// Solidity: function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactorSession) Collect(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Collect(&_IUniswapV3PoolActions.TransactOpts, recipient, tickLower, tickUpper, amount0Requested, amount1Requested) +} + +// Flash is a paid mutator transaction binding the contract method 0x490e6cbc. +// +// Solidity: function flash(address recipient, uint256 amount0, uint256 amount1, bytes data) returns() +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactor) Flash(opts *bind.TransactOpts, recipient common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3PoolActions.contract.Transact(opts, "flash", recipient, amount0, amount1, data) +} + +// Flash is a paid mutator transaction binding the contract method 0x490e6cbc. +// +// Solidity: function flash(address recipient, uint256 amount0, uint256 amount1, bytes data) returns() +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsSession) Flash(recipient common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Flash(&_IUniswapV3PoolActions.TransactOpts, recipient, amount0, amount1, data) +} + +// Flash is a paid mutator transaction binding the contract method 0x490e6cbc. +// +// Solidity: function flash(address recipient, uint256 amount0, uint256 amount1, bytes data) returns() +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactorSession) Flash(recipient common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Flash(&_IUniswapV3PoolActions.TransactOpts, recipient, amount0, amount1, data) +} + +// IncreaseObservationCardinalityNext is a paid mutator transaction binding the contract method 0x32148f67. +// +// Solidity: function increaseObservationCardinalityNext(uint16 observationCardinalityNext) returns() +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactor) IncreaseObservationCardinalityNext(opts *bind.TransactOpts, observationCardinalityNext uint16) (*types.Transaction, error) { + return _IUniswapV3PoolActions.contract.Transact(opts, "increaseObservationCardinalityNext", observationCardinalityNext) +} + +// IncreaseObservationCardinalityNext is a paid mutator transaction binding the contract method 0x32148f67. +// +// Solidity: function increaseObservationCardinalityNext(uint16 observationCardinalityNext) returns() +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsSession) IncreaseObservationCardinalityNext(observationCardinalityNext uint16) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.IncreaseObservationCardinalityNext(&_IUniswapV3PoolActions.TransactOpts, observationCardinalityNext) +} + +// IncreaseObservationCardinalityNext is a paid mutator transaction binding the contract method 0x32148f67. +// +// Solidity: function increaseObservationCardinalityNext(uint16 observationCardinalityNext) returns() +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactorSession) IncreaseObservationCardinalityNext(observationCardinalityNext uint16) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.IncreaseObservationCardinalityNext(&_IUniswapV3PoolActions.TransactOpts, observationCardinalityNext) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf637731d. +// +// Solidity: function initialize(uint160 sqrtPriceX96) returns() +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactor) Initialize(opts *bind.TransactOpts, sqrtPriceX96 *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolActions.contract.Transact(opts, "initialize", sqrtPriceX96) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf637731d. +// +// Solidity: function initialize(uint160 sqrtPriceX96) returns() +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsSession) Initialize(sqrtPriceX96 *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Initialize(&_IUniswapV3PoolActions.TransactOpts, sqrtPriceX96) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf637731d. +// +// Solidity: function initialize(uint160 sqrtPriceX96) returns() +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactorSession) Initialize(sqrtPriceX96 *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Initialize(&_IUniswapV3PoolActions.TransactOpts, sqrtPriceX96) +} + +// Mint is a paid mutator transaction binding the contract method 0x3c8a7d8d. +// +// Solidity: function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes data) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactor) Mint(opts *bind.TransactOpts, recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3PoolActions.contract.Transact(opts, "mint", recipient, tickLower, tickUpper, amount, data) +} + +// Mint is a paid mutator transaction binding the contract method 0x3c8a7d8d. +// +// Solidity: function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes data) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsSession) Mint(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Mint(&_IUniswapV3PoolActions.TransactOpts, recipient, tickLower, tickUpper, amount, data) +} + +// Mint is a paid mutator transaction binding the contract method 0x3c8a7d8d. +// +// Solidity: function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes data) returns(uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactorSession) Mint(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Mint(&_IUniswapV3PoolActions.TransactOpts, recipient, tickLower, tickUpper, amount, data) +} + +// Swap is a paid mutator transaction binding the contract method 0x128acb08. +// +// Solidity: function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes data) returns(int256 amount0, int256 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactor) Swap(opts *bind.TransactOpts, recipient common.Address, zeroForOne bool, amountSpecified *big.Int, sqrtPriceLimitX96 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3PoolActions.contract.Transact(opts, "swap", recipient, zeroForOne, amountSpecified, sqrtPriceLimitX96, data) +} + +// Swap is a paid mutator transaction binding the contract method 0x128acb08. +// +// Solidity: function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes data) returns(int256 amount0, int256 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsSession) Swap(recipient common.Address, zeroForOne bool, amountSpecified *big.Int, sqrtPriceLimitX96 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Swap(&_IUniswapV3PoolActions.TransactOpts, recipient, zeroForOne, amountSpecified, sqrtPriceLimitX96, data) +} + +// Swap is a paid mutator transaction binding the contract method 0x128acb08. +// +// Solidity: function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes data) returns(int256 amount0, int256 amount1) +func (_IUniswapV3PoolActions *IUniswapV3PoolActionsTransactorSession) Swap(recipient common.Address, zeroForOne bool, amountSpecified *big.Int, sqrtPriceLimitX96 *big.Int, data []byte) (*types.Transaction, error) { + return _IUniswapV3PoolActions.Contract.Swap(&_IUniswapV3PoolActions.TransactOpts, recipient, zeroForOne, amountSpecified, sqrtPriceLimitX96, data) +} diff --git a/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolderivedstate.sol/iuniswapv3poolderivedstate.go b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolderivedstate.sol/iuniswapv3poolderivedstate.go new file mode 100644 index 0000000000..efcbc37ae3 --- /dev/null +++ b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolderivedstate.sol/iuniswapv3poolderivedstate.go @@ -0,0 +1,276 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv3poolderivedstate + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV3PoolDerivedStateMetaData contains all meta data concerning the IUniswapV3PoolDerivedState contract. +var IUniswapV3PoolDerivedStateMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"secondsAgos\",\"type\":\"uint32[]\"}],\"name\":\"observe\",\"outputs\":[{\"internalType\":\"int56[]\",\"name\":\"tickCumulatives\",\"type\":\"int56[]\"},{\"internalType\":\"uint160[]\",\"name\":\"secondsPerLiquidityCumulativeX128s\",\"type\":\"uint160[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"}],\"name\":\"snapshotCumulativesInside\",\"outputs\":[{\"internalType\":\"int56\",\"name\":\"tickCumulativeInside\",\"type\":\"int56\"},{\"internalType\":\"uint160\",\"name\":\"secondsPerLiquidityInsideX128\",\"type\":\"uint160\"},{\"internalType\":\"uint32\",\"name\":\"secondsInside\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +} + +// IUniswapV3PoolDerivedStateABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV3PoolDerivedStateMetaData.ABI instead. +var IUniswapV3PoolDerivedStateABI = IUniswapV3PoolDerivedStateMetaData.ABI + +// IUniswapV3PoolDerivedState is an auto generated Go binding around an Ethereum contract. +type IUniswapV3PoolDerivedState struct { + IUniswapV3PoolDerivedStateCaller // Read-only binding to the contract + IUniswapV3PoolDerivedStateTransactor // Write-only binding to the contract + IUniswapV3PoolDerivedStateFilterer // Log filterer for contract events +} + +// IUniswapV3PoolDerivedStateCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV3PoolDerivedStateCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolDerivedStateTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV3PoolDerivedStateTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolDerivedStateFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV3PoolDerivedStateFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolDerivedStateSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV3PoolDerivedStateSession struct { + Contract *IUniswapV3PoolDerivedState // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolDerivedStateCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV3PoolDerivedStateCallerSession struct { + Contract *IUniswapV3PoolDerivedStateCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV3PoolDerivedStateTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV3PoolDerivedStateTransactorSession struct { + Contract *IUniswapV3PoolDerivedStateTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolDerivedStateRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV3PoolDerivedStateRaw struct { + Contract *IUniswapV3PoolDerivedState // Generic contract binding to access the raw methods on +} + +// IUniswapV3PoolDerivedStateCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV3PoolDerivedStateCallerRaw struct { + Contract *IUniswapV3PoolDerivedStateCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV3PoolDerivedStateTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV3PoolDerivedStateTransactorRaw struct { + Contract *IUniswapV3PoolDerivedStateTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV3PoolDerivedState creates a new instance of IUniswapV3PoolDerivedState, bound to a specific deployed contract. +func NewIUniswapV3PoolDerivedState(address common.Address, backend bind.ContractBackend) (*IUniswapV3PoolDerivedState, error) { + contract, err := bindIUniswapV3PoolDerivedState(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV3PoolDerivedState{IUniswapV3PoolDerivedStateCaller: IUniswapV3PoolDerivedStateCaller{contract: contract}, IUniswapV3PoolDerivedStateTransactor: IUniswapV3PoolDerivedStateTransactor{contract: contract}, IUniswapV3PoolDerivedStateFilterer: IUniswapV3PoolDerivedStateFilterer{contract: contract}}, nil +} + +// NewIUniswapV3PoolDerivedStateCaller creates a new read-only instance of IUniswapV3PoolDerivedState, bound to a specific deployed contract. +func NewIUniswapV3PoolDerivedStateCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV3PoolDerivedStateCaller, error) { + contract, err := bindIUniswapV3PoolDerivedState(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolDerivedStateCaller{contract: contract}, nil +} + +// NewIUniswapV3PoolDerivedStateTransactor creates a new write-only instance of IUniswapV3PoolDerivedState, bound to a specific deployed contract. +func NewIUniswapV3PoolDerivedStateTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV3PoolDerivedStateTransactor, error) { + contract, err := bindIUniswapV3PoolDerivedState(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolDerivedStateTransactor{contract: contract}, nil +} + +// NewIUniswapV3PoolDerivedStateFilterer creates a new log filterer instance of IUniswapV3PoolDerivedState, bound to a specific deployed contract. +func NewIUniswapV3PoolDerivedStateFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV3PoolDerivedStateFilterer, error) { + contract, err := bindIUniswapV3PoolDerivedState(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV3PoolDerivedStateFilterer{contract: contract}, nil +} + +// bindIUniswapV3PoolDerivedState binds a generic wrapper to an already deployed contract. +func bindIUniswapV3PoolDerivedState(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV3PoolDerivedStateMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolDerivedState.Contract.IUniswapV3PoolDerivedStateCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolDerivedState.Contract.IUniswapV3PoolDerivedStateTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolDerivedState.Contract.IUniswapV3PoolDerivedStateTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolDerivedState.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolDerivedState.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolDerivedState.Contract.contract.Transact(opts, method, params...) +} + +// Observe is a free data retrieval call binding the contract method 0x883bdbfd. +// +// Solidity: function observe(uint32[] secondsAgos) view returns(int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulativeX128s) +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateCaller) Observe(opts *bind.CallOpts, secondsAgos []uint32) (struct { + TickCumulatives []*big.Int + SecondsPerLiquidityCumulativeX128s []*big.Int +}, error) { + var out []interface{} + err := _IUniswapV3PoolDerivedState.contract.Call(opts, &out, "observe", secondsAgos) + + outstruct := new(struct { + TickCumulatives []*big.Int + SecondsPerLiquidityCumulativeX128s []*big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.TickCumulatives = *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + outstruct.SecondsPerLiquidityCumulativeX128s = *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int) + + return *outstruct, err + +} + +// Observe is a free data retrieval call binding the contract method 0x883bdbfd. +// +// Solidity: function observe(uint32[] secondsAgos) view returns(int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulativeX128s) +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateSession) Observe(secondsAgos []uint32) (struct { + TickCumulatives []*big.Int + SecondsPerLiquidityCumulativeX128s []*big.Int +}, error) { + return _IUniswapV3PoolDerivedState.Contract.Observe(&_IUniswapV3PoolDerivedState.CallOpts, secondsAgos) +} + +// Observe is a free data retrieval call binding the contract method 0x883bdbfd. +// +// Solidity: function observe(uint32[] secondsAgos) view returns(int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulativeX128s) +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateCallerSession) Observe(secondsAgos []uint32) (struct { + TickCumulatives []*big.Int + SecondsPerLiquidityCumulativeX128s []*big.Int +}, error) { + return _IUniswapV3PoolDerivedState.Contract.Observe(&_IUniswapV3PoolDerivedState.CallOpts, secondsAgos) +} + +// SnapshotCumulativesInside is a free data retrieval call binding the contract method 0xa38807f2. +// +// Solidity: function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) view returns(int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside) +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateCaller) SnapshotCumulativesInside(opts *bind.CallOpts, tickLower *big.Int, tickUpper *big.Int) (struct { + TickCumulativeInside *big.Int + SecondsPerLiquidityInsideX128 *big.Int + SecondsInside uint32 +}, error) { + var out []interface{} + err := _IUniswapV3PoolDerivedState.contract.Call(opts, &out, "snapshotCumulativesInside", tickLower, tickUpper) + + outstruct := new(struct { + TickCumulativeInside *big.Int + SecondsPerLiquidityInsideX128 *big.Int + SecondsInside uint32 + }) + if err != nil { + return *outstruct, err + } + + outstruct.TickCumulativeInside = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.SecondsPerLiquidityInsideX128 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.SecondsInside = *abi.ConvertType(out[2], new(uint32)).(*uint32) + + return *outstruct, err + +} + +// SnapshotCumulativesInside is a free data retrieval call binding the contract method 0xa38807f2. +// +// Solidity: function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) view returns(int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside) +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateSession) SnapshotCumulativesInside(tickLower *big.Int, tickUpper *big.Int) (struct { + TickCumulativeInside *big.Int + SecondsPerLiquidityInsideX128 *big.Int + SecondsInside uint32 +}, error) { + return _IUniswapV3PoolDerivedState.Contract.SnapshotCumulativesInside(&_IUniswapV3PoolDerivedState.CallOpts, tickLower, tickUpper) +} + +// SnapshotCumulativesInside is a free data retrieval call binding the contract method 0xa38807f2. +// +// Solidity: function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) view returns(int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside) +func (_IUniswapV3PoolDerivedState *IUniswapV3PoolDerivedStateCallerSession) SnapshotCumulativesInside(tickLower *big.Int, tickUpper *big.Int) (struct { + TickCumulativeInside *big.Int + SecondsPerLiquidityInsideX128 *big.Int + SecondsInside uint32 +}, error) { + return _IUniswapV3PoolDerivedState.Contract.SnapshotCumulativesInside(&_IUniswapV3PoolDerivedState.CallOpts, tickLower, tickUpper) +} diff --git a/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolevents.sol/iuniswapv3poolevents.go b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolevents.sol/iuniswapv3poolevents.go new file mode 100644 index 0000000000..36eaf690f0 --- /dev/null +++ b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolevents.sol/iuniswapv3poolevents.go @@ -0,0 +1,1556 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv3poolevents + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV3PoolEventsMetaData contains all meta data concerning the IUniswapV3PoolEvents contract. +var IUniswapV3PoolEventsMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"name\":\"Collect\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"name\":\"CollectProtocol\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"paid0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"paid1\",\"type\":\"uint256\"}],\"name\":\"Flash\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"observationCardinalityNextOld\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"observationCardinalityNextNew\",\"type\":\"uint16\"}],\"name\":\"IncreaseObservationCardinalityNext\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"},{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"}],\"name\":\"Initialize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol0Old\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol1Old\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol0New\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol1New\",\"type\":\"uint8\"}],\"name\":\"SetFeeProtocol\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"amount0\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"amount1\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"liquidity\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"}],\"name\":\"Swap\",\"type\":\"event\"}]", +} + +// IUniswapV3PoolEventsABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV3PoolEventsMetaData.ABI instead. +var IUniswapV3PoolEventsABI = IUniswapV3PoolEventsMetaData.ABI + +// IUniswapV3PoolEvents is an auto generated Go binding around an Ethereum contract. +type IUniswapV3PoolEvents struct { + IUniswapV3PoolEventsCaller // Read-only binding to the contract + IUniswapV3PoolEventsTransactor // Write-only binding to the contract + IUniswapV3PoolEventsFilterer // Log filterer for contract events +} + +// IUniswapV3PoolEventsCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV3PoolEventsCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolEventsTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV3PoolEventsTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolEventsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV3PoolEventsFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolEventsSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV3PoolEventsSession struct { + Contract *IUniswapV3PoolEvents // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolEventsCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV3PoolEventsCallerSession struct { + Contract *IUniswapV3PoolEventsCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV3PoolEventsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV3PoolEventsTransactorSession struct { + Contract *IUniswapV3PoolEventsTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolEventsRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV3PoolEventsRaw struct { + Contract *IUniswapV3PoolEvents // Generic contract binding to access the raw methods on +} + +// IUniswapV3PoolEventsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV3PoolEventsCallerRaw struct { + Contract *IUniswapV3PoolEventsCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV3PoolEventsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV3PoolEventsTransactorRaw struct { + Contract *IUniswapV3PoolEventsTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV3PoolEvents creates a new instance of IUniswapV3PoolEvents, bound to a specific deployed contract. +func NewIUniswapV3PoolEvents(address common.Address, backend bind.ContractBackend) (*IUniswapV3PoolEvents, error) { + contract, err := bindIUniswapV3PoolEvents(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV3PoolEvents{IUniswapV3PoolEventsCaller: IUniswapV3PoolEventsCaller{contract: contract}, IUniswapV3PoolEventsTransactor: IUniswapV3PoolEventsTransactor{contract: contract}, IUniswapV3PoolEventsFilterer: IUniswapV3PoolEventsFilterer{contract: contract}}, nil +} + +// NewIUniswapV3PoolEventsCaller creates a new read-only instance of IUniswapV3PoolEvents, bound to a specific deployed contract. +func NewIUniswapV3PoolEventsCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV3PoolEventsCaller, error) { + contract, err := bindIUniswapV3PoolEvents(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsCaller{contract: contract}, nil +} + +// NewIUniswapV3PoolEventsTransactor creates a new write-only instance of IUniswapV3PoolEvents, bound to a specific deployed contract. +func NewIUniswapV3PoolEventsTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV3PoolEventsTransactor, error) { + contract, err := bindIUniswapV3PoolEvents(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsTransactor{contract: contract}, nil +} + +// NewIUniswapV3PoolEventsFilterer creates a new log filterer instance of IUniswapV3PoolEvents, bound to a specific deployed contract. +func NewIUniswapV3PoolEventsFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV3PoolEventsFilterer, error) { + contract, err := bindIUniswapV3PoolEvents(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsFilterer{contract: contract}, nil +} + +// bindIUniswapV3PoolEvents binds a generic wrapper to an already deployed contract. +func bindIUniswapV3PoolEvents(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV3PoolEventsMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolEvents.Contract.IUniswapV3PoolEventsCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolEvents.Contract.IUniswapV3PoolEventsTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolEvents.Contract.IUniswapV3PoolEventsTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolEvents.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolEvents.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolEvents.Contract.contract.Transact(opts, method, params...) +} + +// IUniswapV3PoolEventsBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsBurnIterator struct { + Event *IUniswapV3PoolEventsBurn // 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 *IUniswapV3PoolEventsBurnIterator) 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(IUniswapV3PoolEventsBurn) + 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(IUniswapV3PoolEventsBurn) + 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 *IUniswapV3PoolEventsBurnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolEventsBurnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolEventsBurn represents a Burn event raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsBurn struct { + Owner common.Address + TickLower *big.Int + TickUpper *big.Int + Amount *big.Int + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBurn is a free log retrieval operation binding the contract event 0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c. +// +// Solidity: event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) FilterBurn(opts *bind.FilterOpts, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (*IUniswapV3PoolEventsBurnIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.FilterLogs(opts, "Burn", ownerRule, tickLowerRule, tickUpperRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsBurnIterator{contract: _IUniswapV3PoolEvents.contract, event: "Burn", logs: logs, sub: sub}, nil +} + +// WatchBurn is a free log subscription operation binding the contract event 0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c. +// +// Solidity: event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolEventsBurn, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.WatchLogs(opts, "Burn", ownerRule, tickLowerRule, tickUpperRule) + 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(IUniswapV3PoolEventsBurn) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Burn", 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 +} + +// ParseBurn is a log parse operation binding the contract event 0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c. +// +// Solidity: event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) ParseBurn(log types.Log) (*IUniswapV3PoolEventsBurn, error) { + event := new(IUniswapV3PoolEventsBurn) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Burn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolEventsCollectIterator is returned from FilterCollect and is used to iterate over the raw logs and unpacked data for Collect events raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsCollectIterator struct { + Event *IUniswapV3PoolEventsCollect // 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 *IUniswapV3PoolEventsCollectIterator) 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(IUniswapV3PoolEventsCollect) + 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(IUniswapV3PoolEventsCollect) + 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 *IUniswapV3PoolEventsCollectIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolEventsCollectIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolEventsCollect represents a Collect event raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsCollect struct { + Owner common.Address + Recipient common.Address + TickLower *big.Int + TickUpper *big.Int + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollect is a free log retrieval operation binding the contract event 0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0. +// +// Solidity: event Collect(address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) FilterCollect(opts *bind.FilterOpts, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (*IUniswapV3PoolEventsCollectIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.FilterLogs(opts, "Collect", ownerRule, tickLowerRule, tickUpperRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsCollectIterator{contract: _IUniswapV3PoolEvents.contract, event: "Collect", logs: logs, sub: sub}, nil +} + +// WatchCollect is a free log subscription operation binding the contract event 0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0. +// +// Solidity: event Collect(address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) WatchCollect(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolEventsCollect, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.WatchLogs(opts, "Collect", ownerRule, tickLowerRule, tickUpperRule) + 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(IUniswapV3PoolEventsCollect) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Collect", 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 +} + +// ParseCollect is a log parse operation binding the contract event 0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0. +// +// Solidity: event Collect(address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) ParseCollect(log types.Log) (*IUniswapV3PoolEventsCollect, error) { + event := new(IUniswapV3PoolEventsCollect) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Collect", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolEventsCollectProtocolIterator is returned from FilterCollectProtocol and is used to iterate over the raw logs and unpacked data for CollectProtocol events raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsCollectProtocolIterator struct { + Event *IUniswapV3PoolEventsCollectProtocol // 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 *IUniswapV3PoolEventsCollectProtocolIterator) 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(IUniswapV3PoolEventsCollectProtocol) + 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(IUniswapV3PoolEventsCollectProtocol) + 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 *IUniswapV3PoolEventsCollectProtocolIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolEventsCollectProtocolIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolEventsCollectProtocol represents a CollectProtocol event raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsCollectProtocol struct { + Sender common.Address + Recipient common.Address + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollectProtocol is a free log retrieval operation binding the contract event 0x596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151. +// +// Solidity: event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) FilterCollectProtocol(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*IUniswapV3PoolEventsCollectProtocolIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.FilterLogs(opts, "CollectProtocol", senderRule, recipientRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsCollectProtocolIterator{contract: _IUniswapV3PoolEvents.contract, event: "CollectProtocol", logs: logs, sub: sub}, nil +} + +// WatchCollectProtocol is a free log subscription operation binding the contract event 0x596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151. +// +// Solidity: event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) WatchCollectProtocol(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolEventsCollectProtocol, sender []common.Address, recipient []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.WatchLogs(opts, "CollectProtocol", senderRule, recipientRule) + 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(IUniswapV3PoolEventsCollectProtocol) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "CollectProtocol", 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 +} + +// ParseCollectProtocol is a log parse operation binding the contract event 0x596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151. +// +// Solidity: event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) ParseCollectProtocol(log types.Log) (*IUniswapV3PoolEventsCollectProtocol, error) { + event := new(IUniswapV3PoolEventsCollectProtocol) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "CollectProtocol", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolEventsFlashIterator is returned from FilterFlash and is used to iterate over the raw logs and unpacked data for Flash events raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsFlashIterator struct { + Event *IUniswapV3PoolEventsFlash // 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 *IUniswapV3PoolEventsFlashIterator) 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(IUniswapV3PoolEventsFlash) + 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(IUniswapV3PoolEventsFlash) + 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 *IUniswapV3PoolEventsFlashIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolEventsFlashIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolEventsFlash represents a Flash event raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsFlash struct { + Sender common.Address + Recipient common.Address + Amount0 *big.Int + Amount1 *big.Int + Paid0 *big.Int + Paid1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFlash is a free log retrieval operation binding the contract event 0xbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca633. +// +// Solidity: event Flash(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) FilterFlash(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*IUniswapV3PoolEventsFlashIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.FilterLogs(opts, "Flash", senderRule, recipientRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsFlashIterator{contract: _IUniswapV3PoolEvents.contract, event: "Flash", logs: logs, sub: sub}, nil +} + +// WatchFlash is a free log subscription operation binding the contract event 0xbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca633. +// +// Solidity: event Flash(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) WatchFlash(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolEventsFlash, sender []common.Address, recipient []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.WatchLogs(opts, "Flash", senderRule, recipientRule) + 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(IUniswapV3PoolEventsFlash) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Flash", 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 +} + +// ParseFlash is a log parse operation binding the contract event 0xbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca633. +// +// Solidity: event Flash(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) ParseFlash(log types.Log) (*IUniswapV3PoolEventsFlash, error) { + event := new(IUniswapV3PoolEventsFlash) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Flash", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolEventsIncreaseObservationCardinalityNextIterator is returned from FilterIncreaseObservationCardinalityNext and is used to iterate over the raw logs and unpacked data for IncreaseObservationCardinalityNext events raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsIncreaseObservationCardinalityNextIterator struct { + Event *IUniswapV3PoolEventsIncreaseObservationCardinalityNext // 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 *IUniswapV3PoolEventsIncreaseObservationCardinalityNextIterator) 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(IUniswapV3PoolEventsIncreaseObservationCardinalityNext) + 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(IUniswapV3PoolEventsIncreaseObservationCardinalityNext) + 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 *IUniswapV3PoolEventsIncreaseObservationCardinalityNextIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolEventsIncreaseObservationCardinalityNextIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolEventsIncreaseObservationCardinalityNext represents a IncreaseObservationCardinalityNext event raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsIncreaseObservationCardinalityNext struct { + ObservationCardinalityNextOld uint16 + ObservationCardinalityNextNew uint16 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterIncreaseObservationCardinalityNext is a free log retrieval operation binding the contract event 0xac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a. +// +// Solidity: event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) FilterIncreaseObservationCardinalityNext(opts *bind.FilterOpts) (*IUniswapV3PoolEventsIncreaseObservationCardinalityNextIterator, error) { + + logs, sub, err := _IUniswapV3PoolEvents.contract.FilterLogs(opts, "IncreaseObservationCardinalityNext") + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsIncreaseObservationCardinalityNextIterator{contract: _IUniswapV3PoolEvents.contract, event: "IncreaseObservationCardinalityNext", logs: logs, sub: sub}, nil +} + +// WatchIncreaseObservationCardinalityNext is a free log subscription operation binding the contract event 0xac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a. +// +// Solidity: event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) WatchIncreaseObservationCardinalityNext(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolEventsIncreaseObservationCardinalityNext) (event.Subscription, error) { + + logs, sub, err := _IUniswapV3PoolEvents.contract.WatchLogs(opts, "IncreaseObservationCardinalityNext") + 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(IUniswapV3PoolEventsIncreaseObservationCardinalityNext) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "IncreaseObservationCardinalityNext", 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 +} + +// ParseIncreaseObservationCardinalityNext is a log parse operation binding the contract event 0xac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a. +// +// Solidity: event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) ParseIncreaseObservationCardinalityNext(log types.Log) (*IUniswapV3PoolEventsIncreaseObservationCardinalityNext, error) { + event := new(IUniswapV3PoolEventsIncreaseObservationCardinalityNext) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "IncreaseObservationCardinalityNext", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolEventsInitializeIterator is returned from FilterInitialize and is used to iterate over the raw logs and unpacked data for Initialize events raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsInitializeIterator struct { + Event *IUniswapV3PoolEventsInitialize // 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 *IUniswapV3PoolEventsInitializeIterator) 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(IUniswapV3PoolEventsInitialize) + 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(IUniswapV3PoolEventsInitialize) + 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 *IUniswapV3PoolEventsInitializeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolEventsInitializeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolEventsInitialize represents a Initialize event raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsInitialize struct { + SqrtPriceX96 *big.Int + Tick *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialize is a free log retrieval operation binding the contract event 0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95. +// +// Solidity: event Initialize(uint160 sqrtPriceX96, int24 tick) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) FilterInitialize(opts *bind.FilterOpts) (*IUniswapV3PoolEventsInitializeIterator, error) { + + logs, sub, err := _IUniswapV3PoolEvents.contract.FilterLogs(opts, "Initialize") + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsInitializeIterator{contract: _IUniswapV3PoolEvents.contract, event: "Initialize", logs: logs, sub: sub}, nil +} + +// WatchInitialize is a free log subscription operation binding the contract event 0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95. +// +// Solidity: event Initialize(uint160 sqrtPriceX96, int24 tick) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) WatchInitialize(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolEventsInitialize) (event.Subscription, error) { + + logs, sub, err := _IUniswapV3PoolEvents.contract.WatchLogs(opts, "Initialize") + 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(IUniswapV3PoolEventsInitialize) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Initialize", 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 +} + +// ParseInitialize is a log parse operation binding the contract event 0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95. +// +// Solidity: event Initialize(uint160 sqrtPriceX96, int24 tick) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) ParseInitialize(log types.Log) (*IUniswapV3PoolEventsInitialize, error) { + event := new(IUniswapV3PoolEventsInitialize) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Initialize", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolEventsMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsMintIterator struct { + Event *IUniswapV3PoolEventsMint // 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 *IUniswapV3PoolEventsMintIterator) 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(IUniswapV3PoolEventsMint) + 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(IUniswapV3PoolEventsMint) + 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 *IUniswapV3PoolEventsMintIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolEventsMintIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolEventsMint represents a Mint event raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsMint struct { + Sender common.Address + Owner common.Address + TickLower *big.Int + TickUpper *big.Int + Amount *big.Int + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMint is a free log retrieval operation binding the contract event 0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde. +// +// Solidity: event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) FilterMint(opts *bind.FilterOpts, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (*IUniswapV3PoolEventsMintIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.FilterLogs(opts, "Mint", ownerRule, tickLowerRule, tickUpperRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsMintIterator{contract: _IUniswapV3PoolEvents.contract, event: "Mint", logs: logs, sub: sub}, nil +} + +// WatchMint is a free log subscription operation binding the contract event 0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde. +// +// Solidity: event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolEventsMint, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var tickLowerRule []interface{} + for _, tickLowerItem := range tickLower { + tickLowerRule = append(tickLowerRule, tickLowerItem) + } + var tickUpperRule []interface{} + for _, tickUpperItem := range tickUpper { + tickUpperRule = append(tickUpperRule, tickUpperItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.WatchLogs(opts, "Mint", ownerRule, tickLowerRule, tickUpperRule) + 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(IUniswapV3PoolEventsMint) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Mint", 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 +} + +// ParseMint is a log parse operation binding the contract event 0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde. +// +// Solidity: event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) ParseMint(log types.Log) (*IUniswapV3PoolEventsMint, error) { + event := new(IUniswapV3PoolEventsMint) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Mint", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolEventsSetFeeProtocolIterator is returned from FilterSetFeeProtocol and is used to iterate over the raw logs and unpacked data for SetFeeProtocol events raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsSetFeeProtocolIterator struct { + Event *IUniswapV3PoolEventsSetFeeProtocol // 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 *IUniswapV3PoolEventsSetFeeProtocolIterator) 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(IUniswapV3PoolEventsSetFeeProtocol) + 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(IUniswapV3PoolEventsSetFeeProtocol) + 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 *IUniswapV3PoolEventsSetFeeProtocolIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolEventsSetFeeProtocolIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolEventsSetFeeProtocol represents a SetFeeProtocol event raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsSetFeeProtocol struct { + FeeProtocol0Old uint8 + FeeProtocol1Old uint8 + FeeProtocol0New uint8 + FeeProtocol1New uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetFeeProtocol is a free log retrieval operation binding the contract event 0x973d8d92bb299f4af6ce49b52a8adb85ae46b9f214c4c4fc06ac77401237b133. +// +// Solidity: event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) FilterSetFeeProtocol(opts *bind.FilterOpts) (*IUniswapV3PoolEventsSetFeeProtocolIterator, error) { + + logs, sub, err := _IUniswapV3PoolEvents.contract.FilterLogs(opts, "SetFeeProtocol") + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsSetFeeProtocolIterator{contract: _IUniswapV3PoolEvents.contract, event: "SetFeeProtocol", logs: logs, sub: sub}, nil +} + +// WatchSetFeeProtocol is a free log subscription operation binding the contract event 0x973d8d92bb299f4af6ce49b52a8adb85ae46b9f214c4c4fc06ac77401237b133. +// +// Solidity: event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) WatchSetFeeProtocol(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolEventsSetFeeProtocol) (event.Subscription, error) { + + logs, sub, err := _IUniswapV3PoolEvents.contract.WatchLogs(opts, "SetFeeProtocol") + 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(IUniswapV3PoolEventsSetFeeProtocol) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "SetFeeProtocol", 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 +} + +// ParseSetFeeProtocol is a log parse operation binding the contract event 0x973d8d92bb299f4af6ce49b52a8adb85ae46b9f214c4c4fc06ac77401237b133. +// +// Solidity: event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) ParseSetFeeProtocol(log types.Log) (*IUniswapV3PoolEventsSetFeeProtocol, error) { + event := new(IUniswapV3PoolEventsSetFeeProtocol) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "SetFeeProtocol", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IUniswapV3PoolEventsSwapIterator is returned from FilterSwap and is used to iterate over the raw logs and unpacked data for Swap events raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsSwapIterator struct { + Event *IUniswapV3PoolEventsSwap // 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 *IUniswapV3PoolEventsSwapIterator) 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(IUniswapV3PoolEventsSwap) + 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(IUniswapV3PoolEventsSwap) + 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 *IUniswapV3PoolEventsSwapIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IUniswapV3PoolEventsSwapIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IUniswapV3PoolEventsSwap represents a Swap event raised by the IUniswapV3PoolEvents contract. +type IUniswapV3PoolEventsSwap struct { + Sender common.Address + Recipient common.Address + Amount0 *big.Int + Amount1 *big.Int + SqrtPriceX96 *big.Int + Liquidity *big.Int + Tick *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSwap is a free log retrieval operation binding the contract event 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67. +// +// Solidity: event Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) FilterSwap(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*IUniswapV3PoolEventsSwapIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.FilterLogs(opts, "Swap", senderRule, recipientRule) + if err != nil { + return nil, err + } + return &IUniswapV3PoolEventsSwapIterator{contract: _IUniswapV3PoolEvents.contract, event: "Swap", logs: logs, sub: sub}, nil +} + +// WatchSwap is a free log subscription operation binding the contract event 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67. +// +// Solidity: event Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) WatchSwap(opts *bind.WatchOpts, sink chan<- *IUniswapV3PoolEventsSwap, sender []common.Address, recipient []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _IUniswapV3PoolEvents.contract.WatchLogs(opts, "Swap", senderRule, recipientRule) + 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(IUniswapV3PoolEventsSwap) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Swap", 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 +} + +// ParseSwap is a log parse operation binding the contract event 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67. +// +// Solidity: event Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick) +func (_IUniswapV3PoolEvents *IUniswapV3PoolEventsFilterer) ParseSwap(log types.Log) (*IUniswapV3PoolEventsSwap, error) { + event := new(IUniswapV3PoolEventsSwap) + if err := _IUniswapV3PoolEvents.contract.UnpackLog(event, "Swap", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolimmutables.sol/iuniswapv3poolimmutables.go b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolimmutables.sol/iuniswapv3poolimmutables.go new file mode 100644 index 0000000000..9126c9dbe3 --- /dev/null +++ b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolimmutables.sol/iuniswapv3poolimmutables.go @@ -0,0 +1,367 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv3poolimmutables + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV3PoolImmutablesMetaData contains all meta data concerning the IUniswapV3PoolImmutables contract. +var IUniswapV3PoolImmutablesMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint24\",\"name\":\"\",\"type\":\"uint24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxLiquidityPerTick\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tickSpacing\",\"outputs\":[{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token0\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token1\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +} + +// IUniswapV3PoolImmutablesABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV3PoolImmutablesMetaData.ABI instead. +var IUniswapV3PoolImmutablesABI = IUniswapV3PoolImmutablesMetaData.ABI + +// IUniswapV3PoolImmutables is an auto generated Go binding around an Ethereum contract. +type IUniswapV3PoolImmutables struct { + IUniswapV3PoolImmutablesCaller // Read-only binding to the contract + IUniswapV3PoolImmutablesTransactor // Write-only binding to the contract + IUniswapV3PoolImmutablesFilterer // Log filterer for contract events +} + +// IUniswapV3PoolImmutablesCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV3PoolImmutablesCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolImmutablesTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV3PoolImmutablesTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolImmutablesFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV3PoolImmutablesFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolImmutablesSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV3PoolImmutablesSession struct { + Contract *IUniswapV3PoolImmutables // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolImmutablesCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV3PoolImmutablesCallerSession struct { + Contract *IUniswapV3PoolImmutablesCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV3PoolImmutablesTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV3PoolImmutablesTransactorSession struct { + Contract *IUniswapV3PoolImmutablesTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolImmutablesRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV3PoolImmutablesRaw struct { + Contract *IUniswapV3PoolImmutables // Generic contract binding to access the raw methods on +} + +// IUniswapV3PoolImmutablesCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV3PoolImmutablesCallerRaw struct { + Contract *IUniswapV3PoolImmutablesCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV3PoolImmutablesTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV3PoolImmutablesTransactorRaw struct { + Contract *IUniswapV3PoolImmutablesTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV3PoolImmutables creates a new instance of IUniswapV3PoolImmutables, bound to a specific deployed contract. +func NewIUniswapV3PoolImmutables(address common.Address, backend bind.ContractBackend) (*IUniswapV3PoolImmutables, error) { + contract, err := bindIUniswapV3PoolImmutables(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV3PoolImmutables{IUniswapV3PoolImmutablesCaller: IUniswapV3PoolImmutablesCaller{contract: contract}, IUniswapV3PoolImmutablesTransactor: IUniswapV3PoolImmutablesTransactor{contract: contract}, IUniswapV3PoolImmutablesFilterer: IUniswapV3PoolImmutablesFilterer{contract: contract}}, nil +} + +// NewIUniswapV3PoolImmutablesCaller creates a new read-only instance of IUniswapV3PoolImmutables, bound to a specific deployed contract. +func NewIUniswapV3PoolImmutablesCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV3PoolImmutablesCaller, error) { + contract, err := bindIUniswapV3PoolImmutables(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolImmutablesCaller{contract: contract}, nil +} + +// NewIUniswapV3PoolImmutablesTransactor creates a new write-only instance of IUniswapV3PoolImmutables, bound to a specific deployed contract. +func NewIUniswapV3PoolImmutablesTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV3PoolImmutablesTransactor, error) { + contract, err := bindIUniswapV3PoolImmutables(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolImmutablesTransactor{contract: contract}, nil +} + +// NewIUniswapV3PoolImmutablesFilterer creates a new log filterer instance of IUniswapV3PoolImmutables, bound to a specific deployed contract. +func NewIUniswapV3PoolImmutablesFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV3PoolImmutablesFilterer, error) { + contract, err := bindIUniswapV3PoolImmutables(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV3PoolImmutablesFilterer{contract: contract}, nil +} + +// bindIUniswapV3PoolImmutables binds a generic wrapper to an already deployed contract. +func bindIUniswapV3PoolImmutables(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV3PoolImmutablesMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolImmutables.Contract.IUniswapV3PoolImmutablesCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolImmutables.Contract.IUniswapV3PoolImmutablesTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolImmutables.Contract.IUniswapV3PoolImmutablesTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolImmutables.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolImmutables.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolImmutables.Contract.contract.Transact(opts, method, params...) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCaller) Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV3PoolImmutables.contract.Call(opts, &out, "factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesSession) Factory() (common.Address, error) { + return _IUniswapV3PoolImmutables.Contract.Factory(&_IUniswapV3PoolImmutables.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCallerSession) Factory() (common.Address, error) { + return _IUniswapV3PoolImmutables.Contract.Factory(&_IUniswapV3PoolImmutables.CallOpts) +} + +// Fee is a free data retrieval call binding the contract method 0xddca3f43. +// +// Solidity: function fee() view returns(uint24) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCaller) Fee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3PoolImmutables.contract.Call(opts, &out, "fee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Fee is a free data retrieval call binding the contract method 0xddca3f43. +// +// Solidity: function fee() view returns(uint24) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesSession) Fee() (*big.Int, error) { + return _IUniswapV3PoolImmutables.Contract.Fee(&_IUniswapV3PoolImmutables.CallOpts) +} + +// Fee is a free data retrieval call binding the contract method 0xddca3f43. +// +// Solidity: function fee() view returns(uint24) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCallerSession) Fee() (*big.Int, error) { + return _IUniswapV3PoolImmutables.Contract.Fee(&_IUniswapV3PoolImmutables.CallOpts) +} + +// MaxLiquidityPerTick is a free data retrieval call binding the contract method 0x70cf754a. +// +// Solidity: function maxLiquidityPerTick() view returns(uint128) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCaller) MaxLiquidityPerTick(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3PoolImmutables.contract.Call(opts, &out, "maxLiquidityPerTick") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MaxLiquidityPerTick is a free data retrieval call binding the contract method 0x70cf754a. +// +// Solidity: function maxLiquidityPerTick() view returns(uint128) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesSession) MaxLiquidityPerTick() (*big.Int, error) { + return _IUniswapV3PoolImmutables.Contract.MaxLiquidityPerTick(&_IUniswapV3PoolImmutables.CallOpts) +} + +// MaxLiquidityPerTick is a free data retrieval call binding the contract method 0x70cf754a. +// +// Solidity: function maxLiquidityPerTick() view returns(uint128) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCallerSession) MaxLiquidityPerTick() (*big.Int, error) { + return _IUniswapV3PoolImmutables.Contract.MaxLiquidityPerTick(&_IUniswapV3PoolImmutables.CallOpts) +} + +// TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c. +// +// Solidity: function tickSpacing() view returns(int24) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCaller) TickSpacing(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3PoolImmutables.contract.Call(opts, &out, "tickSpacing") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c. +// +// Solidity: function tickSpacing() view returns(int24) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesSession) TickSpacing() (*big.Int, error) { + return _IUniswapV3PoolImmutables.Contract.TickSpacing(&_IUniswapV3PoolImmutables.CallOpts) +} + +// TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c. +// +// Solidity: function tickSpacing() view returns(int24) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCallerSession) TickSpacing() (*big.Int, error) { + return _IUniswapV3PoolImmutables.Contract.TickSpacing(&_IUniswapV3PoolImmutables.CallOpts) +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCaller) Token0(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV3PoolImmutables.contract.Call(opts, &out, "token0") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesSession) Token0() (common.Address, error) { + return _IUniswapV3PoolImmutables.Contract.Token0(&_IUniswapV3PoolImmutables.CallOpts) +} + +// Token0 is a free data retrieval call binding the contract method 0x0dfe1681. +// +// Solidity: function token0() view returns(address) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCallerSession) Token0() (common.Address, error) { + return _IUniswapV3PoolImmutables.Contract.Token0(&_IUniswapV3PoolImmutables.CallOpts) +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCaller) Token1(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _IUniswapV3PoolImmutables.contract.Call(opts, &out, "token1") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesSession) Token1() (common.Address, error) { + return _IUniswapV3PoolImmutables.Contract.Token1(&_IUniswapV3PoolImmutables.CallOpts) +} + +// Token1 is a free data retrieval call binding the contract method 0xd21220a7. +// +// Solidity: function token1() view returns(address) +func (_IUniswapV3PoolImmutables *IUniswapV3PoolImmutablesCallerSession) Token1() (common.Address, error) { + return _IUniswapV3PoolImmutables.Contract.Token1(&_IUniswapV3PoolImmutables.CallOpts) +} diff --git a/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolowneractions.sol/iuniswapv3poolowneractions.go b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolowneractions.sol/iuniswapv3poolowneractions.go new file mode 100644 index 0000000000..a5bd7aeb37 --- /dev/null +++ b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolowneractions.sol/iuniswapv3poolowneractions.go @@ -0,0 +1,223 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv3poolowneractions + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV3PoolOwnerActionsMetaData contains all meta data concerning the IUniswapV3PoolOwnerActions contract. +var IUniswapV3PoolOwnerActionsMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount0Requested\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1Requested\",\"type\":\"uint128\"}],\"name\":\"collectProtocol\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"feeProtocol0\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"feeProtocol1\",\"type\":\"uint8\"}],\"name\":\"setFeeProtocol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IUniswapV3PoolOwnerActionsABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV3PoolOwnerActionsMetaData.ABI instead. +var IUniswapV3PoolOwnerActionsABI = IUniswapV3PoolOwnerActionsMetaData.ABI + +// IUniswapV3PoolOwnerActions is an auto generated Go binding around an Ethereum contract. +type IUniswapV3PoolOwnerActions struct { + IUniswapV3PoolOwnerActionsCaller // Read-only binding to the contract + IUniswapV3PoolOwnerActionsTransactor // Write-only binding to the contract + IUniswapV3PoolOwnerActionsFilterer // Log filterer for contract events +} + +// IUniswapV3PoolOwnerActionsCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV3PoolOwnerActionsCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolOwnerActionsTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV3PoolOwnerActionsTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolOwnerActionsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV3PoolOwnerActionsFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolOwnerActionsSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV3PoolOwnerActionsSession struct { + Contract *IUniswapV3PoolOwnerActions // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolOwnerActionsCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV3PoolOwnerActionsCallerSession struct { + Contract *IUniswapV3PoolOwnerActionsCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV3PoolOwnerActionsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV3PoolOwnerActionsTransactorSession struct { + Contract *IUniswapV3PoolOwnerActionsTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolOwnerActionsRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV3PoolOwnerActionsRaw struct { + Contract *IUniswapV3PoolOwnerActions // Generic contract binding to access the raw methods on +} + +// IUniswapV3PoolOwnerActionsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV3PoolOwnerActionsCallerRaw struct { + Contract *IUniswapV3PoolOwnerActionsCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV3PoolOwnerActionsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV3PoolOwnerActionsTransactorRaw struct { + Contract *IUniswapV3PoolOwnerActionsTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV3PoolOwnerActions creates a new instance of IUniswapV3PoolOwnerActions, bound to a specific deployed contract. +func NewIUniswapV3PoolOwnerActions(address common.Address, backend bind.ContractBackend) (*IUniswapV3PoolOwnerActions, error) { + contract, err := bindIUniswapV3PoolOwnerActions(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV3PoolOwnerActions{IUniswapV3PoolOwnerActionsCaller: IUniswapV3PoolOwnerActionsCaller{contract: contract}, IUniswapV3PoolOwnerActionsTransactor: IUniswapV3PoolOwnerActionsTransactor{contract: contract}, IUniswapV3PoolOwnerActionsFilterer: IUniswapV3PoolOwnerActionsFilterer{contract: contract}}, nil +} + +// NewIUniswapV3PoolOwnerActionsCaller creates a new read-only instance of IUniswapV3PoolOwnerActions, bound to a specific deployed contract. +func NewIUniswapV3PoolOwnerActionsCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV3PoolOwnerActionsCaller, error) { + contract, err := bindIUniswapV3PoolOwnerActions(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolOwnerActionsCaller{contract: contract}, nil +} + +// NewIUniswapV3PoolOwnerActionsTransactor creates a new write-only instance of IUniswapV3PoolOwnerActions, bound to a specific deployed contract. +func NewIUniswapV3PoolOwnerActionsTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV3PoolOwnerActionsTransactor, error) { + contract, err := bindIUniswapV3PoolOwnerActions(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolOwnerActionsTransactor{contract: contract}, nil +} + +// NewIUniswapV3PoolOwnerActionsFilterer creates a new log filterer instance of IUniswapV3PoolOwnerActions, bound to a specific deployed contract. +func NewIUniswapV3PoolOwnerActionsFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV3PoolOwnerActionsFilterer, error) { + contract, err := bindIUniswapV3PoolOwnerActions(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV3PoolOwnerActionsFilterer{contract: contract}, nil +} + +// bindIUniswapV3PoolOwnerActions binds a generic wrapper to an already deployed contract. +func bindIUniswapV3PoolOwnerActions(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV3PoolOwnerActionsMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolOwnerActions.Contract.IUniswapV3PoolOwnerActionsCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolOwnerActions.Contract.IUniswapV3PoolOwnerActionsTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolOwnerActions.Contract.IUniswapV3PoolOwnerActionsTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolOwnerActions.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolOwnerActions.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolOwnerActions.Contract.contract.Transact(opts, method, params...) +} + +// CollectProtocol is a paid mutator transaction binding the contract method 0x85b66729. +// +// Solidity: function collectProtocol(address recipient, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsTransactor) CollectProtocol(opts *bind.TransactOpts, recipient common.Address, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolOwnerActions.contract.Transact(opts, "collectProtocol", recipient, amount0Requested, amount1Requested) +} + +// CollectProtocol is a paid mutator transaction binding the contract method 0x85b66729. +// +// Solidity: function collectProtocol(address recipient, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsSession) CollectProtocol(recipient common.Address, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolOwnerActions.Contract.CollectProtocol(&_IUniswapV3PoolOwnerActions.TransactOpts, recipient, amount0Requested, amount1Requested) +} + +// CollectProtocol is a paid mutator transaction binding the contract method 0x85b66729. +// +// Solidity: function collectProtocol(address recipient, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1) +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsTransactorSession) CollectProtocol(recipient common.Address, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) { + return _IUniswapV3PoolOwnerActions.Contract.CollectProtocol(&_IUniswapV3PoolOwnerActions.TransactOpts, recipient, amount0Requested, amount1Requested) +} + +// SetFeeProtocol is a paid mutator transaction binding the contract method 0x8206a4d1. +// +// Solidity: function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) returns() +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsTransactor) SetFeeProtocol(opts *bind.TransactOpts, feeProtocol0 uint8, feeProtocol1 uint8) (*types.Transaction, error) { + return _IUniswapV3PoolOwnerActions.contract.Transact(opts, "setFeeProtocol", feeProtocol0, feeProtocol1) +} + +// SetFeeProtocol is a paid mutator transaction binding the contract method 0x8206a4d1. +// +// Solidity: function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) returns() +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsSession) SetFeeProtocol(feeProtocol0 uint8, feeProtocol1 uint8) (*types.Transaction, error) { + return _IUniswapV3PoolOwnerActions.Contract.SetFeeProtocol(&_IUniswapV3PoolOwnerActions.TransactOpts, feeProtocol0, feeProtocol1) +} + +// SetFeeProtocol is a paid mutator transaction binding the contract method 0x8206a4d1. +// +// Solidity: function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) returns() +func (_IUniswapV3PoolOwnerActions *IUniswapV3PoolOwnerActionsTransactorSession) SetFeeProtocol(feeProtocol0 uint8, feeProtocol1 uint8) (*types.Transaction, error) { + return _IUniswapV3PoolOwnerActions.Contract.SetFeeProtocol(&_IUniswapV3PoolOwnerActions.TransactOpts, feeProtocol0, feeProtocol1) +} diff --git a/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolstate.sol/iuniswapv3poolstate.go b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolstate.sol/iuniswapv3poolstate.go new file mode 100644 index 0000000000..11fc3c9e31 --- /dev/null +++ b/pkg/contracts/uniswap/v3-core/contracts/interfaces/pool/iuniswapv3poolstate.sol/iuniswapv3poolstate.go @@ -0,0 +1,610 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iuniswapv3poolstate + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IUniswapV3PoolStateMetaData contains all meta data concerning the IUniswapV3PoolState contract. +var IUniswapV3PoolStateMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"feeGrowthGlobal0X128\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeGrowthGlobal1X128\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"liquidity\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"observations\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"blockTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"int56\",\"name\":\"tickCumulative\",\"type\":\"int56\"},{\"internalType\":\"uint160\",\"name\":\"secondsPerLiquidityCumulativeX128\",\"type\":\"uint160\"},{\"internalType\":\"bool\",\"name\":\"initialized\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"}],\"name\":\"positions\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"_liquidity\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthInside0LastX128\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthInside1LastX128\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"tokensOwed0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"tokensOwed1\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolFees\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"token0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"token1\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slot0\",\"outputs\":[{\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"},{\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"},{\"internalType\":\"uint16\",\"name\":\"observationIndex\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"observationCardinality\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"observationCardinalityNext\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"feeProtocol\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"unlocked\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int16\",\"name\":\"wordPosition\",\"type\":\"int16\"}],\"name\":\"tickBitmap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"}],\"name\":\"ticks\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"liquidityGross\",\"type\":\"uint128\"},{\"internalType\":\"int128\",\"name\":\"liquidityNet\",\"type\":\"int128\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthOutside0X128\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthOutside1X128\",\"type\":\"uint256\"},{\"internalType\":\"int56\",\"name\":\"tickCumulativeOutside\",\"type\":\"int56\"},{\"internalType\":\"uint160\",\"name\":\"secondsPerLiquidityOutsideX128\",\"type\":\"uint160\"},{\"internalType\":\"uint32\",\"name\":\"secondsOutside\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"initialized\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +} + +// IUniswapV3PoolStateABI is the input ABI used to generate the binding from. +// Deprecated: Use IUniswapV3PoolStateMetaData.ABI instead. +var IUniswapV3PoolStateABI = IUniswapV3PoolStateMetaData.ABI + +// IUniswapV3PoolState is an auto generated Go binding around an Ethereum contract. +type IUniswapV3PoolState struct { + IUniswapV3PoolStateCaller // Read-only binding to the contract + IUniswapV3PoolStateTransactor // Write-only binding to the contract + IUniswapV3PoolStateFilterer // Log filterer for contract events +} + +// IUniswapV3PoolStateCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUniswapV3PoolStateCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolStateTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUniswapV3PoolStateTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolStateFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUniswapV3PoolStateFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUniswapV3PoolStateSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUniswapV3PoolStateSession struct { + Contract *IUniswapV3PoolState // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolStateCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUniswapV3PoolStateCallerSession struct { + Contract *IUniswapV3PoolStateCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUniswapV3PoolStateTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUniswapV3PoolStateTransactorSession struct { + Contract *IUniswapV3PoolStateTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUniswapV3PoolStateRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUniswapV3PoolStateRaw struct { + Contract *IUniswapV3PoolState // Generic contract binding to access the raw methods on +} + +// IUniswapV3PoolStateCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUniswapV3PoolStateCallerRaw struct { + Contract *IUniswapV3PoolStateCaller // Generic read-only contract binding to access the raw methods on +} + +// IUniswapV3PoolStateTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUniswapV3PoolStateTransactorRaw struct { + Contract *IUniswapV3PoolStateTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUniswapV3PoolState creates a new instance of IUniswapV3PoolState, bound to a specific deployed contract. +func NewIUniswapV3PoolState(address common.Address, backend bind.ContractBackend) (*IUniswapV3PoolState, error) { + contract, err := bindIUniswapV3PoolState(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUniswapV3PoolState{IUniswapV3PoolStateCaller: IUniswapV3PoolStateCaller{contract: contract}, IUniswapV3PoolStateTransactor: IUniswapV3PoolStateTransactor{contract: contract}, IUniswapV3PoolStateFilterer: IUniswapV3PoolStateFilterer{contract: contract}}, nil +} + +// NewIUniswapV3PoolStateCaller creates a new read-only instance of IUniswapV3PoolState, bound to a specific deployed contract. +func NewIUniswapV3PoolStateCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV3PoolStateCaller, error) { + contract, err := bindIUniswapV3PoolState(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolStateCaller{contract: contract}, nil +} + +// NewIUniswapV3PoolStateTransactor creates a new write-only instance of IUniswapV3PoolState, bound to a specific deployed contract. +func NewIUniswapV3PoolStateTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV3PoolStateTransactor, error) { + contract, err := bindIUniswapV3PoolState(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUniswapV3PoolStateTransactor{contract: contract}, nil +} + +// NewIUniswapV3PoolStateFilterer creates a new log filterer instance of IUniswapV3PoolState, bound to a specific deployed contract. +func NewIUniswapV3PoolStateFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV3PoolStateFilterer, error) { + contract, err := bindIUniswapV3PoolState(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUniswapV3PoolStateFilterer{contract: contract}, nil +} + +// bindIUniswapV3PoolState binds a generic wrapper to an already deployed contract. +func bindIUniswapV3PoolState(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IUniswapV3PoolStateMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolState *IUniswapV3PoolStateRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolState.Contract.IUniswapV3PoolStateCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolState *IUniswapV3PoolStateRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolState.Contract.IUniswapV3PoolStateTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolState *IUniswapV3PoolStateRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolState.Contract.IUniswapV3PoolStateTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IUniswapV3PoolState.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUniswapV3PoolState *IUniswapV3PoolStateTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUniswapV3PoolState.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUniswapV3PoolState *IUniswapV3PoolStateTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUniswapV3PoolState.Contract.contract.Transact(opts, method, params...) +} + +// FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399. +// +// Solidity: function feeGrowthGlobal0X128() view returns(uint256) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) FeeGrowthGlobal0X128(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3PoolState.contract.Call(opts, &out, "feeGrowthGlobal0X128") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399. +// +// Solidity: function feeGrowthGlobal0X128() view returns(uint256) +func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) FeeGrowthGlobal0X128() (*big.Int, error) { + return _IUniswapV3PoolState.Contract.FeeGrowthGlobal0X128(&_IUniswapV3PoolState.CallOpts) +} + +// FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399. +// +// Solidity: function feeGrowthGlobal0X128() view returns(uint256) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) FeeGrowthGlobal0X128() (*big.Int, error) { + return _IUniswapV3PoolState.Contract.FeeGrowthGlobal0X128(&_IUniswapV3PoolState.CallOpts) +} + +// FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319. +// +// Solidity: function feeGrowthGlobal1X128() view returns(uint256) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) FeeGrowthGlobal1X128(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3PoolState.contract.Call(opts, &out, "feeGrowthGlobal1X128") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319. +// +// Solidity: function feeGrowthGlobal1X128() view returns(uint256) +func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) FeeGrowthGlobal1X128() (*big.Int, error) { + return _IUniswapV3PoolState.Contract.FeeGrowthGlobal1X128(&_IUniswapV3PoolState.CallOpts) +} + +// FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319. +// +// Solidity: function feeGrowthGlobal1X128() view returns(uint256) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) FeeGrowthGlobal1X128() (*big.Int, error) { + return _IUniswapV3PoolState.Contract.FeeGrowthGlobal1X128(&_IUniswapV3PoolState.CallOpts) +} + +// Liquidity is a free data retrieval call binding the contract method 0x1a686502. +// +// Solidity: function liquidity() view returns(uint128) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) Liquidity(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3PoolState.contract.Call(opts, &out, "liquidity") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Liquidity is a free data retrieval call binding the contract method 0x1a686502. +// +// Solidity: function liquidity() view returns(uint128) +func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) Liquidity() (*big.Int, error) { + return _IUniswapV3PoolState.Contract.Liquidity(&_IUniswapV3PoolState.CallOpts) +} + +// Liquidity is a free data retrieval call binding the contract method 0x1a686502. +// +// Solidity: function liquidity() view returns(uint128) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) Liquidity() (*big.Int, error) { + return _IUniswapV3PoolState.Contract.Liquidity(&_IUniswapV3PoolState.CallOpts) +} + +// Observations is a free data retrieval call binding the contract method 0x252c09d7. +// +// Solidity: function observations(uint256 index) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) Observations(opts *bind.CallOpts, index *big.Int) (struct { + BlockTimestamp uint32 + TickCumulative *big.Int + SecondsPerLiquidityCumulativeX128 *big.Int + Initialized bool +}, error) { + var out []interface{} + err := _IUniswapV3PoolState.contract.Call(opts, &out, "observations", index) + + outstruct := new(struct { + BlockTimestamp uint32 + TickCumulative *big.Int + SecondsPerLiquidityCumulativeX128 *big.Int + Initialized bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.BlockTimestamp = *abi.ConvertType(out[0], new(uint32)).(*uint32) + outstruct.TickCumulative = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.SecondsPerLiquidityCumulativeX128 = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.Initialized = *abi.ConvertType(out[3], new(bool)).(*bool) + + return *outstruct, err + +} + +// Observations is a free data retrieval call binding the contract method 0x252c09d7. +// +// Solidity: function observations(uint256 index) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized) +func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) Observations(index *big.Int) (struct { + BlockTimestamp uint32 + TickCumulative *big.Int + SecondsPerLiquidityCumulativeX128 *big.Int + Initialized bool +}, error) { + return _IUniswapV3PoolState.Contract.Observations(&_IUniswapV3PoolState.CallOpts, index) +} + +// Observations is a free data retrieval call binding the contract method 0x252c09d7. +// +// Solidity: function observations(uint256 index) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) Observations(index *big.Int) (struct { + BlockTimestamp uint32 + TickCumulative *big.Int + SecondsPerLiquidityCumulativeX128 *big.Int + Initialized bool +}, error) { + return _IUniswapV3PoolState.Contract.Observations(&_IUniswapV3PoolState.CallOpts, index) +} + +// Positions is a free data retrieval call binding the contract method 0x514ea4bf. +// +// Solidity: function positions(bytes32 key) view returns(uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) Positions(opts *bind.CallOpts, key [32]byte) (struct { + Liquidity *big.Int + FeeGrowthInside0LastX128 *big.Int + FeeGrowthInside1LastX128 *big.Int + TokensOwed0 *big.Int + TokensOwed1 *big.Int +}, error) { + var out []interface{} + err := _IUniswapV3PoolState.contract.Call(opts, &out, "positions", key) + + outstruct := new(struct { + Liquidity *big.Int + FeeGrowthInside0LastX128 *big.Int + FeeGrowthInside1LastX128 *big.Int + TokensOwed0 *big.Int + TokensOwed1 *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Liquidity = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.FeeGrowthInside0LastX128 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.FeeGrowthInside1LastX128 = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.TokensOwed0 = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.TokensOwed1 = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// Positions is a free data retrieval call binding the contract method 0x514ea4bf. +// +// Solidity: function positions(bytes32 key) view returns(uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1) +func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) Positions(key [32]byte) (struct { + Liquidity *big.Int + FeeGrowthInside0LastX128 *big.Int + FeeGrowthInside1LastX128 *big.Int + TokensOwed0 *big.Int + TokensOwed1 *big.Int +}, error) { + return _IUniswapV3PoolState.Contract.Positions(&_IUniswapV3PoolState.CallOpts, key) +} + +// Positions is a free data retrieval call binding the contract method 0x514ea4bf. +// +// Solidity: function positions(bytes32 key) view returns(uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) Positions(key [32]byte) (struct { + Liquidity *big.Int + FeeGrowthInside0LastX128 *big.Int + FeeGrowthInside1LastX128 *big.Int + TokensOwed0 *big.Int + TokensOwed1 *big.Int +}, error) { + return _IUniswapV3PoolState.Contract.Positions(&_IUniswapV3PoolState.CallOpts, key) +} + +// ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b. +// +// Solidity: function protocolFees() view returns(uint128 token0, uint128 token1) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) ProtocolFees(opts *bind.CallOpts) (struct { + Token0 *big.Int + Token1 *big.Int +}, error) { + var out []interface{} + err := _IUniswapV3PoolState.contract.Call(opts, &out, "protocolFees") + + outstruct := new(struct { + Token0 *big.Int + Token1 *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Token0 = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Token1 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b. +// +// Solidity: function protocolFees() view returns(uint128 token0, uint128 token1) +func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) ProtocolFees() (struct { + Token0 *big.Int + Token1 *big.Int +}, error) { + return _IUniswapV3PoolState.Contract.ProtocolFees(&_IUniswapV3PoolState.CallOpts) +} + +// ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b. +// +// Solidity: function protocolFees() view returns(uint128 token0, uint128 token1) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) ProtocolFees() (struct { + Token0 *big.Int + Token1 *big.Int +}, error) { + return _IUniswapV3PoolState.Contract.ProtocolFees(&_IUniswapV3PoolState.CallOpts) +} + +// Slot0 is a free data retrieval call binding the contract method 0x3850c7bd. +// +// Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) Slot0(opts *bind.CallOpts) (struct { + SqrtPriceX96 *big.Int + Tick *big.Int + ObservationIndex uint16 + ObservationCardinality uint16 + ObservationCardinalityNext uint16 + FeeProtocol uint8 + Unlocked bool +}, error) { + var out []interface{} + err := _IUniswapV3PoolState.contract.Call(opts, &out, "slot0") + + outstruct := new(struct { + SqrtPriceX96 *big.Int + Tick *big.Int + ObservationIndex uint16 + ObservationCardinality uint16 + ObservationCardinalityNext uint16 + FeeProtocol uint8 + Unlocked bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.SqrtPriceX96 = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Tick = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.ObservationIndex = *abi.ConvertType(out[2], new(uint16)).(*uint16) + outstruct.ObservationCardinality = *abi.ConvertType(out[3], new(uint16)).(*uint16) + outstruct.ObservationCardinalityNext = *abi.ConvertType(out[4], new(uint16)).(*uint16) + outstruct.FeeProtocol = *abi.ConvertType(out[5], new(uint8)).(*uint8) + outstruct.Unlocked = *abi.ConvertType(out[6], new(bool)).(*bool) + + return *outstruct, err + +} + +// Slot0 is a free data retrieval call binding the contract method 0x3850c7bd. +// +// Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked) +func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) Slot0() (struct { + SqrtPriceX96 *big.Int + Tick *big.Int + ObservationIndex uint16 + ObservationCardinality uint16 + ObservationCardinalityNext uint16 + FeeProtocol uint8 + Unlocked bool +}, error) { + return _IUniswapV3PoolState.Contract.Slot0(&_IUniswapV3PoolState.CallOpts) +} + +// Slot0 is a free data retrieval call binding the contract method 0x3850c7bd. +// +// Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) Slot0() (struct { + SqrtPriceX96 *big.Int + Tick *big.Int + ObservationIndex uint16 + ObservationCardinality uint16 + ObservationCardinalityNext uint16 + FeeProtocol uint8 + Unlocked bool +}, error) { + return _IUniswapV3PoolState.Contract.Slot0(&_IUniswapV3PoolState.CallOpts) +} + +// TickBitmap is a free data retrieval call binding the contract method 0x5339c296. +// +// Solidity: function tickBitmap(int16 wordPosition) view returns(uint256) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) TickBitmap(opts *bind.CallOpts, wordPosition int16) (*big.Int, error) { + var out []interface{} + err := _IUniswapV3PoolState.contract.Call(opts, &out, "tickBitmap", wordPosition) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TickBitmap is a free data retrieval call binding the contract method 0x5339c296. +// +// Solidity: function tickBitmap(int16 wordPosition) view returns(uint256) +func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) TickBitmap(wordPosition int16) (*big.Int, error) { + return _IUniswapV3PoolState.Contract.TickBitmap(&_IUniswapV3PoolState.CallOpts, wordPosition) +} + +// TickBitmap is a free data retrieval call binding the contract method 0x5339c296. +// +// Solidity: function tickBitmap(int16 wordPosition) view returns(uint256) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) TickBitmap(wordPosition int16) (*big.Int, error) { + return _IUniswapV3PoolState.Contract.TickBitmap(&_IUniswapV3PoolState.CallOpts, wordPosition) +} + +// Ticks is a free data retrieval call binding the contract method 0xf30dba93. +// +// Solidity: function ticks(int24 tick) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) Ticks(opts *bind.CallOpts, tick *big.Int) (struct { + LiquidityGross *big.Int + LiquidityNet *big.Int + FeeGrowthOutside0X128 *big.Int + FeeGrowthOutside1X128 *big.Int + TickCumulativeOutside *big.Int + SecondsPerLiquidityOutsideX128 *big.Int + SecondsOutside uint32 + Initialized bool +}, error) { + var out []interface{} + err := _IUniswapV3PoolState.contract.Call(opts, &out, "ticks", tick) + + outstruct := new(struct { + LiquidityGross *big.Int + LiquidityNet *big.Int + FeeGrowthOutside0X128 *big.Int + FeeGrowthOutside1X128 *big.Int + TickCumulativeOutside *big.Int + SecondsPerLiquidityOutsideX128 *big.Int + SecondsOutside uint32 + Initialized bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.LiquidityGross = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.LiquidityNet = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.FeeGrowthOutside0X128 = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.FeeGrowthOutside1X128 = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.TickCumulativeOutside = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + outstruct.SecondsPerLiquidityOutsideX128 = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int) + outstruct.SecondsOutside = *abi.ConvertType(out[6], new(uint32)).(*uint32) + outstruct.Initialized = *abi.ConvertType(out[7], new(bool)).(*bool) + + return *outstruct, err + +} + +// Ticks is a free data retrieval call binding the contract method 0xf30dba93. +// +// Solidity: function ticks(int24 tick) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized) +func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) Ticks(tick *big.Int) (struct { + LiquidityGross *big.Int + LiquidityNet *big.Int + FeeGrowthOutside0X128 *big.Int + FeeGrowthOutside1X128 *big.Int + TickCumulativeOutside *big.Int + SecondsPerLiquidityOutsideX128 *big.Int + SecondsOutside uint32 + Initialized bool +}, error) { + return _IUniswapV3PoolState.Contract.Ticks(&_IUniswapV3PoolState.CallOpts, tick) +} + +// Ticks is a free data retrieval call binding the contract method 0xf30dba93. +// +// Solidity: function ticks(int24 tick) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized) +func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) Ticks(tick *big.Int) (struct { + LiquidityGross *big.Int + LiquidityNet *big.Int + FeeGrowthOutside0X128 *big.Int + FeeGrowthOutside1X128 *big.Int + TickCumulativeOutside *big.Int + SecondsPerLiquidityOutsideX128 *big.Int + SecondsOutside uint32 + Initialized bool +}, error) { + return _IUniswapV3PoolState.Contract.Ticks(&_IUniswapV3PoolState.CallOpts, tick) +} diff --git a/pkg/contracts/uniswap/v3-periphery/contracts/interfaces/iquoter.sol/iquoter.go b/pkg/contracts/uniswap/v3-periphery/contracts/interfaces/iquoter.sol/iquoter.go new file mode 100644 index 0000000000..1c64cfed54 --- /dev/null +++ b/pkg/contracts/uniswap/v3-periphery/contracts/interfaces/iquoter.sol/iquoter.go @@ -0,0 +1,265 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iquoter + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IQuoterMetaData contains all meta data concerning the IQuoter contract. +var IQuoterMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"path\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"name\":\"quoteExactInput\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"}],\"name\":\"quoteExactInputSingle\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"path\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"quoteExactOutput\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"}],\"name\":\"quoteExactOutputSingle\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// IQuoterABI is the input ABI used to generate the binding from. +// Deprecated: Use IQuoterMetaData.ABI instead. +var IQuoterABI = IQuoterMetaData.ABI + +// IQuoter is an auto generated Go binding around an Ethereum contract. +type IQuoter struct { + IQuoterCaller // Read-only binding to the contract + IQuoterTransactor // Write-only binding to the contract + IQuoterFilterer // Log filterer for contract events +} + +// IQuoterCaller is an auto generated read-only Go binding around an Ethereum contract. +type IQuoterCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IQuoterTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IQuoterTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IQuoterFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IQuoterFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IQuoterSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IQuoterSession struct { + Contract *IQuoter // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IQuoterCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IQuoterCallerSession struct { + Contract *IQuoterCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IQuoterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IQuoterTransactorSession struct { + Contract *IQuoterTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IQuoterRaw is an auto generated low-level Go binding around an Ethereum contract. +type IQuoterRaw struct { + Contract *IQuoter // Generic contract binding to access the raw methods on +} + +// IQuoterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IQuoterCallerRaw struct { + Contract *IQuoterCaller // Generic read-only contract binding to access the raw methods on +} + +// IQuoterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IQuoterTransactorRaw struct { + Contract *IQuoterTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIQuoter creates a new instance of IQuoter, bound to a specific deployed contract. +func NewIQuoter(address common.Address, backend bind.ContractBackend) (*IQuoter, error) { + contract, err := bindIQuoter(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IQuoter{IQuoterCaller: IQuoterCaller{contract: contract}, IQuoterTransactor: IQuoterTransactor{contract: contract}, IQuoterFilterer: IQuoterFilterer{contract: contract}}, nil +} + +// NewIQuoterCaller creates a new read-only instance of IQuoter, bound to a specific deployed contract. +func NewIQuoterCaller(address common.Address, caller bind.ContractCaller) (*IQuoterCaller, error) { + contract, err := bindIQuoter(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IQuoterCaller{contract: contract}, nil +} + +// NewIQuoterTransactor creates a new write-only instance of IQuoter, bound to a specific deployed contract. +func NewIQuoterTransactor(address common.Address, transactor bind.ContractTransactor) (*IQuoterTransactor, error) { + contract, err := bindIQuoter(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IQuoterTransactor{contract: contract}, nil +} + +// NewIQuoterFilterer creates a new log filterer instance of IQuoter, bound to a specific deployed contract. +func NewIQuoterFilterer(address common.Address, filterer bind.ContractFilterer) (*IQuoterFilterer, error) { + contract, err := bindIQuoter(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IQuoterFilterer{contract: contract}, nil +} + +// bindIQuoter binds a generic wrapper to an already deployed contract. +func bindIQuoter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IQuoterMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IQuoter *IQuoterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IQuoter.Contract.IQuoterCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IQuoter *IQuoterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IQuoter.Contract.IQuoterTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IQuoter *IQuoterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IQuoter.Contract.IQuoterTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IQuoter *IQuoterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IQuoter.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IQuoter *IQuoterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IQuoter.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IQuoter *IQuoterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IQuoter.Contract.contract.Transact(opts, method, params...) +} + +// QuoteExactInput is a paid mutator transaction binding the contract method 0xcdca1753. +// +// Solidity: function quoteExactInput(bytes path, uint256 amountIn) returns(uint256 amountOut) +func (_IQuoter *IQuoterTransactor) QuoteExactInput(opts *bind.TransactOpts, path []byte, amountIn *big.Int) (*types.Transaction, error) { + return _IQuoter.contract.Transact(opts, "quoteExactInput", path, amountIn) +} + +// QuoteExactInput is a paid mutator transaction binding the contract method 0xcdca1753. +// +// Solidity: function quoteExactInput(bytes path, uint256 amountIn) returns(uint256 amountOut) +func (_IQuoter *IQuoterSession) QuoteExactInput(path []byte, amountIn *big.Int) (*types.Transaction, error) { + return _IQuoter.Contract.QuoteExactInput(&_IQuoter.TransactOpts, path, amountIn) +} + +// QuoteExactInput is a paid mutator transaction binding the contract method 0xcdca1753. +// +// Solidity: function quoteExactInput(bytes path, uint256 amountIn) returns(uint256 amountOut) +func (_IQuoter *IQuoterTransactorSession) QuoteExactInput(path []byte, amountIn *big.Int) (*types.Transaction, error) { + return _IQuoter.Contract.QuoteExactInput(&_IQuoter.TransactOpts, path, amountIn) +} + +// QuoteExactInputSingle is a paid mutator transaction binding the contract method 0xf7729d43. +// +// Solidity: function quoteExactInputSingle(address tokenIn, address tokenOut, uint24 fee, uint256 amountIn, uint160 sqrtPriceLimitX96) returns(uint256 amountOut) +func (_IQuoter *IQuoterTransactor) QuoteExactInputSingle(opts *bind.TransactOpts, tokenIn common.Address, tokenOut common.Address, fee *big.Int, amountIn *big.Int, sqrtPriceLimitX96 *big.Int) (*types.Transaction, error) { + return _IQuoter.contract.Transact(opts, "quoteExactInputSingle", tokenIn, tokenOut, fee, amountIn, sqrtPriceLimitX96) +} + +// QuoteExactInputSingle is a paid mutator transaction binding the contract method 0xf7729d43. +// +// Solidity: function quoteExactInputSingle(address tokenIn, address tokenOut, uint24 fee, uint256 amountIn, uint160 sqrtPriceLimitX96) returns(uint256 amountOut) +func (_IQuoter *IQuoterSession) QuoteExactInputSingle(tokenIn common.Address, tokenOut common.Address, fee *big.Int, amountIn *big.Int, sqrtPriceLimitX96 *big.Int) (*types.Transaction, error) { + return _IQuoter.Contract.QuoteExactInputSingle(&_IQuoter.TransactOpts, tokenIn, tokenOut, fee, amountIn, sqrtPriceLimitX96) +} + +// QuoteExactInputSingle is a paid mutator transaction binding the contract method 0xf7729d43. +// +// Solidity: function quoteExactInputSingle(address tokenIn, address tokenOut, uint24 fee, uint256 amountIn, uint160 sqrtPriceLimitX96) returns(uint256 amountOut) +func (_IQuoter *IQuoterTransactorSession) QuoteExactInputSingle(tokenIn common.Address, tokenOut common.Address, fee *big.Int, amountIn *big.Int, sqrtPriceLimitX96 *big.Int) (*types.Transaction, error) { + return _IQuoter.Contract.QuoteExactInputSingle(&_IQuoter.TransactOpts, tokenIn, tokenOut, fee, amountIn, sqrtPriceLimitX96) +} + +// QuoteExactOutput is a paid mutator transaction binding the contract method 0x2f80bb1d. +// +// Solidity: function quoteExactOutput(bytes path, uint256 amountOut) returns(uint256 amountIn) +func (_IQuoter *IQuoterTransactor) QuoteExactOutput(opts *bind.TransactOpts, path []byte, amountOut *big.Int) (*types.Transaction, error) { + return _IQuoter.contract.Transact(opts, "quoteExactOutput", path, amountOut) +} + +// QuoteExactOutput is a paid mutator transaction binding the contract method 0x2f80bb1d. +// +// Solidity: function quoteExactOutput(bytes path, uint256 amountOut) returns(uint256 amountIn) +func (_IQuoter *IQuoterSession) QuoteExactOutput(path []byte, amountOut *big.Int) (*types.Transaction, error) { + return _IQuoter.Contract.QuoteExactOutput(&_IQuoter.TransactOpts, path, amountOut) +} + +// QuoteExactOutput is a paid mutator transaction binding the contract method 0x2f80bb1d. +// +// Solidity: function quoteExactOutput(bytes path, uint256 amountOut) returns(uint256 amountIn) +func (_IQuoter *IQuoterTransactorSession) QuoteExactOutput(path []byte, amountOut *big.Int) (*types.Transaction, error) { + return _IQuoter.Contract.QuoteExactOutput(&_IQuoter.TransactOpts, path, amountOut) +} + +// QuoteExactOutputSingle is a paid mutator transaction binding the contract method 0x30d07f21. +// +// Solidity: function quoteExactOutputSingle(address tokenIn, address tokenOut, uint24 fee, uint256 amountOut, uint160 sqrtPriceLimitX96) returns(uint256 amountIn) +func (_IQuoter *IQuoterTransactor) QuoteExactOutputSingle(opts *bind.TransactOpts, tokenIn common.Address, tokenOut common.Address, fee *big.Int, amountOut *big.Int, sqrtPriceLimitX96 *big.Int) (*types.Transaction, error) { + return _IQuoter.contract.Transact(opts, "quoteExactOutputSingle", tokenIn, tokenOut, fee, amountOut, sqrtPriceLimitX96) +} + +// QuoteExactOutputSingle is a paid mutator transaction binding the contract method 0x30d07f21. +// +// Solidity: function quoteExactOutputSingle(address tokenIn, address tokenOut, uint24 fee, uint256 amountOut, uint160 sqrtPriceLimitX96) returns(uint256 amountIn) +func (_IQuoter *IQuoterSession) QuoteExactOutputSingle(tokenIn common.Address, tokenOut common.Address, fee *big.Int, amountOut *big.Int, sqrtPriceLimitX96 *big.Int) (*types.Transaction, error) { + return _IQuoter.Contract.QuoteExactOutputSingle(&_IQuoter.TransactOpts, tokenIn, tokenOut, fee, amountOut, sqrtPriceLimitX96) +} + +// QuoteExactOutputSingle is a paid mutator transaction binding the contract method 0x30d07f21. +// +// Solidity: function quoteExactOutputSingle(address tokenIn, address tokenOut, uint24 fee, uint256 amountOut, uint160 sqrtPriceLimitX96) returns(uint256 amountIn) +func (_IQuoter *IQuoterTransactorSession) QuoteExactOutputSingle(tokenIn common.Address, tokenOut common.Address, fee *big.Int, amountOut *big.Int, sqrtPriceLimitX96 *big.Int) (*types.Transaction, error) { + return _IQuoter.Contract.QuoteExactOutputSingle(&_IQuoter.TransactOpts, tokenIn, tokenOut, fee, amountOut, sqrtPriceLimitX96) +} diff --git a/pkg/contracts/uniswap/v3-periphery/contracts/interfaces/iswaprouter.sol/iswaprouter.go b/pkg/contracts/uniswap/v3-periphery/contracts/interfaces/iswaprouter.sol/iswaprouter.go new file mode 100644 index 0000000000..b50bc3558d --- /dev/null +++ b/pkg/contracts/uniswap/v3-periphery/contracts/interfaces/iswaprouter.sol/iswaprouter.go @@ -0,0 +1,328 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iswaprouter + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ISwapRouterExactInputParams is an auto generated low-level Go binding around an user-defined struct. +type ISwapRouterExactInputParams struct { + Path []byte + Recipient common.Address + Deadline *big.Int + AmountIn *big.Int + AmountOutMinimum *big.Int +} + +// ISwapRouterExactInputSingleParams is an auto generated low-level Go binding around an user-defined struct. +type ISwapRouterExactInputSingleParams struct { + TokenIn common.Address + TokenOut common.Address + Fee *big.Int + Recipient common.Address + Deadline *big.Int + AmountIn *big.Int + AmountOutMinimum *big.Int + SqrtPriceLimitX96 *big.Int +} + +// ISwapRouterExactOutputParams is an auto generated low-level Go binding around an user-defined struct. +type ISwapRouterExactOutputParams struct { + Path []byte + Recipient common.Address + Deadline *big.Int + AmountOut *big.Int + AmountInMaximum *big.Int +} + +// ISwapRouterExactOutputSingleParams is an auto generated low-level Go binding around an user-defined struct. +type ISwapRouterExactOutputSingleParams struct { + TokenIn common.Address + TokenOut common.Address + Fee *big.Int + Recipient common.Address + Deadline *big.Int + AmountOut *big.Int + AmountInMaximum *big.Int + SqrtPriceLimitX96 *big.Int +} + +// ISwapRouterMetaData contains all meta data concerning the ISwapRouter contract. +var ISwapRouterMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"path\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMinimum\",\"type\":\"uint256\"}],\"internalType\":\"structISwapRouter.ExactInputParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactInput\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMinimum\",\"type\":\"uint256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"}],\"internalType\":\"structISwapRouter.ExactInputSingleParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactInputSingle\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"path\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMaximum\",\"type\":\"uint256\"}],\"internalType\":\"structISwapRouter.ExactOutputParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactOutput\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"fee\",\"type\":\"uint24\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMaximum\",\"type\":\"uint256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"}],\"internalType\":\"structISwapRouter.ExactOutputSingleParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactOutputSingle\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"amount0Delta\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"amount1Delta\",\"type\":\"int256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV3SwapCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// ISwapRouterABI is the input ABI used to generate the binding from. +// Deprecated: Use ISwapRouterMetaData.ABI instead. +var ISwapRouterABI = ISwapRouterMetaData.ABI + +// ISwapRouter is an auto generated Go binding around an Ethereum contract. +type ISwapRouter struct { + ISwapRouterCaller // Read-only binding to the contract + ISwapRouterTransactor // Write-only binding to the contract + ISwapRouterFilterer // Log filterer for contract events +} + +// ISwapRouterCaller is an auto generated read-only Go binding around an Ethereum contract. +type ISwapRouterCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISwapRouterTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ISwapRouterTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISwapRouterFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ISwapRouterFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISwapRouterSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ISwapRouterSession struct { + Contract *ISwapRouter // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ISwapRouterCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ISwapRouterCallerSession struct { + Contract *ISwapRouterCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ISwapRouterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ISwapRouterTransactorSession struct { + Contract *ISwapRouterTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ISwapRouterRaw is an auto generated low-level Go binding around an Ethereum contract. +type ISwapRouterRaw struct { + Contract *ISwapRouter // Generic contract binding to access the raw methods on +} + +// ISwapRouterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ISwapRouterCallerRaw struct { + Contract *ISwapRouterCaller // Generic read-only contract binding to access the raw methods on +} + +// ISwapRouterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ISwapRouterTransactorRaw struct { + Contract *ISwapRouterTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewISwapRouter creates a new instance of ISwapRouter, bound to a specific deployed contract. +func NewISwapRouter(address common.Address, backend bind.ContractBackend) (*ISwapRouter, error) { + contract, err := bindISwapRouter(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ISwapRouter{ISwapRouterCaller: ISwapRouterCaller{contract: contract}, ISwapRouterTransactor: ISwapRouterTransactor{contract: contract}, ISwapRouterFilterer: ISwapRouterFilterer{contract: contract}}, nil +} + +// NewISwapRouterCaller creates a new read-only instance of ISwapRouter, bound to a specific deployed contract. +func NewISwapRouterCaller(address common.Address, caller bind.ContractCaller) (*ISwapRouterCaller, error) { + contract, err := bindISwapRouter(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ISwapRouterCaller{contract: contract}, nil +} + +// NewISwapRouterTransactor creates a new write-only instance of ISwapRouter, bound to a specific deployed contract. +func NewISwapRouterTransactor(address common.Address, transactor bind.ContractTransactor) (*ISwapRouterTransactor, error) { + contract, err := bindISwapRouter(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ISwapRouterTransactor{contract: contract}, nil +} + +// NewISwapRouterFilterer creates a new log filterer instance of ISwapRouter, bound to a specific deployed contract. +func NewISwapRouterFilterer(address common.Address, filterer bind.ContractFilterer) (*ISwapRouterFilterer, error) { + contract, err := bindISwapRouter(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ISwapRouterFilterer{contract: contract}, nil +} + +// bindISwapRouter binds a generic wrapper to an already deployed contract. +func bindISwapRouter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ISwapRouterMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ISwapRouter *ISwapRouterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ISwapRouter.Contract.ISwapRouterCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ISwapRouter *ISwapRouterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ISwapRouter.Contract.ISwapRouterTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ISwapRouter *ISwapRouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ISwapRouter.Contract.ISwapRouterTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ISwapRouter *ISwapRouterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ISwapRouter.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ISwapRouter *ISwapRouterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ISwapRouter.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ISwapRouter *ISwapRouterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ISwapRouter.Contract.contract.Transact(opts, method, params...) +} + +// ExactInput is a paid mutator transaction binding the contract method 0xc04b8d59. +// +// Solidity: function exactInput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountOut) +func (_ISwapRouter *ISwapRouterTransactor) ExactInput(opts *bind.TransactOpts, params ISwapRouterExactInputParams) (*types.Transaction, error) { + return _ISwapRouter.contract.Transact(opts, "exactInput", params) +} + +// ExactInput is a paid mutator transaction binding the contract method 0xc04b8d59. +// +// Solidity: function exactInput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountOut) +func (_ISwapRouter *ISwapRouterSession) ExactInput(params ISwapRouterExactInputParams) (*types.Transaction, error) { + return _ISwapRouter.Contract.ExactInput(&_ISwapRouter.TransactOpts, params) +} + +// ExactInput is a paid mutator transaction binding the contract method 0xc04b8d59. +// +// Solidity: function exactInput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountOut) +func (_ISwapRouter *ISwapRouterTransactorSession) ExactInput(params ISwapRouterExactInputParams) (*types.Transaction, error) { + return _ISwapRouter.Contract.ExactInput(&_ISwapRouter.TransactOpts, params) +} + +// ExactInputSingle is a paid mutator transaction binding the contract method 0x414bf389. +// +// Solidity: function exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountOut) +func (_ISwapRouter *ISwapRouterTransactor) ExactInputSingle(opts *bind.TransactOpts, params ISwapRouterExactInputSingleParams) (*types.Transaction, error) { + return _ISwapRouter.contract.Transact(opts, "exactInputSingle", params) +} + +// ExactInputSingle is a paid mutator transaction binding the contract method 0x414bf389. +// +// Solidity: function exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountOut) +func (_ISwapRouter *ISwapRouterSession) ExactInputSingle(params ISwapRouterExactInputSingleParams) (*types.Transaction, error) { + return _ISwapRouter.Contract.ExactInputSingle(&_ISwapRouter.TransactOpts, params) +} + +// ExactInputSingle is a paid mutator transaction binding the contract method 0x414bf389. +// +// Solidity: function exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountOut) +func (_ISwapRouter *ISwapRouterTransactorSession) ExactInputSingle(params ISwapRouterExactInputSingleParams) (*types.Transaction, error) { + return _ISwapRouter.Contract.ExactInputSingle(&_ISwapRouter.TransactOpts, params) +} + +// ExactOutput is a paid mutator transaction binding the contract method 0xf28c0498. +// +// Solidity: function exactOutput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountIn) +func (_ISwapRouter *ISwapRouterTransactor) ExactOutput(opts *bind.TransactOpts, params ISwapRouterExactOutputParams) (*types.Transaction, error) { + return _ISwapRouter.contract.Transact(opts, "exactOutput", params) +} + +// ExactOutput is a paid mutator transaction binding the contract method 0xf28c0498. +// +// Solidity: function exactOutput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountIn) +func (_ISwapRouter *ISwapRouterSession) ExactOutput(params ISwapRouterExactOutputParams) (*types.Transaction, error) { + return _ISwapRouter.Contract.ExactOutput(&_ISwapRouter.TransactOpts, params) +} + +// ExactOutput is a paid mutator transaction binding the contract method 0xf28c0498. +// +// Solidity: function exactOutput((bytes,address,uint256,uint256,uint256) params) payable returns(uint256 amountIn) +func (_ISwapRouter *ISwapRouterTransactorSession) ExactOutput(params ISwapRouterExactOutputParams) (*types.Transaction, error) { + return _ISwapRouter.Contract.ExactOutput(&_ISwapRouter.TransactOpts, params) +} + +// ExactOutputSingle is a paid mutator transaction binding the contract method 0xdb3e2198. +// +// Solidity: function exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountIn) +func (_ISwapRouter *ISwapRouterTransactor) ExactOutputSingle(opts *bind.TransactOpts, params ISwapRouterExactOutputSingleParams) (*types.Transaction, error) { + return _ISwapRouter.contract.Transact(opts, "exactOutputSingle", params) +} + +// ExactOutputSingle is a paid mutator transaction binding the contract method 0xdb3e2198. +// +// Solidity: function exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountIn) +func (_ISwapRouter *ISwapRouterSession) ExactOutputSingle(params ISwapRouterExactOutputSingleParams) (*types.Transaction, error) { + return _ISwapRouter.Contract.ExactOutputSingle(&_ISwapRouter.TransactOpts, params) +} + +// ExactOutputSingle is a paid mutator transaction binding the contract method 0xdb3e2198. +// +// Solidity: function exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160) params) payable returns(uint256 amountIn) +func (_ISwapRouter *ISwapRouterTransactorSession) ExactOutputSingle(params ISwapRouterExactOutputSingleParams) (*types.Transaction, error) { + return _ISwapRouter.Contract.ExactOutputSingle(&_ISwapRouter.TransactOpts, params) +} + +// UniswapV3SwapCallback is a paid mutator transaction binding the contract method 0xfa461e33. +// +// Solidity: function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes data) returns() +func (_ISwapRouter *ISwapRouterTransactor) UniswapV3SwapCallback(opts *bind.TransactOpts, amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error) { + return _ISwapRouter.contract.Transact(opts, "uniswapV3SwapCallback", amount0Delta, amount1Delta, data) +} + +// UniswapV3SwapCallback is a paid mutator transaction binding the contract method 0xfa461e33. +// +// Solidity: function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes data) returns() +func (_ISwapRouter *ISwapRouterSession) UniswapV3SwapCallback(amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error) { + return _ISwapRouter.Contract.UniswapV3SwapCallback(&_ISwapRouter.TransactOpts, amount0Delta, amount1Delta, data) +} + +// UniswapV3SwapCallback is a paid mutator transaction binding the contract method 0xfa461e33. +// +// Solidity: function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes data) returns() +func (_ISwapRouter *ISwapRouterTransactorSession) UniswapV3SwapCallback(amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error) { + return _ISwapRouter.Contract.UniswapV3SwapCallback(&_ISwapRouter.TransactOpts, amount0Delta, amount1Delta, data) +} diff --git a/precompiles/bank/method_test.go b/precompiles/bank/method_test.go index d820d38f71..46a33a740e 100644 --- a/precompiles/bank/method_test.go +++ b/precompiles/bank/method_test.go @@ -16,14 +16,14 @@ import ( evmkeeper "github.com/zeta-chain/ethermint/x/evm/keeper" "github.com/zeta-chain/ethermint/x/evm/statedb" "github.com/zeta-chain/node/pkg/chains" - erc1967proxy "github.com/zeta-chain/node/pkg/contracts/erc1967proxy" + "github.com/zeta-chain/node/pkg/contracts/erc1967proxy" precompiletypes "github.com/zeta-chain/node/precompiles/types" "github.com/zeta-chain/node/testutil/keeper" "github.com/zeta-chain/node/testutil/sample" fungiblekeeper "github.com/zeta-chain/node/x/fungible/keeper" fungibletypes "github.com/zeta-chain/node/x/fungible/types" - gatewayzevm "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" ) func Test_Methods(t *testing.T) { diff --git a/precompiles/staking/staking_test.go b/precompiles/staking/staking_test.go index 4b0307c4dc..0d35b73132 100644 --- a/precompiles/staking/staking_test.go +++ b/precompiles/staking/staking_test.go @@ -33,8 +33,8 @@ import ( "github.com/zeta-chain/node/testutil/sample" fungiblekeeper "github.com/zeta-chain/node/x/fungible/keeper" fungibletypes "github.com/zeta-chain/node/x/fungible/types" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" ) func Test_IStakingContract(t *testing.T) { diff --git a/testutil/sample/crosschain.go b/testutil/sample/crosschain.go index b3ed7d5ee8..f05af0db75 100644 --- a/testutil/sample/crosschain.go +++ b/testutil/sample/crosschain.go @@ -16,7 +16,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/pkg/chains" "github.com/zeta-chain/node/pkg/coin" diff --git a/x/crosschain/keeper/evm_hooks.go b/x/crosschain/keeper/evm_hooks.go index d09f771fbb..c05e0e9ad0 100644 --- a/x/crosschain/keeper/evm_hooks.go +++ b/x/crosschain/keeper/evm_hooks.go @@ -15,8 +15,8 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" evmtypes "github.com/zeta-chain/ethermint/x/evm/types" - connectorzevm "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/zetaconnectorzevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + connectorzevm "github.com/zeta-chain/protocol-contracts/pkg/zetaconnectorzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/cmd/zetacored/config" "github.com/zeta-chain/node/pkg/chains" diff --git a/x/crosschain/keeper/utils_test.go b/x/crosschain/keeper/utils_test.go index 258e11cedf..89612a91c1 100644 --- a/x/crosschain/keeper/utils_test.go +++ b/x/crosschain/keeper/utils_test.go @@ -5,17 +5,15 @@ import ( "math/big" "testing" - "github.com/zeta-chain/node/pkg/contracts/erc1967proxy" - fungibletypes "github.com/zeta-chain/node/x/fungible/types" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" - sdk "github.com/cosmos/cosmos-sdk/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - evmkeeper "github.com/zeta-chain/ethermint/x/evm/keeper" - "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" + "github.com/zeta-chain/node/pkg/contracts/erc1967proxy" + "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-periphery/contracts/uniswapv2router02.sol" + fungibletypes "github.com/zeta-chain/node/x/fungible/types" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/cmd/zetacored/config" "github.com/zeta-chain/node/pkg/chains" diff --git a/x/crosschain/types/inbound_parsing.go b/x/crosschain/types/inbound_parsing.go index e057183f2c..e49e51530a 100644 --- a/x/crosschain/types/inbound_parsing.go +++ b/x/crosschain/types/inbound_parsing.go @@ -10,7 +10,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/pkg/chains" "github.com/zeta-chain/node/pkg/coin" diff --git a/x/crosschain/types/message_vote_inbound.go b/x/crosschain/types/message_vote_inbound.go index e612fe582a..8f47ad8050 100644 --- a/x/crosschain/types/message_vote_inbound.go +++ b/x/crosschain/types/message_vote_inbound.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/pkg/authz" "github.com/zeta-chain/node/pkg/coin" diff --git a/x/crosschain/types/message_vote_inbound_test.go b/x/crosschain/types/message_vote_inbound_test.go index 2c30b2a343..973fcdd0c0 100644 --- a/x/crosschain/types/message_vote_inbound_test.go +++ b/x/crosschain/types/message_vote_inbound_test.go @@ -5,8 +5,8 @@ import ( "math/rand" "testing" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/crosschain/types/revert_options.go b/x/crosschain/types/revert_options.go index 4893b19ad3..a5fd311a67 100644 --- a/x/crosschain/types/revert_options.go +++ b/x/crosschain/types/revert_options.go @@ -3,8 +3,8 @@ package types import ( sdkmath "cosmossdk.io/math" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/pkg/chains" "github.com/zeta-chain/node/pkg/crypto" diff --git a/x/fungible/keeper/deposits.go b/x/fungible/keeper/deposits.go index 3a5c24d1bb..07a0649bec 100644 --- a/x/fungible/keeper/deposits.go +++ b/x/fungible/keeper/deposits.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" eth "github.com/ethereum/go-ethereum/common" evmtypes "github.com/zeta-chain/ethermint/x/evm/types" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" "github.com/zeta-chain/node/pkg/coin" crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" diff --git a/x/fungible/keeper/evm.go b/x/fungible/keeper/evm.go index 6abd4444d9..3616c63f97 100644 --- a/x/fungible/keeper/evm.go +++ b/x/fungible/keeper/evm.go @@ -21,15 +21,15 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" evmtypes "github.com/zeta-chain/ethermint/x/evm/types" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/wzeta.sol" - zevmconnectorcontract "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/zetaconnectorzevm.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-core/contracts/uniswapv2factory.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/wzeta.sol" + zevmconnectorcontract "github.com/zeta-chain/protocol-contracts/pkg/zetaconnectorzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/pkg/chains" "github.com/zeta-chain/node/pkg/coin" + "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-core/contracts/uniswapv2factory.sol" + "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-periphery/contracts/uniswapv2router02.sol" "github.com/zeta-chain/node/server/config" "github.com/zeta-chain/node/x/fungible/types" observertypes "github.com/zeta-chain/node/x/observer/types" diff --git a/x/fungible/keeper/evm_test.go b/x/fungible/keeper/evm_test.go index 7c0ef0bf00..82b32ae1f8 100644 --- a/x/fungible/keeper/evm_test.go +++ b/x/fungible/keeper/evm_test.go @@ -15,11 +15,11 @@ import ( evmtypes "github.com/zeta-chain/ethermint/x/evm/types" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/wzeta.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/erc1967proxy.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc1967proxy.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/wzeta.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/e2e/utils" "github.com/zeta-chain/node/pkg/chains" diff --git a/x/fungible/keeper/gas_coin_and_pool.go b/x/fungible/keeper/gas_coin_and_pool.go index 57133b0903..01ea739e43 100644 --- a/x/fungible/keeper/gas_coin_and_pool.go +++ b/x/fungible/keeper/gas_coin_and_pool.go @@ -6,14 +6,14 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/pkg/chains" "github.com/zeta-chain/node/pkg/coin" + "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-periphery/contracts/uniswapv2router02.sol" "github.com/zeta-chain/node/x/fungible/types" - zetaObserverTypes "github.com/zeta-chain/node/x/observer/types" + observertypes "github.com/zeta-chain/node/x/observer/types" ) // SetupChainGasCoinAndPool setup gas ZRC20, and ZETA/gas pool for a chain @@ -32,7 +32,7 @@ func (k Keeper) SetupChainGasCoinAndPool( chain, found := chains.GetChainFromChainID(chainID, additionalChains) if !found { - return ethcommon.Address{}, zetaObserverTypes.ErrSupportedChains + return ethcommon.Address{}, observertypes.ErrSupportedChains } transferGasLimit := gasLimit diff --git a/x/fungible/keeper/gas_coin_and_pool_test.go b/x/fungible/keeper/gas_coin_and_pool_test.go index 186828c8b4..c7b02ef499 100644 --- a/x/fungible/keeper/gas_coin_and_pool_test.go +++ b/x/fungible/keeper/gas_coin_and_pool_test.go @@ -2,6 +2,7 @@ package keeper_test import ( "errors" + "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-periphery/contracts/uniswapv2router02.sol" "math/big" "testing" @@ -13,8 +14,7 @@ import ( evmkeeper "github.com/zeta-chain/ethermint/x/evm/keeper" evmtypes "github.com/zeta-chain/ethermint/x/evm/types" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" - uniswapv2router02 "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" "github.com/zeta-chain/node/cmd/zetacored/config" keepertest "github.com/zeta-chain/node/testutil/keeper" diff --git a/x/fungible/keeper/gas_price.go b/x/fungible/keeper/gas_price.go index 4eccdc9feb..3d58624ad5 100644 --- a/x/fungible/keeper/gas_price.go +++ b/x/fungible/keeper/gas_price.go @@ -6,7 +6,7 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - systemcontract "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" "github.com/zeta-chain/node/x/fungible/types" ) diff --git a/x/fungible/keeper/gas_price_test.go b/x/fungible/keeper/gas_price_test.go index e48392eb45..0530630360 100644 --- a/x/fungible/keeper/gas_price_test.go +++ b/x/fungible/keeper/gas_price_test.go @@ -6,7 +6,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" keepertest "github.com/zeta-chain/node/testutil/keeper" "github.com/zeta-chain/node/testutil/sample" diff --git a/x/fungible/keeper/msg_server_update_gateway_contract_test.go b/x/fungible/keeper/msg_server_update_gateway_contract_test.go index ba838b3674..5e1e8d2682 100644 --- a/x/fungible/keeper/msg_server_update_gateway_contract_test.go +++ b/x/fungible/keeper/msg_server_update_gateway_contract_test.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/zeta-chain/node/pkg/chains" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/stretchr/testify/require" keepertest "github.com/zeta-chain/node/testutil/keeper" diff --git a/x/fungible/keeper/msg_server_update_system_contract.go b/x/fungible/keeper/msg_server_update_system_contract.go index 868bf42f85..ea9f988a85 100644 --- a/x/fungible/keeper/msg_server_update_system_contract.go +++ b/x/fungible/keeper/msg_server_update_system_contract.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/pkg/coin" authoritytypes "github.com/zeta-chain/node/x/authority/types" diff --git a/x/fungible/keeper/msg_server_update_system_contract_test.go b/x/fungible/keeper/msg_server_update_system_contract_test.go index 0b996ece24..97dcbe2d0f 100644 --- a/x/fungible/keeper/msg_server_update_system_contract_test.go +++ b/x/fungible/keeper/msg_server_update_system_contract_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/require" evmtypes "github.com/zeta-chain/ethermint/x/evm/types" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/pkg/chains" keepertest "github.com/zeta-chain/node/testutil/keeper" diff --git a/x/fungible/keeper/msg_server_update_zrc20_withdraw_fee_test.go b/x/fungible/keeper/msg_server_update_zrc20_withdraw_fee_test.go index b7c3ecfb85..f461ccfceb 100644 --- a/x/fungible/keeper/msg_server_update_zrc20_withdraw_fee_test.go +++ b/x/fungible/keeper/msg_server_update_zrc20_withdraw_fee_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" evmtypes "github.com/zeta-chain/ethermint/x/evm/types" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" keepertest "github.com/zeta-chain/node/testutil/keeper" "github.com/zeta-chain/node/testutil/sample" diff --git a/x/fungible/keeper/system_contract.go b/x/fungible/keeper/system_contract.go index cba3cc09b3..772defca1a 100644 --- a/x/fungible/keeper/system_contract.go +++ b/x/fungible/keeper/system_contract.go @@ -8,11 +8,11 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/zevm/wzeta.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/wzeta.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" + "github.com/zeta-chain/node/pkg/contracts/uniswap/v2-periphery/contracts/uniswapv2router02.sol" "github.com/zeta-chain/node/x/fungible/types" ) diff --git a/x/fungible/keeper/v2_deposits.go b/x/fungible/keeper/v2_deposits.go index 16486dcbff..5e6f477902 100644 --- a/x/fungible/keeper/v2_deposits.go +++ b/x/fungible/keeper/v2_deposits.go @@ -8,7 +8,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" evmtypes "github.com/zeta-chain/ethermint/x/evm/types" - "github.com/zeta-chain/protocol-contracts/v2/pkg/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" "github.com/zeta-chain/node/pkg/coin" ) diff --git a/x/fungible/keeper/v2_evm.go b/x/fungible/keeper/v2_evm.go index c92116ca4b..4b5b233e6d 100644 --- a/x/fungible/keeper/v2_evm.go +++ b/x/fungible/keeper/v2_evm.go @@ -6,10 +6,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" evmtypes "github.com/zeta-chain/ethermint/x/evm/types" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/revert.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/systemcontract.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayzevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/revert.sol" + "github.com/zeta-chain/protocol-contracts/pkg/systemcontract.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/pkg/crypto" "github.com/zeta-chain/node/x/fungible/types" diff --git a/x/fungible/keeper/zrc20_cosmos_coin_mapping_test.go b/x/fungible/keeper/zrc20_cosmos_coin_mapping_test.go index c19866e217..6597252874 100644 --- a/x/fungible/keeper/zrc20_cosmos_coin_mapping_test.go +++ b/x/fungible/keeper/zrc20_cosmos_coin_mapping_test.go @@ -13,7 +13,7 @@ import ( "github.com/zeta-chain/node/testutil/sample" fungiblekeeper "github.com/zeta-chain/node/x/fungible/keeper" fungibletypes "github.com/zeta-chain/node/x/fungible/types" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" ) func Test_LockZRC20(t *testing.T) { diff --git a/x/fungible/keeper/zrc20_methods.go b/x/fungible/keeper/zrc20_methods.go index 4d7c7f5174..e303d2772a 100644 --- a/x/fungible/keeper/zrc20_methods.go +++ b/x/fungible/keeper/zrc20_methods.go @@ -7,7 +7,7 @@ import ( "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" "github.com/zeta-chain/node/pkg/crypto" fungibletypes "github.com/zeta-chain/node/x/fungible/types" diff --git a/x/fungible/keeper/zrc20_methods_test.go b/x/fungible/keeper/zrc20_methods_test.go index 3d64a05928..e418dd3948 100644 --- a/x/fungible/keeper/zrc20_methods_test.go +++ b/x/fungible/keeper/zrc20_methods_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" "github.com/zeta-chain/node/testutil/sample" fungibletypes "github.com/zeta-chain/node/x/fungible/types" - "github.com/zeta-chain/protocol-contracts/v2/pkg/zrc20.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zrc20.sol" ) func Test_ZRC20Allowance(t *testing.T) { diff --git a/zetaclient/chains/evm/observer/inbound.go b/zetaclient/chains/evm/observer/inbound.go index 3f59fd8f56..741bfc6ee9 100644 --- a/zetaclient/chains/evm/observer/inbound.go +++ b/zetaclient/chains/evm/observer/inbound.go @@ -17,8 +17,8 @@ import ( "github.com/onrik/ethrpc" "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.non-eth.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.non-eth.sol" "github.com/zeta-chain/node/pkg/coin" "github.com/zeta-chain/node/pkg/constant" diff --git a/zetaclient/chains/evm/observer/observer.go b/zetaclient/chains/evm/observer/observer.go index 1cab216648..cf7f13a9fc 100644 --- a/zetaclient/chains/evm/observer/observer.go +++ b/zetaclient/chains/evm/observer/observer.go @@ -11,12 +11,11 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/onrik/ethrpc" "github.com/pkg/errors" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zeta.non-eth.sol" - zetaconnectoreth "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.eth.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.non-eth.sol" - erc20custodyv2 "github.com/zeta-chain/protocol-contracts/v2/pkg/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zeta.non-eth.sol" + zetaconnectoreth "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.eth.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.non-eth.sol" "github.com/zeta-chain/node/pkg/bg" "github.com/zeta-chain/node/pkg/chains" @@ -131,9 +130,9 @@ func (ob *Observer) GetERC20CustodyContract() (ethcommon.Address, *erc20custody. // NOTE: we use the same address as gateway v1 // this simplify the migration process v1 will be completely removed in the future // currently the ABI for withdraw is identical, therefore both contract instances can be used -func (ob *Observer) GetERC20CustodyV2Contract() (ethcommon.Address, *erc20custodyv2.ERC20Custody, error) { +func (ob *Observer) GetERC20CustodyV2Contract() (ethcommon.Address, *erc20custody.ERC20Custody, error) { addr := ethcommon.HexToAddress(ob.ChainParams().Erc20CustodyContractAddress) - contract, err := erc20custodyv2.NewERC20Custody(addr, ob.evmClient) + contract, err := erc20custody.NewERC20Custody(addr, ob.evmClient) return addr, contract, err } diff --git a/zetaclient/chains/evm/observer/outbound.go b/zetaclient/chains/evm/observer/outbound.go index f8808d495d..6ddf24e692 100644 --- a/zetaclient/chains/evm/observer/outbound.go +++ b/zetaclient/chains/evm/observer/outbound.go @@ -13,10 +13,9 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.non-eth.sol" - erc20custodyv2 "github.com/zeta-chain/protocol-contracts/v2/pkg/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.non-eth.sol" "github.com/zeta-chain/node/pkg/chains" "github.com/zeta-chain/node/pkg/coin" @@ -284,7 +283,7 @@ func parseOutboundReceivedValue( connector *zetaconnector.ZetaConnectorNonEth, custodyAddress ethcommon.Address, custody *erc20custody.ERC20Custody, - custodyV2 *erc20custodyv2.ERC20Custody, + custodyV2 *erc20custody.ERC20Custody, gatewayAddress ethcommon.Address, gateway *gatewayevm.GatewayEVM, ) (*big.Int, chains.ReceiveStatus, error) { @@ -408,13 +407,13 @@ func ParseAndCheckWithdrawnEvent( if err != nil { return nil, errors.Wrap(err, "error validating Withdrawn event") } - if !strings.EqualFold(withdrawn.Recipient.Hex(), params.Receiver) { + if !strings.EqualFold(withdrawn.To.Hex(), params.Receiver) { return nil, fmt.Errorf("receiver address mismatch in Withdrawn event, want %s got %s", - params.Receiver, withdrawn.Recipient.Hex()) + params.Receiver, withdrawn.To.Hex()) } - if !strings.EqualFold(withdrawn.Asset.Hex(), cctx.InboundParams.Asset) { + if !strings.EqualFold(withdrawn.Token.Hex(), cctx.InboundParams.Asset) { return nil, fmt.Errorf("asset mismatch in Withdrawn event, want %s got %s", - cctx.InboundParams.Asset, withdrawn.Asset.Hex()) + cctx.InboundParams.Asset, withdrawn.Token.Hex()) } if withdrawn.Amount.Cmp(params.Amount.BigInt()) != 0 { return nil, fmt.Errorf("amount mismatch in Withdrawn event, want %s got %s", diff --git a/zetaclient/chains/evm/observer/outbound_test.go b/zetaclient/chains/evm/observer/outbound_test.go index 1e22abf153..5c93edb3f0 100644 --- a/zetaclient/chains/evm/observer/outbound_test.go +++ b/zetaclient/chains/evm/observer/outbound_test.go @@ -15,8 +15,8 @@ import ( "github.com/zeta-chain/node/zetaclient/config" "github.com/zeta-chain/node/zetaclient/testutils" "github.com/zeta-chain/node/zetaclient/testutils/mocks" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.non-eth.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.non-eth.sol" ) func Test_IsOutboundProcessed(t *testing.T) { diff --git a/zetaclient/chains/evm/observer/v2_inbound.go b/zetaclient/chains/evm/observer/v2_inbound.go index 6422034273..69d661509c 100644 --- a/zetaclient/chains/evm/observer/v2_inbound.go +++ b/zetaclient/chains/evm/observer/v2_inbound.go @@ -10,7 +10,7 @@ import ( sdkmath "cosmossdk.io/math" "github.com/ethereum/go-ethereum/accounts/abi/bind" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/pkg/coin" "github.com/zeta-chain/node/pkg/constant" diff --git a/zetaclient/chains/evm/observer/v2_outbound.go b/zetaclient/chains/evm/observer/v2_outbound.go index 34da226a86..050165276a 100644 --- a/zetaclient/chains/evm/observer/v2_outbound.go +++ b/zetaclient/chains/evm/observer/v2_outbound.go @@ -10,8 +10,8 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" - "github.com/zeta-chain/protocol-contracts/v2/pkg/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/pkg/chains" crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" diff --git a/zetaclient/chains/evm/signer/outbound_data.go b/zetaclient/chains/evm/signer/outbound_data.go index 200ae1f70b..8aa296faf0 100644 --- a/zetaclient/chains/evm/signer/outbound_data.go +++ b/zetaclient/chains/evm/signer/outbound_data.go @@ -10,7 +10,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/pkg/coin" "github.com/zeta-chain/node/x/crosschain/types" diff --git a/zetaclient/chains/evm/signer/sign.go b/zetaclient/chains/evm/signer/sign.go index d753e97c07..ef6908aafc 100644 --- a/zetaclient/chains/evm/signer/sign.go +++ b/zetaclient/chains/evm/signer/sign.go @@ -7,8 +7,8 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/erc20custody.sol" - connectorevm "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.base.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + connectorevm "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.base.sol" "github.com/zeta-chain/node/zetaclient/chains/evm" ) diff --git a/zetaclient/chains/evm/signer/signer_admin.go b/zetaclient/chains/evm/signer/signer_admin.go index 07055d4170..7954120a0e 100644 --- a/zetaclient/chains/evm/signer/signer_admin.go +++ b/zetaclient/chains/evm/signer/signer_admin.go @@ -8,7 +8,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" "github.com/zeta-chain/node/pkg/constant" ) diff --git a/zetaclient/chains/evm/signer/v2_sign.go b/zetaclient/chains/evm/signer/v2_sign.go index 443f304785..0e6ae9e589 100644 --- a/zetaclient/chains/evm/signer/v2_sign.go +++ b/zetaclient/chains/evm/signer/v2_sign.go @@ -7,9 +7,9 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" - erc20custodyv2 "github.com/zeta-chain/protocol-contracts/v2/pkg/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" - "github.com/zeta-chain/protocol-contracts/v2/pkg/revert.sol" + erc20custodyv2 "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" + "github.com/zeta-chain/protocol-contracts/pkg/revert.sol" ) // signGatewayExecute signs a gateway execute diff --git a/zetaclient/testutils/evm.go b/zetaclient/testutils/evm.go index 7a0218fecf..5b9fde0b32 100644 --- a/zetaclient/testutils/evm.go +++ b/zetaclient/testutils/evm.go @@ -2,8 +2,8 @@ package testutils import ( ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.non-eth.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.non-eth.sol" ) // ParseReceiptZetaSent parses a ZetaSent event from a receipt diff --git a/zetaclient/testutils/mocks/chain_params.go b/zetaclient/testutils/mocks/chain_params.go index c421097c5a..1fe6849add 100644 --- a/zetaclient/testutils/mocks/chain_params.go +++ b/zetaclient/testutils/mocks/chain_params.go @@ -5,8 +5,8 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/stretchr/testify/require" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/erc20custody.sol" - "github.com/zeta-chain/protocol-contracts/v1/pkg/contracts/evm/zetaconnector.non-eth.sol" + "github.com/zeta-chain/protocol-contracts/pkg/erc20custody.sol" + "github.com/zeta-chain/protocol-contracts/pkg/zetaconnector.non-eth.sol" "github.com/zeta-chain/node/pkg/constant" observertypes "github.com/zeta-chain/node/x/observer/types"