diff --git a/.eslintignore b/.eslintignore index 684857fd..0a19b63b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,5 +3,4 @@ artifacts cache dist node_modules -pkg typechain-types diff --git a/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol b/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol new file mode 100644 index 00000000..e4fbc397 --- /dev/null +++ b/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol @@ -0,0 +1,220 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.7; + +import "@openzeppelin/contracts/interfaces/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; +import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol"; +import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol"; + +import "../interfaces/ZetaInterfaces.sol"; + +interface ZetaTokenConsumerUniV3Errors { + error InputCantBeZero(); + + error ErrorSendingETH(); + + error ReentrancyError(); +} + +interface WETH9 { + function withdraw(uint256 wad) external; +} + +interface ISwapRouterPancake is IUniswapV3SwapCallback { + struct ExactInputSingleParams { + address tokenIn; + address tokenOut; + uint24 fee; + address recipient; + uint256 amountIn; + uint256 amountOutMinimum; + uint160 sqrtPriceLimitX96; + } + + /// @notice Swaps `amountIn` of one token for as much as possible of another token + /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata + /// @return amountOut The amount of the received token + function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); + + struct ExactInputParams { + bytes path; + address recipient; + uint256 amountIn; + uint256 amountOutMinimum; + } + + /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path + /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata + /// @return amountOut The amount of the received token + function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); +} + +/** + * @dev Uniswap V3 strategy for ZetaTokenConsumer + */ +contract ZetaTokenConsumerPancakeV3 is ZetaTokenConsumer, ZetaTokenConsumerUniV3Errors { + using SafeERC20 for IERC20; + uint256 internal constant MAX_DEADLINE = 200; + + uint24 public immutable zetaPoolFee; + uint24 public immutable tokenPoolFee; + + address public immutable WETH9Address; + address public immutable zetaToken; + + ISwapRouterPancake public immutable pancakeV3Router; + IUniswapV3Factory public immutable uniswapV3Factory; + + bool internal _locked; + + constructor( + address zetaToken_, + address pancakeV3Router_, + address uniswapV3Factory_, + address WETH9Address_, + uint24 zetaPoolFee_, + uint24 tokenPoolFee_ + ) { + if ( + zetaToken_ == address(0) || + pancakeV3Router_ == address(0) || + uniswapV3Factory_ == address(0) || + WETH9Address_ == address(0) + ) revert ZetaCommonErrors.InvalidAddress(); + + zetaToken = zetaToken_; + pancakeV3Router = ISwapRouterPancake(pancakeV3Router_); + uniswapV3Factory = IUniswapV3Factory(uniswapV3Factory_); + WETH9Address = WETH9Address_; + zetaPoolFee = zetaPoolFee_; + tokenPoolFee = tokenPoolFee_; + } + + modifier nonReentrant() { + if (_locked) revert ReentrancyError(); + _locked = true; + _; + _locked = false; + } + + receive() external payable {} + + function getZetaFromEth( + address destinationAddress, + uint256 minAmountOut + ) external payable override returns (uint256) { + if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); + if (msg.value == 0) revert InputCantBeZero(); + + ISwapRouterPancake.ExactInputSingleParams memory params = ISwapRouterPancake.ExactInputSingleParams({ + tokenIn: WETH9Address, + tokenOut: zetaToken, + fee: zetaPoolFee, + recipient: destinationAddress, + amountIn: msg.value, + amountOutMinimum: minAmountOut, + sqrtPriceLimitX96: 0 + }); + + uint256 amountOut = pancakeV3Router.exactInputSingle{value: msg.value}(params); + + emit EthExchangedForZeta(msg.value, amountOut); + return amountOut; + } + + function getZetaFromToken( + address destinationAddress, + uint256 minAmountOut, + address inputToken, + uint256 inputTokenAmount + ) external override returns (uint256) { + if (destinationAddress == address(0) || inputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); + if (inputTokenAmount == 0) revert InputCantBeZero(); + + IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputTokenAmount); + IERC20(inputToken).safeApprove(address(pancakeV3Router), inputTokenAmount); + + ISwapRouterPancake.ExactInputParams memory params = ISwapRouterPancake.ExactInputParams({ + path: abi.encodePacked(inputToken, tokenPoolFee, WETH9Address, zetaPoolFee, zetaToken), + recipient: destinationAddress, + amountIn: inputTokenAmount, + amountOutMinimum: minAmountOut + }); + + uint256 amountOut = pancakeV3Router.exactInput(params); + + emit TokenExchangedForZeta(inputToken, inputTokenAmount, amountOut); + return amountOut; + } + + function getEthFromZeta( + address destinationAddress, + uint256 minAmountOut, + uint256 zetaTokenAmount + ) external override returns (uint256) { + if (destinationAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); + if (zetaTokenAmount == 0) revert InputCantBeZero(); + + IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); + IERC20(zetaToken).safeApprove(address(pancakeV3Router), zetaTokenAmount); + + ISwapRouterPancake.ExactInputSingleParams memory params = ISwapRouterPancake.ExactInputSingleParams({ + tokenIn: zetaToken, + tokenOut: WETH9Address, + fee: zetaPoolFee, + recipient: address(this), + amountIn: zetaTokenAmount, + amountOutMinimum: minAmountOut, + sqrtPriceLimitX96: 0 + }); + + uint256 amountOut = pancakeV3Router.exactInputSingle(params); + + WETH9(WETH9Address).withdraw(amountOut); + + emit ZetaExchangedForEth(zetaTokenAmount, amountOut); + + (bool sent, ) = destinationAddress.call{value: amountOut}(""); + if (!sent) revert ErrorSendingETH(); + + return amountOut; + } + + function getTokenFromZeta( + address destinationAddress, + uint256 minAmountOut, + address outputToken, + uint256 zetaTokenAmount + ) external override nonReentrant returns (uint256) { + if (destinationAddress == address(0) || outputToken == address(0)) revert ZetaCommonErrors.InvalidAddress(); + if (zetaTokenAmount == 0) revert InputCantBeZero(); + + IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), zetaTokenAmount); + IERC20(zetaToken).safeApprove(address(pancakeV3Router), zetaTokenAmount); + + ISwapRouterPancake.ExactInputParams memory params = ISwapRouterPancake.ExactInputParams({ + path: abi.encodePacked(zetaToken, zetaPoolFee, WETH9Address, tokenPoolFee, outputToken), + recipient: destinationAddress, + amountIn: zetaTokenAmount, + amountOutMinimum: minAmountOut + }); + + uint256 amountOut = pancakeV3Router.exactInput(params); + + emit ZetaExchangedForToken(outputToken, zetaTokenAmount, amountOut); + return amountOut; + } + + function hasZetaLiquidity() external view override returns (bool) { + address poolAddress = uniswapV3Factory.getPool(WETH9Address, zetaToken, zetaPoolFee); + + if (poolAddress == address(0)) { + return false; + } + + //@dev: if pool does exist, get its liquidity + IUniswapV3Pool pool = IUniswapV3Pool(poolAddress); + return pool.liquidity() > 0; + } +} diff --git a/data/addresses.json b/data/addresses.json index 5d380984..0365fa5b 100644 --- a/data/addresses.json +++ b/data/addresses.json @@ -91,7 +91,7 @@ "uniswapV2Router02": "0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3", "uniswapV3Factory": "0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865", "uniswapV3Router": "0x9a489505a00cE272eAa5e07Dba6491314CaE3796", - "weth9": "" + "weth9": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd" }, "eth_mainnet": { "uniswapV2Router02": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", diff --git a/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/iswaprouterpancake.go b/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/iswaprouterpancake.go new file mode 100644 index 00000000..df6236ee --- /dev/null +++ b/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/iswaprouterpancake.go @@ -0,0 +1,263 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package zetatokenconsumerpancakev3 + +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 +) + +// ISwapRouterPancakeExactInputParams is an auto generated low-level Go binding around an user-defined struct. +type ISwapRouterPancakeExactInputParams struct { + Path []byte + Recipient common.Address + AmountIn *big.Int + AmountOutMinimum *big.Int +} + +// ISwapRouterPancakeExactInputSingleParams is an auto generated low-level Go binding around an user-defined struct. +type ISwapRouterPancakeExactInputSingleParams struct { + TokenIn common.Address + TokenOut common.Address + Fee *big.Int + Recipient common.Address + AmountIn *big.Int + AmountOutMinimum *big.Int + SqrtPriceLimitX96 *big.Int +} + +// ISwapRouterPancakeMetaData contains all meta data concerning the ISwapRouterPancake contract. +var ISwapRouterPancakeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"path\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMinimum\",\"type\":\"uint256\"}],\"internalType\":\"structISwapRouterPancake.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\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMinimum\",\"type\":\"uint256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"}],\"internalType\":\"structISwapRouterPancake.ExactInputSingleParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"exactInputSingle\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"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\"}]", +} + +// ISwapRouterPancakeABI is the input ABI used to generate the binding from. +// Deprecated: Use ISwapRouterPancakeMetaData.ABI instead. +var ISwapRouterPancakeABI = ISwapRouterPancakeMetaData.ABI + +// ISwapRouterPancake is an auto generated Go binding around an Ethereum contract. +type ISwapRouterPancake struct { + ISwapRouterPancakeCaller // Read-only binding to the contract + ISwapRouterPancakeTransactor // Write-only binding to the contract + ISwapRouterPancakeFilterer // Log filterer for contract events +} + +// ISwapRouterPancakeCaller is an auto generated read-only Go binding around an Ethereum contract. +type ISwapRouterPancakeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISwapRouterPancakeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ISwapRouterPancakeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISwapRouterPancakeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ISwapRouterPancakeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISwapRouterPancakeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ISwapRouterPancakeSession struct { + Contract *ISwapRouterPancake // 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 +} + +// ISwapRouterPancakeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ISwapRouterPancakeCallerSession struct { + Contract *ISwapRouterPancakeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ISwapRouterPancakeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ISwapRouterPancakeTransactorSession struct { + Contract *ISwapRouterPancakeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ISwapRouterPancakeRaw is an auto generated low-level Go binding around an Ethereum contract. +type ISwapRouterPancakeRaw struct { + Contract *ISwapRouterPancake // Generic contract binding to access the raw methods on +} + +// ISwapRouterPancakeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ISwapRouterPancakeCallerRaw struct { + Contract *ISwapRouterPancakeCaller // Generic read-only contract binding to access the raw methods on +} + +// ISwapRouterPancakeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ISwapRouterPancakeTransactorRaw struct { + Contract *ISwapRouterPancakeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewISwapRouterPancake creates a new instance of ISwapRouterPancake, bound to a specific deployed contract. +func NewISwapRouterPancake(address common.Address, backend bind.ContractBackend) (*ISwapRouterPancake, error) { + contract, err := bindISwapRouterPancake(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ISwapRouterPancake{ISwapRouterPancakeCaller: ISwapRouterPancakeCaller{contract: contract}, ISwapRouterPancakeTransactor: ISwapRouterPancakeTransactor{contract: contract}, ISwapRouterPancakeFilterer: ISwapRouterPancakeFilterer{contract: contract}}, nil +} + +// NewISwapRouterPancakeCaller creates a new read-only instance of ISwapRouterPancake, bound to a specific deployed contract. +func NewISwapRouterPancakeCaller(address common.Address, caller bind.ContractCaller) (*ISwapRouterPancakeCaller, error) { + contract, err := bindISwapRouterPancake(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ISwapRouterPancakeCaller{contract: contract}, nil +} + +// NewISwapRouterPancakeTransactor creates a new write-only instance of ISwapRouterPancake, bound to a specific deployed contract. +func NewISwapRouterPancakeTransactor(address common.Address, transactor bind.ContractTransactor) (*ISwapRouterPancakeTransactor, error) { + contract, err := bindISwapRouterPancake(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ISwapRouterPancakeTransactor{contract: contract}, nil +} + +// NewISwapRouterPancakeFilterer creates a new log filterer instance of ISwapRouterPancake, bound to a specific deployed contract. +func NewISwapRouterPancakeFilterer(address common.Address, filterer bind.ContractFilterer) (*ISwapRouterPancakeFilterer, error) { + contract, err := bindISwapRouterPancake(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ISwapRouterPancakeFilterer{contract: contract}, nil +} + +// bindISwapRouterPancake binds a generic wrapper to an already deployed contract. +func bindISwapRouterPancake(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ISwapRouterPancakeMetaData.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 (_ISwapRouterPancake *ISwapRouterPancakeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ISwapRouterPancake.Contract.ISwapRouterPancakeCaller.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 (_ISwapRouterPancake *ISwapRouterPancakeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ISwapRouterPancake.Contract.ISwapRouterPancakeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ISwapRouterPancake *ISwapRouterPancakeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ISwapRouterPancake.Contract.ISwapRouterPancakeTransactor.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 (_ISwapRouterPancake *ISwapRouterPancakeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ISwapRouterPancake.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 (_ISwapRouterPancake *ISwapRouterPancakeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ISwapRouterPancake.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ISwapRouterPancake *ISwapRouterPancakeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ISwapRouterPancake.Contract.contract.Transact(opts, method, params...) +} + +// ExactInput is a paid mutator transaction binding the contract method 0xb858183f. +// +// Solidity: function exactInput((bytes,address,uint256,uint256) params) payable returns(uint256 amountOut) +func (_ISwapRouterPancake *ISwapRouterPancakeTransactor) ExactInput(opts *bind.TransactOpts, params ISwapRouterPancakeExactInputParams) (*types.Transaction, error) { + return _ISwapRouterPancake.contract.Transact(opts, "exactInput", params) +} + +// ExactInput is a paid mutator transaction binding the contract method 0xb858183f. +// +// Solidity: function exactInput((bytes,address,uint256,uint256) params) payable returns(uint256 amountOut) +func (_ISwapRouterPancake *ISwapRouterPancakeSession) ExactInput(params ISwapRouterPancakeExactInputParams) (*types.Transaction, error) { + return _ISwapRouterPancake.Contract.ExactInput(&_ISwapRouterPancake.TransactOpts, params) +} + +// ExactInput is a paid mutator transaction binding the contract method 0xb858183f. +// +// Solidity: function exactInput((bytes,address,uint256,uint256) params) payable returns(uint256 amountOut) +func (_ISwapRouterPancake *ISwapRouterPancakeTransactorSession) ExactInput(params ISwapRouterPancakeExactInputParams) (*types.Transaction, error) { + return _ISwapRouterPancake.Contract.ExactInput(&_ISwapRouterPancake.TransactOpts, params) +} + +// ExactInputSingle is a paid mutator transaction binding the contract method 0x04e45aaf. +// +// Solidity: function exactInputSingle((address,address,uint24,address,uint256,uint256,uint160) params) payable returns(uint256 amountOut) +func (_ISwapRouterPancake *ISwapRouterPancakeTransactor) ExactInputSingle(opts *bind.TransactOpts, params ISwapRouterPancakeExactInputSingleParams) (*types.Transaction, error) { + return _ISwapRouterPancake.contract.Transact(opts, "exactInputSingle", params) +} + +// ExactInputSingle is a paid mutator transaction binding the contract method 0x04e45aaf. +// +// Solidity: function exactInputSingle((address,address,uint24,address,uint256,uint256,uint160) params) payable returns(uint256 amountOut) +func (_ISwapRouterPancake *ISwapRouterPancakeSession) ExactInputSingle(params ISwapRouterPancakeExactInputSingleParams) (*types.Transaction, error) { + return _ISwapRouterPancake.Contract.ExactInputSingle(&_ISwapRouterPancake.TransactOpts, params) +} + +// ExactInputSingle is a paid mutator transaction binding the contract method 0x04e45aaf. +// +// Solidity: function exactInputSingle((address,address,uint24,address,uint256,uint256,uint160) params) payable returns(uint256 amountOut) +func (_ISwapRouterPancake *ISwapRouterPancakeTransactorSession) ExactInputSingle(params ISwapRouterPancakeExactInputSingleParams) (*types.Transaction, error) { + return _ISwapRouterPancake.Contract.ExactInputSingle(&_ISwapRouterPancake.TransactOpts, params) +} + +// UniswapV3SwapCallback is a paid mutator transaction binding the contract method 0xfa461e33. +// +// Solidity: function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes data) returns() +func (_ISwapRouterPancake *ISwapRouterPancakeTransactor) UniswapV3SwapCallback(opts *bind.TransactOpts, amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error) { + return _ISwapRouterPancake.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 (_ISwapRouterPancake *ISwapRouterPancakeSession) UniswapV3SwapCallback(amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error) { + return _ISwapRouterPancake.Contract.UniswapV3SwapCallback(&_ISwapRouterPancake.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 (_ISwapRouterPancake *ISwapRouterPancakeTransactorSession) UniswapV3SwapCallback(amount0Delta *big.Int, amount1Delta *big.Int, data []byte) (*types.Transaction, error) { + return _ISwapRouterPancake.Contract.UniswapV3SwapCallback(&_ISwapRouterPancake.TransactOpts, amount0Delta, amount1Delta, data) +} diff --git a/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/weth9.go b/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/weth9.go new file mode 100644 index 00000000..9268e000 --- /dev/null +++ b/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/weth9.go @@ -0,0 +1,202 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package zetatokenconsumerpancakev3 + +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 +) + +// WETH9MetaData contains all meta data concerning the WETH9 contract. +var WETH9MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// WETH9ABI is the input ABI used to generate the binding from. +// Deprecated: Use WETH9MetaData.ABI instead. +var WETH9ABI = WETH9MetaData.ABI + +// WETH9 is an auto generated Go binding around an Ethereum contract. +type WETH9 struct { + WETH9Caller // Read-only binding to the contract + WETH9Transactor // Write-only binding to the contract + WETH9Filterer // Log filterer for contract events +} + +// WETH9Caller is an auto generated read-only Go binding around an Ethereum contract. +type WETH9Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WETH9Transactor is an auto generated write-only Go binding around an Ethereum contract. +type WETH9Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WETH9Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type WETH9Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WETH9Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type WETH9Session struct { + Contract *WETH9 // 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 +} + +// WETH9CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type WETH9CallerSession struct { + Contract *WETH9Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// WETH9TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type WETH9TransactorSession struct { + Contract *WETH9Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// WETH9Raw is an auto generated low-level Go binding around an Ethereum contract. +type WETH9Raw struct { + Contract *WETH9 // Generic contract binding to access the raw methods on +} + +// WETH9CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type WETH9CallerRaw struct { + Contract *WETH9Caller // Generic read-only contract binding to access the raw methods on +} + +// WETH9TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type WETH9TransactorRaw struct { + Contract *WETH9Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewWETH9 creates a new instance of WETH9, bound to a specific deployed contract. +func NewWETH9(address common.Address, backend bind.ContractBackend) (*WETH9, error) { + contract, err := bindWETH9(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &WETH9{WETH9Caller: WETH9Caller{contract: contract}, WETH9Transactor: WETH9Transactor{contract: contract}, WETH9Filterer: WETH9Filterer{contract: contract}}, nil +} + +// NewWETH9Caller creates a new read-only instance of WETH9, bound to a specific deployed contract. +func NewWETH9Caller(address common.Address, caller bind.ContractCaller) (*WETH9Caller, error) { + contract, err := bindWETH9(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &WETH9Caller{contract: contract}, nil +} + +// NewWETH9Transactor creates a new write-only instance of WETH9, bound to a specific deployed contract. +func NewWETH9Transactor(address common.Address, transactor bind.ContractTransactor) (*WETH9Transactor, error) { + contract, err := bindWETH9(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &WETH9Transactor{contract: contract}, nil +} + +// NewWETH9Filterer creates a new log filterer instance of WETH9, bound to a specific deployed contract. +func NewWETH9Filterer(address common.Address, filterer bind.ContractFilterer) (*WETH9Filterer, error) { + contract, err := bindWETH9(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &WETH9Filterer{contract: contract}, nil +} + +// bindWETH9 binds a generic wrapper to an already deployed contract. +func bindWETH9(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := WETH9MetaData.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 (_WETH9 *WETH9Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _WETH9.Contract.WETH9Caller.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 (_WETH9 *WETH9Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WETH9.Contract.WETH9Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_WETH9 *WETH9Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WETH9.Contract.WETH9Transactor.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 (_WETH9 *WETH9CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _WETH9.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 (_WETH9 *WETH9TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WETH9.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_WETH9 *WETH9TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WETH9.Contract.contract.Transact(opts, method, params...) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 wad) returns() +func (_WETH9 *WETH9Transactor) Withdraw(opts *bind.TransactOpts, wad *big.Int) (*types.Transaction, error) { + return _WETH9.contract.Transact(opts, "withdraw", wad) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 wad) returns() +func (_WETH9 *WETH9Session) Withdraw(wad *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.Withdraw(&_WETH9.TransactOpts, wad) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 wad) returns() +func (_WETH9 *WETH9TransactorSession) Withdraw(wad *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.Withdraw(&_WETH9.TransactOpts, wad) +} diff --git a/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/zetatokenconsumerpancakev3.go b/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/zetatokenconsumerpancakev3.go new file mode 100644 index 00000000..53cdb729 --- /dev/null +++ b/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/zetatokenconsumerpancakev3.go @@ -0,0 +1,1067 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package zetatokenconsumerpancakev3 + +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 +) + +// ZetaTokenConsumerPancakeV3MetaData contains all meta data concerning the ZetaTokenConsumerPancakeV3 contract. +var ZetaTokenConsumerPancakeV3MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"zetaToken_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"pancakeV3Router_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"uniswapV3Factory_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"WETH9Address_\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"zetaPoolFee_\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"tokenPoolFee_\",\"type\":\"uint24\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrorSendingETH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InputCantBeZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyError\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"EthExchangedForZeta\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"TokenExchangedForZeta\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"ZetaExchangedForEth\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"ZetaExchangedForToken\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH9Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zetaTokenAmount\",\"type\":\"uint256\"}],\"name\":\"getEthFromZeta\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"outputToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"zetaTokenAmount\",\"type\":\"uint256\"}],\"name\":\"getTokenFromZeta\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"}],\"name\":\"getZetaFromEth\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"inputToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"inputTokenAmount\",\"type\":\"uint256\"}],\"name\":\"getZetaFromToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasZetaLiquidity\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pancakeV3Router\",\"outputs\":[{\"internalType\":\"contractISwapRouterPancake\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenPoolFee\",\"outputs\":[{\"internalType\":\"uint24\",\"name\":\"\",\"type\":\"uint24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapV3Factory\",\"outputs\":[{\"internalType\":\"contractIUniswapV3Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zetaPoolFee\",\"outputs\":[{\"internalType\":\"uint24\",\"name\":\"\",\"type\":\"uint24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zetaToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x6101406040523480156200001257600080fd5b506040516200288c3803806200288c83398181016040528101906200003891906200028a565b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508473ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1660601b815250508373ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508162ffffff1660808162ffffff1660e81b815250508062ffffff1660a08162ffffff1660e81b81525050505050505050620003a2565b6000815190506200026d816200036e565b92915050565b600081519050620002848162000388565b92915050565b60008060008060008060c08789031215620002aa57620002a962000369565b5b6000620002ba89828a016200025c565b9650506020620002cd89828a016200025c565b9550506040620002e089828a016200025c565b9450506060620002f389828a016200025c565b93505060806200030689828a0162000273565b92505060a06200031989828a0162000273565b9150509295509295509295565b600062000333826200033a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b600080fd5b620003798162000326565b81146200038557600080fd5b50565b62000393816200035a565b81146200039f57600080fd5b50565b60805160e81c60a05160e81c60c05160601c60e05160601c6101005160601c6101205160601c6123b6620004d660003960008181610d340152610d7f01526000818161045c0152818161067c015281816107a8015281816109b401528181610b13015281816110f80152818161124401526113530152600081816103ae0152818161054e015281816107350152818161096a015281816109d601528181610a2901528181610ddc015281816110ae0152818161111a015261116d015260008181610372015281816106f301528181610a6501528181610bc001528181610dbb015281816111af01526113770152600081816106d201528181610d5801526111d00152600081816103ea015281816107140152818161089d01528181610aa101528181610dfd015261118e01526123b66000f3fe6080604052600436106100a05760003560e01c80635b549182116100645780635b549182146101ac5780635d9dfdde146101d757806380801f8414610202578063a53fb10b1461022d578063c27745dd1461026a578063c469cf1414610295576100a7565b8063013b2ff8146100ac57806321e093b1146100dc5780632405620a146101075780633cbd70051461014457806354c49a2a1461016f576100a7565b366100a757005b600080fd5b6100c660048036038101906100c191906118c0565b6102c0565b6040516100d39190612030565b60405180910390f35b3480156100e857600080fd5b506100f161054c565b6040516100fe9190611dd3565b60405180910390f35b34801561011357600080fd5b5061012e60048036038101906101299190611900565b610570565b60405161013b9190612030565b60405180910390f35b34801561015057600080fd5b5061015961089b565b6040516101669190612015565b60405180910390f35b34801561017b57600080fd5b5061019660048036038101906101919190611967565b6108bf565b6040516101a39190612030565b60405180910390f35b3480156101b857600080fd5b506101c1610d32565b6040516101ce9190611f1b565b60405180910390f35b3480156101e357600080fd5b506101ec610d56565b6040516101f99190612015565b60405180910390f35b34801561020e57600080fd5b50610217610d7a565b6040516102249190611ee5565b60405180910390f35b34801561023957600080fd5b50610254600480360381019061024f9190611900565b610f6b565b6040516102619190612030565b60405180910390f35b34801561027657600080fd5b5061027f611351565b60405161028c9190611f00565b60405180910390f35b3480156102a157600080fd5b506102aa611375565b6040516102b79190611dd3565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610328576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341415610363576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518060e001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001348152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166304e45aaf34846040518363ffffffff1660e01b81526004016104b49190611ffa565b6020604051808303818588803b1580156104cd57600080fd5b505af11580156104e1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906105069190611a14565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da11348260405161053992919061204b565b60405180910390a1809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806105d85750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561060f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561064a576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106773330848673ffffffffffffffffffffffffffffffffffffffff16611399909392919063ffffffff16565b6106c27f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166114229092919063ffffffff16565b60006040518060800160405280857f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000604051602001610768959493929190611d48565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b858183f836040518263ffffffff1660e01b81526004016107ff9190611fd8565b602060405180830381600087803b15801561081957600080fd5b505af115801561082d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108519190611a14565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f85858360405161088693929190611eae565b60405180910390a18092505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610927576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610962576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109af3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611399909392919063ffffffff16565b610a1a7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114229092919063ffffffff16565b60006040518060e001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001848152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166304e45aaf836040518263ffffffff1660e01b8152600401610b6a9190611ffa565b602060405180830381600087803b158015610b8457600080fd5b505af1158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190611a14565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610c179190612030565b600060405180830381600087803b158015610c3157600080fd5b505af1158015610c45573d6000803e3d6000fd5b505050507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8482604051610c7a92919061204b565b60405180910390a160008673ffffffffffffffffffffffffffffffffffffffff1682604051610ca890611dbe565b60006040518083038185875af1925050503d8060008114610ce5576040519150601f19603f3d011682016040523d82523d6000602084013e610cea565b606091505b5050905080610d25576040517f3794aeaf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8193505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631698ee827f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518463ffffffff1660e01b8152600401610e3a93929190611e17565b60206040518083038186803b158015610e5257600080fd5b505afa158015610e66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8a9190611893565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ecb576000915050610f68565b600081905060008173ffffffffffffffffffffffffffffffffffffffff16631a6865026040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1857600080fd5b505afa158015610f2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5091906119e7565b6fffffffffffffffffffffffffffffffff1611925050505b90565b60008060009054906101000a900460ff1615610fb3576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806110345750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561106b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008214156110a6576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110f33330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611399909392919063ffffffff16565b61115e7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114229092919063ffffffff16565b600060405180608001604052807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000089604051602001611204959493929190611d48565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b858183f836040518263ffffffff1660e01b815260040161129b9190611fd8565b602060405180830381600087803b1580156112b557600080fd5b505af11580156112c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ed9190611a14565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b85858360405161132293929190611eae565b60405180910390a1809250505060008060006101000a81548160ff021916908315150217905550949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b61141c846323b872dd60e01b8585856040516024016113ba93929190611e4e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611580565b50505050565b60008114806114bb575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611469929190611dee565b60206040518083038186803b15801561148157600080fd5b505afa158015611495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b99190611a14565b145b6114fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f190611fb8565b60405180910390fd5b61157b8363095ea7b360e01b8484604051602401611519929190611e85565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611580565b505050565b60006115e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116479092919063ffffffff16565b9050600081511115611642578080602001905181019061160291906119ba565b611641576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163890611f98565b60405180910390fd5b5b505050565b6060611656848460008561165f565b90509392505050565b6060824710156116a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161169b90611f58565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516116cd9190611da7565b60006040518083038185875af1925050503d806000811461170a576040519150601f19603f3d011682016040523d82523d6000602084013e61170f565b606091505b50915091506117208783838761172c565b92505050949350505050565b6060831561178f5760008351141561178757611747856117a2565b611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177d90611f78565b60405180910390fd5b5b82905061179a565b61179983836117c5565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156117d85781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180c9190611f36565b60405180910390fd5b60008135905061182481612324565b92915050565b60008151905061183981612324565b92915050565b60008151905061184e8161233b565b92915050565b60008151905061186381612352565b92915050565b60008135905061187881612369565b92915050565b60008151905061188d81612369565b92915050565b6000602082840312156118a9576118a86121db565b5b60006118b78482850161182a565b91505092915050565b600080604083850312156118d7576118d66121db565b5b60006118e585828601611815565b92505060206118f685828601611869565b9150509250929050565b6000806000806080858703121561191a576119196121db565b5b600061192887828801611815565b945050602061193987828801611869565b935050604061194a87828801611815565b925050606061195b87828801611869565b91505092959194509250565b6000806000606084860312156119805761197f6121db565b5b600061198e86828701611815565b935050602061199f86828701611869565b92505060406119b086828701611869565b9150509250925092565b6000602082840312156119d0576119cf6121db565b5b60006119de8482850161183f565b91505092915050565b6000602082840312156119fd576119fc6121db565b5b6000611a0b84828501611854565b91505092915050565b600060208284031215611a2a57611a296121db565b5b6000611a388482850161187e565b91505092915050565b611a4a816120b7565b82525050565b611a59816120b7565b82525050565b611a70611a6b826120b7565b6121a5565b82525050565b611a7f816120c9565b82525050565b6000611a9082612074565b611a9a818561208a565b9350611aaa818560208601612172565b611ab3816121e0565b840191505092915050565b6000611ac982612074565b611ad3818561209b565b9350611ae3818560208601612172565b80840191505092915050565b611af88161212a565b82525050565b611b078161213c565b82525050565b6000611b188261207f565b611b2281856120a6565b9350611b32818560208601612172565b611b3b816121e0565b840191505092915050565b6000611b536026836120a6565b9150611b5e8261220b565b604082019050919050565b6000611b7660008361209b565b9150611b818261225a565b600082019050919050565b6000611b99601d836120a6565b9150611ba48261225d565b602082019050919050565b6000611bbc602a836120a6565b9150611bc782612286565b604082019050919050565b6000611bdf6036836120a6565b9150611bea826122d5565b604082019050919050565b60006080830160008301518482036000860152611c128282611a85565b9150506020830151611c276020860182611a41565b506040830151611c3a6040860182611d2a565b506060830151611c4d6060860182611d2a565b508091505092915050565b60e082016000820151611c6e6000850182611a41565b506020820151611c816020850182611a41565b506040820151611c946040850182611cf5565b506060820151611ca76060850182611a41565b506080820151611cba6080850182611d2a565b5060a0820151611ccd60a0850182611d2a565b5060c0820151611ce060c0850182611ce6565b50505050565b611cef816120f1565b82525050565b611cfe81612111565b82525050565b611d0d81612111565b82525050565b611d24611d1f82612111565b6121c9565b82525050565b611d3381612120565b82525050565b611d4281612120565b82525050565b6000611d548288611a5f565b601482019150611d648287611d13565b600382019150611d748286611a5f565b601482019150611d848285611d13565b600382019150611d948284611a5f565b6014820191508190509695505050505050565b6000611db38284611abe565b915081905092915050565b6000611dc982611b69565b9150819050919050565b6000602082019050611de86000830184611a50565b92915050565b6000604082019050611e036000830185611a50565b611e106020830184611a50565b9392505050565b6000606082019050611e2c6000830186611a50565b611e396020830185611a50565b611e466040830184611d04565b949350505050565b6000606082019050611e636000830186611a50565b611e706020830185611a50565b611e7d6040830184611d39565b949350505050565b6000604082019050611e9a6000830185611a50565b611ea76020830184611d39565b9392505050565b6000606082019050611ec36000830186611a50565b611ed06020830185611d39565b611edd6040830184611d39565b949350505050565b6000602082019050611efa6000830184611a76565b92915050565b6000602082019050611f156000830184611aef565b92915050565b6000602082019050611f306000830184611afe565b92915050565b60006020820190508181036000830152611f508184611b0d565b905092915050565b60006020820190508181036000830152611f7181611b46565b9050919050565b60006020820190508181036000830152611f9181611b8c565b9050919050565b60006020820190508181036000830152611fb181611baf565b9050919050565b60006020820190508181036000830152611fd181611bd2565b9050919050565b60006020820190508181036000830152611ff28184611bf5565b905092915050565b600060e08201905061200f6000830184611c58565b92915050565b600060208201905061202a6000830184611d04565b92915050565b60006020820190506120456000830184611d39565b92915050565b60006040820190506120606000830185611d39565b61206d6020830184611d39565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006120c2826120f1565b9050919050565b60008115159050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b60006121358261214e565b9050919050565b60006121478261214e565b9050919050565b600061215982612160565b9050919050565b600061216b826120f1565b9050919050565b60005b83811015612190578082015181840152602081019050612175565b8381111561219f576000848401525b50505050565b60006121b0826121b7565b9050919050565b60006121c2826121fe565b9050919050565b60006121d4826121f1565b9050919050565b600080fd5b6000601f19601f8301169050919050565b60008160e81b9050919050565b60008160601b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61232d816120b7565b811461233857600080fd5b50565b612344816120c9565b811461234f57600080fd5b50565b61235b816120d5565b811461236657600080fd5b50565b61237281612120565b811461237d57600080fd5b5056fea264697066735822122027f90d12abe6bc83d01268f9d1f2b1f06cb3a1291fe43afcacc978ec0c07420664736f6c63430008070033", +} + +// ZetaTokenConsumerPancakeV3ABI is the input ABI used to generate the binding from. +// Deprecated: Use ZetaTokenConsumerPancakeV3MetaData.ABI instead. +var ZetaTokenConsumerPancakeV3ABI = ZetaTokenConsumerPancakeV3MetaData.ABI + +// ZetaTokenConsumerPancakeV3Bin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use ZetaTokenConsumerPancakeV3MetaData.Bin instead. +var ZetaTokenConsumerPancakeV3Bin = ZetaTokenConsumerPancakeV3MetaData.Bin + +// DeployZetaTokenConsumerPancakeV3 deploys a new Ethereum contract, binding an instance of ZetaTokenConsumerPancakeV3 to it. +func DeployZetaTokenConsumerPancakeV3(auth *bind.TransactOpts, backend bind.ContractBackend, zetaToken_ common.Address, pancakeV3Router_ common.Address, uniswapV3Factory_ common.Address, WETH9Address_ common.Address, zetaPoolFee_ *big.Int, tokenPoolFee_ *big.Int) (common.Address, *types.Transaction, *ZetaTokenConsumerPancakeV3, error) { + parsed, err := ZetaTokenConsumerPancakeV3MetaData.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(ZetaTokenConsumerPancakeV3Bin), backend, zetaToken_, pancakeV3Router_, uniswapV3Factory_, WETH9Address_, zetaPoolFee_, tokenPoolFee_) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ZetaTokenConsumerPancakeV3{ZetaTokenConsumerPancakeV3Caller: ZetaTokenConsumerPancakeV3Caller{contract: contract}, ZetaTokenConsumerPancakeV3Transactor: ZetaTokenConsumerPancakeV3Transactor{contract: contract}, ZetaTokenConsumerPancakeV3Filterer: ZetaTokenConsumerPancakeV3Filterer{contract: contract}}, nil +} + +// ZetaTokenConsumerPancakeV3 is an auto generated Go binding around an Ethereum contract. +type ZetaTokenConsumerPancakeV3 struct { + ZetaTokenConsumerPancakeV3Caller // Read-only binding to the contract + ZetaTokenConsumerPancakeV3Transactor // Write-only binding to the contract + ZetaTokenConsumerPancakeV3Filterer // Log filterer for contract events +} + +// ZetaTokenConsumerPancakeV3Caller is an auto generated read-only Go binding around an Ethereum contract. +type ZetaTokenConsumerPancakeV3Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZetaTokenConsumerPancakeV3Transactor is an auto generated write-only Go binding around an Ethereum contract. +type ZetaTokenConsumerPancakeV3Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZetaTokenConsumerPancakeV3Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ZetaTokenConsumerPancakeV3Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZetaTokenConsumerPancakeV3Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ZetaTokenConsumerPancakeV3Session struct { + Contract *ZetaTokenConsumerPancakeV3 // 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 +} + +// ZetaTokenConsumerPancakeV3CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ZetaTokenConsumerPancakeV3CallerSession struct { + Contract *ZetaTokenConsumerPancakeV3Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ZetaTokenConsumerPancakeV3TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ZetaTokenConsumerPancakeV3TransactorSession struct { + Contract *ZetaTokenConsumerPancakeV3Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZetaTokenConsumerPancakeV3Raw is an auto generated low-level Go binding around an Ethereum contract. +type ZetaTokenConsumerPancakeV3Raw struct { + Contract *ZetaTokenConsumerPancakeV3 // Generic contract binding to access the raw methods on +} + +// ZetaTokenConsumerPancakeV3CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ZetaTokenConsumerPancakeV3CallerRaw struct { + Contract *ZetaTokenConsumerPancakeV3Caller // Generic read-only contract binding to access the raw methods on +} + +// ZetaTokenConsumerPancakeV3TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ZetaTokenConsumerPancakeV3TransactorRaw struct { + Contract *ZetaTokenConsumerPancakeV3Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewZetaTokenConsumerPancakeV3 creates a new instance of ZetaTokenConsumerPancakeV3, bound to a specific deployed contract. +func NewZetaTokenConsumerPancakeV3(address common.Address, backend bind.ContractBackend) (*ZetaTokenConsumerPancakeV3, error) { + contract, err := bindZetaTokenConsumerPancakeV3(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ZetaTokenConsumerPancakeV3{ZetaTokenConsumerPancakeV3Caller: ZetaTokenConsumerPancakeV3Caller{contract: contract}, ZetaTokenConsumerPancakeV3Transactor: ZetaTokenConsumerPancakeV3Transactor{contract: contract}, ZetaTokenConsumerPancakeV3Filterer: ZetaTokenConsumerPancakeV3Filterer{contract: contract}}, nil +} + +// NewZetaTokenConsumerPancakeV3Caller creates a new read-only instance of ZetaTokenConsumerPancakeV3, bound to a specific deployed contract. +func NewZetaTokenConsumerPancakeV3Caller(address common.Address, caller bind.ContractCaller) (*ZetaTokenConsumerPancakeV3Caller, error) { + contract, err := bindZetaTokenConsumerPancakeV3(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ZetaTokenConsumerPancakeV3Caller{contract: contract}, nil +} + +// NewZetaTokenConsumerPancakeV3Transactor creates a new write-only instance of ZetaTokenConsumerPancakeV3, bound to a specific deployed contract. +func NewZetaTokenConsumerPancakeV3Transactor(address common.Address, transactor bind.ContractTransactor) (*ZetaTokenConsumerPancakeV3Transactor, error) { + contract, err := bindZetaTokenConsumerPancakeV3(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ZetaTokenConsumerPancakeV3Transactor{contract: contract}, nil +} + +// NewZetaTokenConsumerPancakeV3Filterer creates a new log filterer instance of ZetaTokenConsumerPancakeV3, bound to a specific deployed contract. +func NewZetaTokenConsumerPancakeV3Filterer(address common.Address, filterer bind.ContractFilterer) (*ZetaTokenConsumerPancakeV3Filterer, error) { + contract, err := bindZetaTokenConsumerPancakeV3(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ZetaTokenConsumerPancakeV3Filterer{contract: contract}, nil +} + +// bindZetaTokenConsumerPancakeV3 binds a generic wrapper to an already deployed contract. +func bindZetaTokenConsumerPancakeV3(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ZetaTokenConsumerPancakeV3MetaData.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 (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ZetaTokenConsumerPancakeV3.Contract.ZetaTokenConsumerPancakeV3Caller.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 (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.ZetaTokenConsumerPancakeV3Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.ZetaTokenConsumerPancakeV3Transactor.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 (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ZetaTokenConsumerPancakeV3.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 (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.contract.Transact(opts, method, params...) +} + +// WETH9Address is a free data retrieval call binding the contract method 0xc469cf14. +// +// Solidity: function WETH9Address() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Caller) WETH9Address(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ZetaTokenConsumerPancakeV3.contract.Call(opts, &out, "WETH9Address") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// WETH9Address is a free data retrieval call binding the contract method 0xc469cf14. +// +// Solidity: function WETH9Address() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) WETH9Address() (common.Address, error) { + return _ZetaTokenConsumerPancakeV3.Contract.WETH9Address(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// WETH9Address is a free data retrieval call binding the contract method 0xc469cf14. +// +// Solidity: function WETH9Address() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3CallerSession) WETH9Address() (common.Address, error) { + return _ZetaTokenConsumerPancakeV3.Contract.WETH9Address(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// HasZetaLiquidity is a free data retrieval call binding the contract method 0x80801f84. +// +// Solidity: function hasZetaLiquidity() view returns(bool) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Caller) HasZetaLiquidity(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _ZetaTokenConsumerPancakeV3.contract.Call(opts, &out, "hasZetaLiquidity") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// HasZetaLiquidity is a free data retrieval call binding the contract method 0x80801f84. +// +// Solidity: function hasZetaLiquidity() view returns(bool) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) HasZetaLiquidity() (bool, error) { + return _ZetaTokenConsumerPancakeV3.Contract.HasZetaLiquidity(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// HasZetaLiquidity is a free data retrieval call binding the contract method 0x80801f84. +// +// Solidity: function hasZetaLiquidity() view returns(bool) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3CallerSession) HasZetaLiquidity() (bool, error) { + return _ZetaTokenConsumerPancakeV3.Contract.HasZetaLiquidity(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// PancakeV3Router is a free data retrieval call binding the contract method 0xc27745dd. +// +// Solidity: function pancakeV3Router() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Caller) PancakeV3Router(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ZetaTokenConsumerPancakeV3.contract.Call(opts, &out, "pancakeV3Router") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PancakeV3Router is a free data retrieval call binding the contract method 0xc27745dd. +// +// Solidity: function pancakeV3Router() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) PancakeV3Router() (common.Address, error) { + return _ZetaTokenConsumerPancakeV3.Contract.PancakeV3Router(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// PancakeV3Router is a free data retrieval call binding the contract method 0xc27745dd. +// +// Solidity: function pancakeV3Router() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3CallerSession) PancakeV3Router() (common.Address, error) { + return _ZetaTokenConsumerPancakeV3.Contract.PancakeV3Router(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// TokenPoolFee is a free data retrieval call binding the contract method 0x5d9dfdde. +// +// Solidity: function tokenPoolFee() view returns(uint24) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Caller) TokenPoolFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ZetaTokenConsumerPancakeV3.contract.Call(opts, &out, "tokenPoolFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TokenPoolFee is a free data retrieval call binding the contract method 0x5d9dfdde. +// +// Solidity: function tokenPoolFee() view returns(uint24) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) TokenPoolFee() (*big.Int, error) { + return _ZetaTokenConsumerPancakeV3.Contract.TokenPoolFee(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// TokenPoolFee is a free data retrieval call binding the contract method 0x5d9dfdde. +// +// Solidity: function tokenPoolFee() view returns(uint24) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3CallerSession) TokenPoolFee() (*big.Int, error) { + return _ZetaTokenConsumerPancakeV3.Contract.TokenPoolFee(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// UniswapV3Factory is a free data retrieval call binding the contract method 0x5b549182. +// +// Solidity: function uniswapV3Factory() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Caller) UniswapV3Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ZetaTokenConsumerPancakeV3.contract.Call(opts, &out, "uniswapV3Factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// UniswapV3Factory is a free data retrieval call binding the contract method 0x5b549182. +// +// Solidity: function uniswapV3Factory() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) UniswapV3Factory() (common.Address, error) { + return _ZetaTokenConsumerPancakeV3.Contract.UniswapV3Factory(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// UniswapV3Factory is a free data retrieval call binding the contract method 0x5b549182. +// +// Solidity: function uniswapV3Factory() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3CallerSession) UniswapV3Factory() (common.Address, error) { + return _ZetaTokenConsumerPancakeV3.Contract.UniswapV3Factory(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// ZetaPoolFee is a free data retrieval call binding the contract method 0x3cbd7005. +// +// Solidity: function zetaPoolFee() view returns(uint24) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Caller) ZetaPoolFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ZetaTokenConsumerPancakeV3.contract.Call(opts, &out, "zetaPoolFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ZetaPoolFee is a free data retrieval call binding the contract method 0x3cbd7005. +// +// Solidity: function zetaPoolFee() view returns(uint24) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) ZetaPoolFee() (*big.Int, error) { + return _ZetaTokenConsumerPancakeV3.Contract.ZetaPoolFee(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// ZetaPoolFee is a free data retrieval call binding the contract method 0x3cbd7005. +// +// Solidity: function zetaPoolFee() view returns(uint24) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3CallerSession) ZetaPoolFee() (*big.Int, error) { + return _ZetaTokenConsumerPancakeV3.Contract.ZetaPoolFee(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// ZetaToken is a free data retrieval call binding the contract method 0x21e093b1. +// +// Solidity: function zetaToken() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Caller) ZetaToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ZetaTokenConsumerPancakeV3.contract.Call(opts, &out, "zetaToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ZetaToken is a free data retrieval call binding the contract method 0x21e093b1. +// +// Solidity: function zetaToken() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) ZetaToken() (common.Address, error) { + return _ZetaTokenConsumerPancakeV3.Contract.ZetaToken(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// ZetaToken is a free data retrieval call binding the contract method 0x21e093b1. +// +// Solidity: function zetaToken() view returns(address) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3CallerSession) ZetaToken() (common.Address, error) { + return _ZetaTokenConsumerPancakeV3.Contract.ZetaToken(&_ZetaTokenConsumerPancakeV3.CallOpts) +} + +// GetEthFromZeta is a paid mutator transaction binding the contract method 0x54c49a2a. +// +// Solidity: function getEthFromZeta(address destinationAddress, uint256 minAmountOut, uint256 zetaTokenAmount) returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Transactor) GetEthFromZeta(opts *bind.TransactOpts, destinationAddress common.Address, minAmountOut *big.Int, zetaTokenAmount *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.contract.Transact(opts, "getEthFromZeta", destinationAddress, minAmountOut, zetaTokenAmount) +} + +// GetEthFromZeta is a paid mutator transaction binding the contract method 0x54c49a2a. +// +// Solidity: function getEthFromZeta(address destinationAddress, uint256 minAmountOut, uint256 zetaTokenAmount) returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) GetEthFromZeta(destinationAddress common.Address, minAmountOut *big.Int, zetaTokenAmount *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.GetEthFromZeta(&_ZetaTokenConsumerPancakeV3.TransactOpts, destinationAddress, minAmountOut, zetaTokenAmount) +} + +// GetEthFromZeta is a paid mutator transaction binding the contract method 0x54c49a2a. +// +// Solidity: function getEthFromZeta(address destinationAddress, uint256 minAmountOut, uint256 zetaTokenAmount) returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3TransactorSession) GetEthFromZeta(destinationAddress common.Address, minAmountOut *big.Int, zetaTokenAmount *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.GetEthFromZeta(&_ZetaTokenConsumerPancakeV3.TransactOpts, destinationAddress, minAmountOut, zetaTokenAmount) +} + +// GetTokenFromZeta is a paid mutator transaction binding the contract method 0xa53fb10b. +// +// Solidity: function getTokenFromZeta(address destinationAddress, uint256 minAmountOut, address outputToken, uint256 zetaTokenAmount) returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Transactor) GetTokenFromZeta(opts *bind.TransactOpts, destinationAddress common.Address, minAmountOut *big.Int, outputToken common.Address, zetaTokenAmount *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.contract.Transact(opts, "getTokenFromZeta", destinationAddress, minAmountOut, outputToken, zetaTokenAmount) +} + +// GetTokenFromZeta is a paid mutator transaction binding the contract method 0xa53fb10b. +// +// Solidity: function getTokenFromZeta(address destinationAddress, uint256 minAmountOut, address outputToken, uint256 zetaTokenAmount) returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) GetTokenFromZeta(destinationAddress common.Address, minAmountOut *big.Int, outputToken common.Address, zetaTokenAmount *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.GetTokenFromZeta(&_ZetaTokenConsumerPancakeV3.TransactOpts, destinationAddress, minAmountOut, outputToken, zetaTokenAmount) +} + +// GetTokenFromZeta is a paid mutator transaction binding the contract method 0xa53fb10b. +// +// Solidity: function getTokenFromZeta(address destinationAddress, uint256 minAmountOut, address outputToken, uint256 zetaTokenAmount) returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3TransactorSession) GetTokenFromZeta(destinationAddress common.Address, minAmountOut *big.Int, outputToken common.Address, zetaTokenAmount *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.GetTokenFromZeta(&_ZetaTokenConsumerPancakeV3.TransactOpts, destinationAddress, minAmountOut, outputToken, zetaTokenAmount) +} + +// GetZetaFromEth is a paid mutator transaction binding the contract method 0x013b2ff8. +// +// Solidity: function getZetaFromEth(address destinationAddress, uint256 minAmountOut) payable returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Transactor) GetZetaFromEth(opts *bind.TransactOpts, destinationAddress common.Address, minAmountOut *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.contract.Transact(opts, "getZetaFromEth", destinationAddress, minAmountOut) +} + +// GetZetaFromEth is a paid mutator transaction binding the contract method 0x013b2ff8. +// +// Solidity: function getZetaFromEth(address destinationAddress, uint256 minAmountOut) payable returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) GetZetaFromEth(destinationAddress common.Address, minAmountOut *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.GetZetaFromEth(&_ZetaTokenConsumerPancakeV3.TransactOpts, destinationAddress, minAmountOut) +} + +// GetZetaFromEth is a paid mutator transaction binding the contract method 0x013b2ff8. +// +// Solidity: function getZetaFromEth(address destinationAddress, uint256 minAmountOut) payable returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3TransactorSession) GetZetaFromEth(destinationAddress common.Address, minAmountOut *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.GetZetaFromEth(&_ZetaTokenConsumerPancakeV3.TransactOpts, destinationAddress, minAmountOut) +} + +// GetZetaFromToken is a paid mutator transaction binding the contract method 0x2405620a. +// +// Solidity: function getZetaFromToken(address destinationAddress, uint256 minAmountOut, address inputToken, uint256 inputTokenAmount) returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Transactor) GetZetaFromToken(opts *bind.TransactOpts, destinationAddress common.Address, minAmountOut *big.Int, inputToken common.Address, inputTokenAmount *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.contract.Transact(opts, "getZetaFromToken", destinationAddress, minAmountOut, inputToken, inputTokenAmount) +} + +// GetZetaFromToken is a paid mutator transaction binding the contract method 0x2405620a. +// +// Solidity: function getZetaFromToken(address destinationAddress, uint256 minAmountOut, address inputToken, uint256 inputTokenAmount) returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) GetZetaFromToken(destinationAddress common.Address, minAmountOut *big.Int, inputToken common.Address, inputTokenAmount *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.GetZetaFromToken(&_ZetaTokenConsumerPancakeV3.TransactOpts, destinationAddress, minAmountOut, inputToken, inputTokenAmount) +} + +// GetZetaFromToken is a paid mutator transaction binding the contract method 0x2405620a. +// +// Solidity: function getZetaFromToken(address destinationAddress, uint256 minAmountOut, address inputToken, uint256 inputTokenAmount) returns(uint256) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3TransactorSession) GetZetaFromToken(destinationAddress common.Address, minAmountOut *big.Int, inputToken common.Address, inputTokenAmount *big.Int) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.GetZetaFromToken(&_ZetaTokenConsumerPancakeV3.TransactOpts, destinationAddress, minAmountOut, inputToken, inputTokenAmount) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Transactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.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 (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Session) Receive() (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.Receive(&_ZetaTokenConsumerPancakeV3.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3TransactorSession) Receive() (*types.Transaction, error) { + return _ZetaTokenConsumerPancakeV3.Contract.Receive(&_ZetaTokenConsumerPancakeV3.TransactOpts) +} + +// ZetaTokenConsumerPancakeV3EthExchangedForZetaIterator is returned from FilterEthExchangedForZeta and is used to iterate over the raw logs and unpacked data for EthExchangedForZeta events raised by the ZetaTokenConsumerPancakeV3 contract. +type ZetaTokenConsumerPancakeV3EthExchangedForZetaIterator struct { + Event *ZetaTokenConsumerPancakeV3EthExchangedForZeta // 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 *ZetaTokenConsumerPancakeV3EthExchangedForZetaIterator) 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(ZetaTokenConsumerPancakeV3EthExchangedForZeta) + 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(ZetaTokenConsumerPancakeV3EthExchangedForZeta) + 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 *ZetaTokenConsumerPancakeV3EthExchangedForZetaIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ZetaTokenConsumerPancakeV3EthExchangedForZetaIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ZetaTokenConsumerPancakeV3EthExchangedForZeta represents a EthExchangedForZeta event raised by the ZetaTokenConsumerPancakeV3 contract. +type ZetaTokenConsumerPancakeV3EthExchangedForZeta struct { + AmountIn *big.Int + AmountOut *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEthExchangedForZeta is a free log retrieval operation binding the contract event 0x87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da11. +// +// Solidity: event EthExchangedForZeta(uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) FilterEthExchangedForZeta(opts *bind.FilterOpts) (*ZetaTokenConsumerPancakeV3EthExchangedForZetaIterator, error) { + + logs, sub, err := _ZetaTokenConsumerPancakeV3.contract.FilterLogs(opts, "EthExchangedForZeta") + if err != nil { + return nil, err + } + return &ZetaTokenConsumerPancakeV3EthExchangedForZetaIterator{contract: _ZetaTokenConsumerPancakeV3.contract, event: "EthExchangedForZeta", logs: logs, sub: sub}, nil +} + +// WatchEthExchangedForZeta is a free log subscription operation binding the contract event 0x87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da11. +// +// Solidity: event EthExchangedForZeta(uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) WatchEthExchangedForZeta(opts *bind.WatchOpts, sink chan<- *ZetaTokenConsumerPancakeV3EthExchangedForZeta) (event.Subscription, error) { + + logs, sub, err := _ZetaTokenConsumerPancakeV3.contract.WatchLogs(opts, "EthExchangedForZeta") + 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(ZetaTokenConsumerPancakeV3EthExchangedForZeta) + if err := _ZetaTokenConsumerPancakeV3.contract.UnpackLog(event, "EthExchangedForZeta", 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 +} + +// ParseEthExchangedForZeta is a log parse operation binding the contract event 0x87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da11. +// +// Solidity: event EthExchangedForZeta(uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) ParseEthExchangedForZeta(log types.Log) (*ZetaTokenConsumerPancakeV3EthExchangedForZeta, error) { + event := new(ZetaTokenConsumerPancakeV3EthExchangedForZeta) + if err := _ZetaTokenConsumerPancakeV3.contract.UnpackLog(event, "EthExchangedForZeta", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ZetaTokenConsumerPancakeV3TokenExchangedForZetaIterator is returned from FilterTokenExchangedForZeta and is used to iterate over the raw logs and unpacked data for TokenExchangedForZeta events raised by the ZetaTokenConsumerPancakeV3 contract. +type ZetaTokenConsumerPancakeV3TokenExchangedForZetaIterator struct { + Event *ZetaTokenConsumerPancakeV3TokenExchangedForZeta // 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 *ZetaTokenConsumerPancakeV3TokenExchangedForZetaIterator) 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(ZetaTokenConsumerPancakeV3TokenExchangedForZeta) + 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(ZetaTokenConsumerPancakeV3TokenExchangedForZeta) + 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 *ZetaTokenConsumerPancakeV3TokenExchangedForZetaIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ZetaTokenConsumerPancakeV3TokenExchangedForZetaIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ZetaTokenConsumerPancakeV3TokenExchangedForZeta represents a TokenExchangedForZeta event raised by the ZetaTokenConsumerPancakeV3 contract. +type ZetaTokenConsumerPancakeV3TokenExchangedForZeta struct { + Token common.Address + AmountIn *big.Int + AmountOut *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenExchangedForZeta is a free log retrieval operation binding the contract event 0x017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f. +// +// Solidity: event TokenExchangedForZeta(address token, uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) FilterTokenExchangedForZeta(opts *bind.FilterOpts) (*ZetaTokenConsumerPancakeV3TokenExchangedForZetaIterator, error) { + + logs, sub, err := _ZetaTokenConsumerPancakeV3.contract.FilterLogs(opts, "TokenExchangedForZeta") + if err != nil { + return nil, err + } + return &ZetaTokenConsumerPancakeV3TokenExchangedForZetaIterator{contract: _ZetaTokenConsumerPancakeV3.contract, event: "TokenExchangedForZeta", logs: logs, sub: sub}, nil +} + +// WatchTokenExchangedForZeta is a free log subscription operation binding the contract event 0x017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f. +// +// Solidity: event TokenExchangedForZeta(address token, uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) WatchTokenExchangedForZeta(opts *bind.WatchOpts, sink chan<- *ZetaTokenConsumerPancakeV3TokenExchangedForZeta) (event.Subscription, error) { + + logs, sub, err := _ZetaTokenConsumerPancakeV3.contract.WatchLogs(opts, "TokenExchangedForZeta") + 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(ZetaTokenConsumerPancakeV3TokenExchangedForZeta) + if err := _ZetaTokenConsumerPancakeV3.contract.UnpackLog(event, "TokenExchangedForZeta", 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 +} + +// ParseTokenExchangedForZeta is a log parse operation binding the contract event 0x017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f. +// +// Solidity: event TokenExchangedForZeta(address token, uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) ParseTokenExchangedForZeta(log types.Log) (*ZetaTokenConsumerPancakeV3TokenExchangedForZeta, error) { + event := new(ZetaTokenConsumerPancakeV3TokenExchangedForZeta) + if err := _ZetaTokenConsumerPancakeV3.contract.UnpackLog(event, "TokenExchangedForZeta", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ZetaTokenConsumerPancakeV3ZetaExchangedForEthIterator is returned from FilterZetaExchangedForEth and is used to iterate over the raw logs and unpacked data for ZetaExchangedForEth events raised by the ZetaTokenConsumerPancakeV3 contract. +type ZetaTokenConsumerPancakeV3ZetaExchangedForEthIterator struct { + Event *ZetaTokenConsumerPancakeV3ZetaExchangedForEth // 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 *ZetaTokenConsumerPancakeV3ZetaExchangedForEthIterator) 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(ZetaTokenConsumerPancakeV3ZetaExchangedForEth) + 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(ZetaTokenConsumerPancakeV3ZetaExchangedForEth) + 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 *ZetaTokenConsumerPancakeV3ZetaExchangedForEthIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ZetaTokenConsumerPancakeV3ZetaExchangedForEthIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ZetaTokenConsumerPancakeV3ZetaExchangedForEth represents a ZetaExchangedForEth event raised by the ZetaTokenConsumerPancakeV3 contract. +type ZetaTokenConsumerPancakeV3ZetaExchangedForEth struct { + AmountIn *big.Int + AmountOut *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterZetaExchangedForEth is a free log retrieval operation binding the contract event 0x74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae. +// +// Solidity: event ZetaExchangedForEth(uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) FilterZetaExchangedForEth(opts *bind.FilterOpts) (*ZetaTokenConsumerPancakeV3ZetaExchangedForEthIterator, error) { + + logs, sub, err := _ZetaTokenConsumerPancakeV3.contract.FilterLogs(opts, "ZetaExchangedForEth") + if err != nil { + return nil, err + } + return &ZetaTokenConsumerPancakeV3ZetaExchangedForEthIterator{contract: _ZetaTokenConsumerPancakeV3.contract, event: "ZetaExchangedForEth", logs: logs, sub: sub}, nil +} + +// WatchZetaExchangedForEth is a free log subscription operation binding the contract event 0x74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae. +// +// Solidity: event ZetaExchangedForEth(uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) WatchZetaExchangedForEth(opts *bind.WatchOpts, sink chan<- *ZetaTokenConsumerPancakeV3ZetaExchangedForEth) (event.Subscription, error) { + + logs, sub, err := _ZetaTokenConsumerPancakeV3.contract.WatchLogs(opts, "ZetaExchangedForEth") + 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(ZetaTokenConsumerPancakeV3ZetaExchangedForEth) + if err := _ZetaTokenConsumerPancakeV3.contract.UnpackLog(event, "ZetaExchangedForEth", 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 +} + +// ParseZetaExchangedForEth is a log parse operation binding the contract event 0x74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae. +// +// Solidity: event ZetaExchangedForEth(uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) ParseZetaExchangedForEth(log types.Log) (*ZetaTokenConsumerPancakeV3ZetaExchangedForEth, error) { + event := new(ZetaTokenConsumerPancakeV3ZetaExchangedForEth) + if err := _ZetaTokenConsumerPancakeV3.contract.UnpackLog(event, "ZetaExchangedForEth", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ZetaTokenConsumerPancakeV3ZetaExchangedForTokenIterator is returned from FilterZetaExchangedForToken and is used to iterate over the raw logs and unpacked data for ZetaExchangedForToken events raised by the ZetaTokenConsumerPancakeV3 contract. +type ZetaTokenConsumerPancakeV3ZetaExchangedForTokenIterator struct { + Event *ZetaTokenConsumerPancakeV3ZetaExchangedForToken // 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 *ZetaTokenConsumerPancakeV3ZetaExchangedForTokenIterator) 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(ZetaTokenConsumerPancakeV3ZetaExchangedForToken) + 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(ZetaTokenConsumerPancakeV3ZetaExchangedForToken) + 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 *ZetaTokenConsumerPancakeV3ZetaExchangedForTokenIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ZetaTokenConsumerPancakeV3ZetaExchangedForTokenIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ZetaTokenConsumerPancakeV3ZetaExchangedForToken represents a ZetaExchangedForToken event raised by the ZetaTokenConsumerPancakeV3 contract. +type ZetaTokenConsumerPancakeV3ZetaExchangedForToken struct { + Token common.Address + AmountIn *big.Int + AmountOut *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterZetaExchangedForToken is a free log retrieval operation binding the contract event 0x0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b. +// +// Solidity: event ZetaExchangedForToken(address token, uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) FilterZetaExchangedForToken(opts *bind.FilterOpts) (*ZetaTokenConsumerPancakeV3ZetaExchangedForTokenIterator, error) { + + logs, sub, err := _ZetaTokenConsumerPancakeV3.contract.FilterLogs(opts, "ZetaExchangedForToken") + if err != nil { + return nil, err + } + return &ZetaTokenConsumerPancakeV3ZetaExchangedForTokenIterator{contract: _ZetaTokenConsumerPancakeV3.contract, event: "ZetaExchangedForToken", logs: logs, sub: sub}, nil +} + +// WatchZetaExchangedForToken is a free log subscription operation binding the contract event 0x0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b. +// +// Solidity: event ZetaExchangedForToken(address token, uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) WatchZetaExchangedForToken(opts *bind.WatchOpts, sink chan<- *ZetaTokenConsumerPancakeV3ZetaExchangedForToken) (event.Subscription, error) { + + logs, sub, err := _ZetaTokenConsumerPancakeV3.contract.WatchLogs(opts, "ZetaExchangedForToken") + 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(ZetaTokenConsumerPancakeV3ZetaExchangedForToken) + if err := _ZetaTokenConsumerPancakeV3.contract.UnpackLog(event, "ZetaExchangedForToken", 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 +} + +// ParseZetaExchangedForToken is a log parse operation binding the contract event 0x0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b. +// +// Solidity: event ZetaExchangedForToken(address token, uint256 amountIn, uint256 amountOut) +func (_ZetaTokenConsumerPancakeV3 *ZetaTokenConsumerPancakeV3Filterer) ParseZetaExchangedForToken(log types.Log) (*ZetaTokenConsumerPancakeV3ZetaExchangedForToken, error) { + event := new(ZetaTokenConsumerPancakeV3ZetaExchangedForToken) + if err := _ZetaTokenConsumerPancakeV3.contract.UnpackLog(event, "ZetaExchangedForToken", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/zetatokenconsumeruniv3errors.go b/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/zetatokenconsumeruniv3errors.go new file mode 100644 index 00000000..65658391 --- /dev/null +++ b/pkg/contracts/evm/tools/zetatokenconsumerpancakev3.strategy.sol/zetatokenconsumeruniv3errors.go @@ -0,0 +1,181 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package zetatokenconsumerpancakev3 + +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 +) + +// ZetaTokenConsumerUniV3ErrorsMetaData contains all meta data concerning the ZetaTokenConsumerUniV3Errors contract. +var ZetaTokenConsumerUniV3ErrorsMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"ErrorSendingETH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InputCantBeZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyError\",\"type\":\"error\"}]", +} + +// ZetaTokenConsumerUniV3ErrorsABI is the input ABI used to generate the binding from. +// Deprecated: Use ZetaTokenConsumerUniV3ErrorsMetaData.ABI instead. +var ZetaTokenConsumerUniV3ErrorsABI = ZetaTokenConsumerUniV3ErrorsMetaData.ABI + +// ZetaTokenConsumerUniV3Errors is an auto generated Go binding around an Ethereum contract. +type ZetaTokenConsumerUniV3Errors struct { + ZetaTokenConsumerUniV3ErrorsCaller // Read-only binding to the contract + ZetaTokenConsumerUniV3ErrorsTransactor // Write-only binding to the contract + ZetaTokenConsumerUniV3ErrorsFilterer // Log filterer for contract events +} + +// ZetaTokenConsumerUniV3ErrorsCaller is an auto generated read-only Go binding around an Ethereum contract. +type ZetaTokenConsumerUniV3ErrorsCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZetaTokenConsumerUniV3ErrorsTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ZetaTokenConsumerUniV3ErrorsTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZetaTokenConsumerUniV3ErrorsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ZetaTokenConsumerUniV3ErrorsFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZetaTokenConsumerUniV3ErrorsSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ZetaTokenConsumerUniV3ErrorsSession struct { + Contract *ZetaTokenConsumerUniV3Errors // 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 +} + +// ZetaTokenConsumerUniV3ErrorsCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ZetaTokenConsumerUniV3ErrorsCallerSession struct { + Contract *ZetaTokenConsumerUniV3ErrorsCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ZetaTokenConsumerUniV3ErrorsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ZetaTokenConsumerUniV3ErrorsTransactorSession struct { + Contract *ZetaTokenConsumerUniV3ErrorsTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZetaTokenConsumerUniV3ErrorsRaw is an auto generated low-level Go binding around an Ethereum contract. +type ZetaTokenConsumerUniV3ErrorsRaw struct { + Contract *ZetaTokenConsumerUniV3Errors // Generic contract binding to access the raw methods on +} + +// ZetaTokenConsumerUniV3ErrorsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ZetaTokenConsumerUniV3ErrorsCallerRaw struct { + Contract *ZetaTokenConsumerUniV3ErrorsCaller // Generic read-only contract binding to access the raw methods on +} + +// ZetaTokenConsumerUniV3ErrorsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ZetaTokenConsumerUniV3ErrorsTransactorRaw struct { + Contract *ZetaTokenConsumerUniV3ErrorsTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewZetaTokenConsumerUniV3Errors creates a new instance of ZetaTokenConsumerUniV3Errors, bound to a specific deployed contract. +func NewZetaTokenConsumerUniV3Errors(address common.Address, backend bind.ContractBackend) (*ZetaTokenConsumerUniV3Errors, error) { + contract, err := bindZetaTokenConsumerUniV3Errors(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ZetaTokenConsumerUniV3Errors{ZetaTokenConsumerUniV3ErrorsCaller: ZetaTokenConsumerUniV3ErrorsCaller{contract: contract}, ZetaTokenConsumerUniV3ErrorsTransactor: ZetaTokenConsumerUniV3ErrorsTransactor{contract: contract}, ZetaTokenConsumerUniV3ErrorsFilterer: ZetaTokenConsumerUniV3ErrorsFilterer{contract: contract}}, nil +} + +// NewZetaTokenConsumerUniV3ErrorsCaller creates a new read-only instance of ZetaTokenConsumerUniV3Errors, bound to a specific deployed contract. +func NewZetaTokenConsumerUniV3ErrorsCaller(address common.Address, caller bind.ContractCaller) (*ZetaTokenConsumerUniV3ErrorsCaller, error) { + contract, err := bindZetaTokenConsumerUniV3Errors(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ZetaTokenConsumerUniV3ErrorsCaller{contract: contract}, nil +} + +// NewZetaTokenConsumerUniV3ErrorsTransactor creates a new write-only instance of ZetaTokenConsumerUniV3Errors, bound to a specific deployed contract. +func NewZetaTokenConsumerUniV3ErrorsTransactor(address common.Address, transactor bind.ContractTransactor) (*ZetaTokenConsumerUniV3ErrorsTransactor, error) { + contract, err := bindZetaTokenConsumerUniV3Errors(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ZetaTokenConsumerUniV3ErrorsTransactor{contract: contract}, nil +} + +// NewZetaTokenConsumerUniV3ErrorsFilterer creates a new log filterer instance of ZetaTokenConsumerUniV3Errors, bound to a specific deployed contract. +func NewZetaTokenConsumerUniV3ErrorsFilterer(address common.Address, filterer bind.ContractFilterer) (*ZetaTokenConsumerUniV3ErrorsFilterer, error) { + contract, err := bindZetaTokenConsumerUniV3Errors(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ZetaTokenConsumerUniV3ErrorsFilterer{contract: contract}, nil +} + +// bindZetaTokenConsumerUniV3Errors binds a generic wrapper to an already deployed contract. +func bindZetaTokenConsumerUniV3Errors(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ZetaTokenConsumerUniV3ErrorsMetaData.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 (_ZetaTokenConsumerUniV3Errors *ZetaTokenConsumerUniV3ErrorsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ZetaTokenConsumerUniV3Errors.Contract.ZetaTokenConsumerUniV3ErrorsCaller.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 (_ZetaTokenConsumerUniV3Errors *ZetaTokenConsumerUniV3ErrorsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZetaTokenConsumerUniV3Errors.Contract.ZetaTokenConsumerUniV3ErrorsTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZetaTokenConsumerUniV3Errors *ZetaTokenConsumerUniV3ErrorsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZetaTokenConsumerUniV3Errors.Contract.ZetaTokenConsumerUniV3ErrorsTransactor.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 (_ZetaTokenConsumerUniV3Errors *ZetaTokenConsumerUniV3ErrorsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ZetaTokenConsumerUniV3Errors.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 (_ZetaTokenConsumerUniV3Errors *ZetaTokenConsumerUniV3ErrorsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZetaTokenConsumerUniV3Errors.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZetaTokenConsumerUniV3Errors *ZetaTokenConsumerUniV3ErrorsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZetaTokenConsumerUniV3Errors.Contract.contract.Transact(opts, method, params...) +} diff --git a/scripts/deployments/tools/deterministic-deploy-zeta-consumer-pancakev3.ts b/scripts/deployments/tools/deterministic-deploy-zeta-consumer-pancakev3.ts new file mode 100644 index 00000000..608f36e7 --- /dev/null +++ b/scripts/deployments/tools/deterministic-deploy-zeta-consumer-pancakev3.ts @@ -0,0 +1,45 @@ +import { ethers, network } from "hardhat"; + +import { getAddress, getNonZetaAddress, isProtocolNetworkName } from "../../../lib"; +import { ZetaTokenConsumerPancakeV3__factory } from "../../../typechain-types"; + +export async function deterministicDeployZetaConsumer() { + if (!isProtocolNetworkName(network.name)) { + throw new Error(`network.name: ${network.name} isn't supported.`); + } + const accounts = await ethers.getSigners(); + const [signer] = accounts; + + const zetaTokenAddress = getAddress("zetaToken", network.name); + const uniswapV3Router = getNonZetaAddress("uniswapV3Router", network.name); + const uniswapV3Factory = getNonZetaAddress("uniswapV3Factory", network.name); + const WETH9Address = getNonZetaAddress("weth9", network.name); + + const zetaPoolFee = 500; + const tokenPoolFee = 3000; + + console.log([zetaTokenAddress, uniswapV3Router, uniswapV3Factory, WETH9Address, zetaPoolFee, tokenPoolFee]); + + const Factory = new ZetaTokenConsumerPancakeV3__factory(signer); + const contract = await Factory.deploy( + zetaTokenAddress, + uniswapV3Router, + uniswapV3Factory, + WETH9Address, + zetaPoolFee, + tokenPoolFee + ); + await contract.deployed(); + const address = contract.address; + + console.log("Deployed ZetaConsumer. Address:", address); +} + +if (!process.env.EXECUTE_PROGRAMMATICALLY) { + deterministicDeployZetaConsumer() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); +} diff --git a/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ISwapRouterPancake.ts b/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ISwapRouterPancake.ts new file mode 100644 index 00000000..f034d1d8 --- /dev/null +++ b/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ISwapRouterPancake.ts @@ -0,0 +1,240 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export declare namespace ISwapRouterPancake { + export type ExactInputParamsStruct = { + path: PromiseOrValue; + recipient: PromiseOrValue; + amountIn: PromiseOrValue; + amountOutMinimum: PromiseOrValue; + }; + + export type ExactInputParamsStructOutput = [ + string, + string, + BigNumber, + BigNumber + ] & { + path: string; + recipient: string; + amountIn: BigNumber; + amountOutMinimum: BigNumber; + }; + + export type ExactInputSingleParamsStruct = { + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + fee: PromiseOrValue; + recipient: PromiseOrValue; + amountIn: PromiseOrValue; + amountOutMinimum: PromiseOrValue; + sqrtPriceLimitX96: PromiseOrValue; + }; + + export type ExactInputSingleParamsStructOutput = [ + string, + string, + number, + string, + BigNumber, + BigNumber, + BigNumber + ] & { + tokenIn: string; + tokenOut: string; + fee: number; + recipient: string; + amountIn: BigNumber; + amountOutMinimum: BigNumber; + sqrtPriceLimitX96: BigNumber; + }; +} + +export interface ISwapRouterPancakeInterface extends utils.Interface { + functions: { + "exactInput((bytes,address,uint256,uint256))": FunctionFragment; + "exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))": FunctionFragment; + "uniswapV3SwapCallback(int256,int256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "exactInput" + | "exactInputSingle" + | "uniswapV3SwapCallback" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "exactInput", + values: [ISwapRouterPancake.ExactInputParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "exactInputSingle", + values: [ISwapRouterPancake.ExactInputSingleParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "uniswapV3SwapCallback", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "exactInput", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "exactInputSingle", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uniswapV3SwapCallback", + data: BytesLike + ): Result; + + events: {}; +} + +export interface ISwapRouterPancake extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ISwapRouterPancakeInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + exactInput( + params: ISwapRouterPancake.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exactInputSingle( + params: ISwapRouterPancake.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + uniswapV3SwapCallback( + amount0Delta: PromiseOrValue, + amount1Delta: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + exactInput( + params: ISwapRouterPancake.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exactInputSingle( + params: ISwapRouterPancake.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + uniswapV3SwapCallback( + amount0Delta: PromiseOrValue, + amount1Delta: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + exactInput( + params: ISwapRouterPancake.ExactInputParamsStruct, + overrides?: CallOverrides + ): Promise; + + exactInputSingle( + params: ISwapRouterPancake.ExactInputSingleParamsStruct, + overrides?: CallOverrides + ): Promise; + + uniswapV3SwapCallback( + amount0Delta: PromiseOrValue, + amount1Delta: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + exactInput( + params: ISwapRouterPancake.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exactInputSingle( + params: ISwapRouterPancake.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + uniswapV3SwapCallback( + amount0Delta: PromiseOrValue, + amount1Delta: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + exactInput( + params: ISwapRouterPancake.ExactInputParamsStruct, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + exactInputSingle( + params: ISwapRouterPancake.ExactInputSingleParamsStruct, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + uniswapV3SwapCallback( + amount0Delta: PromiseOrValue, + amount1Delta: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/WETH9.ts b/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/WETH9.ts new file mode 100644 index 00000000..a2d73dde --- /dev/null +++ b/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/WETH9.ts @@ -0,0 +1,103 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface WETH9Interface extends utils.Interface { + functions: { + "withdraw(uint256)": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "withdraw"): FunctionFragment; + + encodeFunctionData( + functionFragment: "withdraw", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + + events: {}; +} + +export interface WETH9 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: WETH9Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + withdraw( + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + withdraw( + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + withdraw( + wad: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + withdraw( + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + withdraw( + wad: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerPancakeV3.ts b/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerPancakeV3.ts new file mode 100644 index 00000000..e92e2898 --- /dev/null +++ b/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerPancakeV3.ts @@ -0,0 +1,512 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface ZetaTokenConsumerPancakeV3Interface extends utils.Interface { + functions: { + "WETH9Address()": FunctionFragment; + "getEthFromZeta(address,uint256,uint256)": FunctionFragment; + "getTokenFromZeta(address,uint256,address,uint256)": FunctionFragment; + "getZetaFromEth(address,uint256)": FunctionFragment; + "getZetaFromToken(address,uint256,address,uint256)": FunctionFragment; + "hasZetaLiquidity()": FunctionFragment; + "pancakeV3Router()": FunctionFragment; + "tokenPoolFee()": FunctionFragment; + "uniswapV3Factory()": FunctionFragment; + "zetaPoolFee()": FunctionFragment; + "zetaToken()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "WETH9Address" + | "getEthFromZeta" + | "getTokenFromZeta" + | "getZetaFromEth" + | "getZetaFromToken" + | "hasZetaLiquidity" + | "pancakeV3Router" + | "tokenPoolFee" + | "uniswapV3Factory" + | "zetaPoolFee" + | "zetaToken" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "WETH9Address", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getEthFromZeta", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getTokenFromZeta", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getZetaFromEth", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getZetaFromToken", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "hasZetaLiquidity", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "pancakeV3Router", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "tokenPoolFee", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "uniswapV3Factory", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "zetaPoolFee", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "zetaToken", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "WETH9Address", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getEthFromZeta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTokenFromZeta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getZetaFromEth", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getZetaFromToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "hasZetaLiquidity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "pancakeV3Router", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "tokenPoolFee", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uniswapV3Factory", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "zetaPoolFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "zetaToken", data: BytesLike): Result; + + events: { + "EthExchangedForZeta(uint256,uint256)": EventFragment; + "TokenExchangedForZeta(address,uint256,uint256)": EventFragment; + "ZetaExchangedForEth(uint256,uint256)": EventFragment; + "ZetaExchangedForToken(address,uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "EthExchangedForZeta"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenExchangedForZeta"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaExchangedForEth"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ZetaExchangedForToken"): EventFragment; +} + +export interface EthExchangedForZetaEventObject { + amountIn: BigNumber; + amountOut: BigNumber; +} +export type EthExchangedForZetaEvent = TypedEvent< + [BigNumber, BigNumber], + EthExchangedForZetaEventObject +>; + +export type EthExchangedForZetaEventFilter = + TypedEventFilter; + +export interface TokenExchangedForZetaEventObject { + token: string; + amountIn: BigNumber; + amountOut: BigNumber; +} +export type TokenExchangedForZetaEvent = TypedEvent< + [string, BigNumber, BigNumber], + TokenExchangedForZetaEventObject +>; + +export type TokenExchangedForZetaEventFilter = + TypedEventFilter; + +export interface ZetaExchangedForEthEventObject { + amountIn: BigNumber; + amountOut: BigNumber; +} +export type ZetaExchangedForEthEvent = TypedEvent< + [BigNumber, BigNumber], + ZetaExchangedForEthEventObject +>; + +export type ZetaExchangedForEthEventFilter = + TypedEventFilter; + +export interface ZetaExchangedForTokenEventObject { + token: string; + amountIn: BigNumber; + amountOut: BigNumber; +} +export type ZetaExchangedForTokenEvent = TypedEvent< + [string, BigNumber, BigNumber], + ZetaExchangedForTokenEventObject +>; + +export type ZetaExchangedForTokenEventFilter = + TypedEventFilter; + +export interface ZetaTokenConsumerPancakeV3 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaTokenConsumerPancakeV3Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + WETH9Address(overrides?: CallOverrides): Promise<[string]>; + + getEthFromZeta( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + zetaTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getTokenFromZeta( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + outputToken: PromiseOrValue, + zetaTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getZetaFromEth( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getZetaFromToken( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + inputToken: PromiseOrValue, + inputTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasZetaLiquidity(overrides?: CallOverrides): Promise<[boolean]>; + + pancakeV3Router(overrides?: CallOverrides): Promise<[string]>; + + tokenPoolFee(overrides?: CallOverrides): Promise<[number]>; + + uniswapV3Factory(overrides?: CallOverrides): Promise<[string]>; + + zetaPoolFee(overrides?: CallOverrides): Promise<[number]>; + + zetaToken(overrides?: CallOverrides): Promise<[string]>; + }; + + WETH9Address(overrides?: CallOverrides): Promise; + + getEthFromZeta( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + zetaTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getTokenFromZeta( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + outputToken: PromiseOrValue, + zetaTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getZetaFromEth( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getZetaFromToken( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + inputToken: PromiseOrValue, + inputTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasZetaLiquidity(overrides?: CallOverrides): Promise; + + pancakeV3Router(overrides?: CallOverrides): Promise; + + tokenPoolFee(overrides?: CallOverrides): Promise; + + uniswapV3Factory(overrides?: CallOverrides): Promise; + + zetaPoolFee(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + + callStatic: { + WETH9Address(overrides?: CallOverrides): Promise; + + getEthFromZeta( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + zetaTokenAmount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getTokenFromZeta( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + outputToken: PromiseOrValue, + zetaTokenAmount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getZetaFromEth( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getZetaFromToken( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + inputToken: PromiseOrValue, + inputTokenAmount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + hasZetaLiquidity(overrides?: CallOverrides): Promise; + + pancakeV3Router(overrides?: CallOverrides): Promise; + + tokenPoolFee(overrides?: CallOverrides): Promise; + + uniswapV3Factory(overrides?: CallOverrides): Promise; + + zetaPoolFee(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + filters: { + "EthExchangedForZeta(uint256,uint256)"( + amountIn?: null, + amountOut?: null + ): EthExchangedForZetaEventFilter; + EthExchangedForZeta( + amountIn?: null, + amountOut?: null + ): EthExchangedForZetaEventFilter; + + "TokenExchangedForZeta(address,uint256,uint256)"( + token?: null, + amountIn?: null, + amountOut?: null + ): TokenExchangedForZetaEventFilter; + TokenExchangedForZeta( + token?: null, + amountIn?: null, + amountOut?: null + ): TokenExchangedForZetaEventFilter; + + "ZetaExchangedForEth(uint256,uint256)"( + amountIn?: null, + amountOut?: null + ): ZetaExchangedForEthEventFilter; + ZetaExchangedForEth( + amountIn?: null, + amountOut?: null + ): ZetaExchangedForEthEventFilter; + + "ZetaExchangedForToken(address,uint256,uint256)"( + token?: null, + amountIn?: null, + amountOut?: null + ): ZetaExchangedForTokenEventFilter; + ZetaExchangedForToken( + token?: null, + amountIn?: null, + amountOut?: null + ): ZetaExchangedForTokenEventFilter; + }; + + estimateGas: { + WETH9Address(overrides?: CallOverrides): Promise; + + getEthFromZeta( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + zetaTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getTokenFromZeta( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + outputToken: PromiseOrValue, + zetaTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getZetaFromEth( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getZetaFromToken( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + inputToken: PromiseOrValue, + inputTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasZetaLiquidity(overrides?: CallOverrides): Promise; + + pancakeV3Router(overrides?: CallOverrides): Promise; + + tokenPoolFee(overrides?: CallOverrides): Promise; + + uniswapV3Factory(overrides?: CallOverrides): Promise; + + zetaPoolFee(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + WETH9Address(overrides?: CallOverrides): Promise; + + getEthFromZeta( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + zetaTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getTokenFromZeta( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + outputToken: PromiseOrValue, + zetaTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getZetaFromEth( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getZetaFromToken( + destinationAddress: PromiseOrValue, + minAmountOut: PromiseOrValue, + inputToken: PromiseOrValue, + inputTokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + hasZetaLiquidity(overrides?: CallOverrides): Promise; + + pancakeV3Router(overrides?: CallOverrides): Promise; + + tokenPoolFee(overrides?: CallOverrides): Promise; + + uniswapV3Factory(overrides?: CallOverrides): Promise; + + zetaPoolFee(overrides?: CallOverrides): Promise; + + zetaToken(overrides?: CallOverrides): Promise; + }; +} diff --git a/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerUniV3Errors.ts b/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerUniV3Errors.ts new file mode 100644 index 00000000..0586677c --- /dev/null +++ b/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerUniV3Errors.ts @@ -0,0 +1,56 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface ZetaTokenConsumerUniV3ErrorsInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ZetaTokenConsumerUniV3Errors extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ZetaTokenConsumerUniV3ErrorsInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/index.ts b/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/index.ts new file mode 100644 index 00000000..21dcda9d --- /dev/null +++ b/typechain-types/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ISwapRouterPancake } from "./ISwapRouterPancake"; +export type { WETH9 } from "./WETH9"; +export type { ZetaTokenConsumerPancakeV3 } from "./ZetaTokenConsumerPancakeV3"; +export type { ZetaTokenConsumerUniV3Errors } from "./ZetaTokenConsumerUniV3Errors"; diff --git a/typechain-types/contracts/evm/tools/index.ts b/typechain-types/contracts/evm/tools/index.ts index 61c07a84..d91c2b58 100644 --- a/typechain-types/contracts/evm/tools/index.ts +++ b/typechain-types/contracts/evm/tools/index.ts @@ -3,6 +3,8 @@ /* eslint-disable */ import type * as immutableCreate2FactorySol from "./ImmutableCreate2Factory.sol"; export type { immutableCreate2FactorySol }; +import type * as zetaTokenConsumerPancakeV3StrategySol from "./ZetaTokenConsumerPancakeV3.strategy.sol"; +export type { zetaTokenConsumerPancakeV3StrategySol }; import type * as zetaTokenConsumerTridentStrategySol from "./ZetaTokenConsumerTrident.strategy.sol"; export type { zetaTokenConsumerTridentStrategySol }; import type * as zetaTokenConsumerUniV2StrategySol from "./ZetaTokenConsumerUniV2.strategy.sol"; diff --git a/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ISwapRouterPancake__factory.ts b/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ISwapRouterPancake__factory.ts new file mode 100644 index 00000000..dfe09ffc --- /dev/null +++ b/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ISwapRouterPancake__factory.ts @@ -0,0 +1,146 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ISwapRouterPancake, + ISwapRouterPancakeInterface, +} from "../../../../../contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ISwapRouterPancake"; + +const _abi = [ + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "path", + type: "bytes", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMinimum", + type: "uint256", + }, + ], + internalType: "struct ISwapRouterPancake.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: "amountIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOutMinimum", + type: "uint256", + }, + { + internalType: "uint160", + name: "sqrtPriceLimitX96", + type: "uint160", + }, + ], + internalType: "struct ISwapRouterPancake.ExactInputSingleParams", + name: "params", + type: "tuple", + }, + ], + name: "exactInputSingle", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + 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", + }, +] as const; + +export class ISwapRouterPancake__factory { + static readonly abi = _abi; + static createInterface(): ISwapRouterPancakeInterface { + return new utils.Interface(_abi) as ISwapRouterPancakeInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ISwapRouterPancake { + return new Contract(address, _abi, signerOrProvider) as ISwapRouterPancake; + } +} diff --git a/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/WETH9__factory.ts b/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/WETH9__factory.ts new file mode 100644 index 00000000..b91d6b2c --- /dev/null +++ b/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/WETH9__factory.ts @@ -0,0 +1,36 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + WETH9, + WETH9Interface, +} from "../../../../../contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/WETH9"; + +const _abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "wad", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class WETH9__factory { + static readonly abi = _abi; + static createInterface(): WETH9Interface { + return new utils.Interface(_abi) as WETH9Interface; + } + static connect(address: string, signerOrProvider: Signer | Provider): WETH9 { + return new Contract(address, _abi, signerOrProvider) as WETH9; + } +} diff --git a/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerPancakeV3__factory.ts b/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerPancakeV3__factory.ts new file mode 100644 index 00000000..7f1ba318 --- /dev/null +++ b/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerPancakeV3__factory.ts @@ -0,0 +1,462 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Signer, + utils, + Contract, + ContractFactory, + BigNumberish, + Overrides, +} from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../../common"; +import type { + ZetaTokenConsumerPancakeV3, + ZetaTokenConsumerPancakeV3Interface, +} from "../../../../../contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerPancakeV3"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "zetaToken_", + type: "address", + }, + { + internalType: "address", + name: "pancakeV3Router_", + type: "address", + }, + { + internalType: "address", + name: "uniswapV3Factory_", + type: "address", + }, + { + internalType: "address", + name: "WETH9Address_", + type: "address", + }, + { + internalType: "uint24", + name: "zetaPoolFee_", + type: "uint24", + }, + { + internalType: "uint24", + name: "tokenPoolFee_", + type: "uint24", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ErrorSendingETH", + type: "error", + }, + { + inputs: [], + name: "InputCantBeZero", + type: "error", + }, + { + inputs: [], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [], + name: "ReentrancyError", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "EthExchangedForZeta", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "TokenExchangedForZeta", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "ZetaExchangedForEth", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountIn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOut", + type: "uint256", + }, + ], + name: "ZetaExchangedForToken", + type: "event", + }, + { + inputs: [], + name: "WETH9Address", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "zetaTokenAmount", + type: "uint256", + }, + ], + name: "getEthFromZeta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "address", + name: "outputToken", + type: "address", + }, + { + internalType: "uint256", + name: "zetaTokenAmount", + type: "uint256", + }, + ], + name: "getTokenFromZeta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + ], + name: "getZetaFromEth", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "destinationAddress", + type: "address", + }, + { + internalType: "uint256", + name: "minAmountOut", + type: "uint256", + }, + { + internalType: "address", + name: "inputToken", + type: "address", + }, + { + internalType: "uint256", + name: "inputTokenAmount", + type: "uint256", + }, + ], + name: "getZetaFromToken", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "hasZetaLiquidity", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pancakeV3Router", + outputs: [ + { + internalType: "contract ISwapRouterPancake", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tokenPoolFee", + outputs: [ + { + internalType: "uint24", + name: "", + type: "uint24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "uniswapV3Factory", + outputs: [ + { + internalType: "contract IUniswapV3Factory", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "zetaPoolFee", + outputs: [ + { + internalType: "uint24", + name: "", + type: "uint24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "zetaToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +] as const; + +const _bytecode = + "0x6101406040523480156200001257600080fd5b506040516200288c3803806200288c83398181016040528101906200003891906200028a565b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480620000a05750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b80620000d85750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80620001105750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1562000148576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508473ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1660601b815250508373ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508162ffffff1660808162ffffff1660e81b815250508062ffffff1660a08162ffffff1660e81b81525050505050505050620003a2565b6000815190506200026d816200036e565b92915050565b600081519050620002848162000388565b92915050565b60008060008060008060c08789031215620002aa57620002a962000369565b5b6000620002ba89828a016200025c565b9650506020620002cd89828a016200025c565b9550506040620002e089828a016200025c565b9450506060620002f389828a016200025c565b93505060806200030689828a0162000273565b92505060a06200031989828a0162000273565b9150509295509295509295565b600062000333826200033a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b600080fd5b620003798162000326565b81146200038557600080fd5b50565b62000393816200035a565b81146200039f57600080fd5b50565b60805160e81c60a05160e81c60c05160601c60e05160601c6101005160601c6101205160601c6123b6620004d660003960008181610d340152610d7f01526000818161045c0152818161067c015281816107a8015281816109b401528181610b13015281816110f80152818161124401526113530152600081816103ae0152818161054e015281816107350152818161096a015281816109d601528181610a2901528181610ddc015281816110ae0152818161111a015261116d015260008181610372015281816106f301528181610a6501528181610bc001528181610dbb015281816111af01526113770152600081816106d201528181610d5801526111d00152600081816103ea015281816107140152818161089d01528181610aa101528181610dfd015261118e01526123b66000f3fe6080604052600436106100a05760003560e01c80635b549182116100645780635b549182146101ac5780635d9dfdde146101d757806380801f8414610202578063a53fb10b1461022d578063c27745dd1461026a578063c469cf1414610295576100a7565b8063013b2ff8146100ac57806321e093b1146100dc5780632405620a146101075780633cbd70051461014457806354c49a2a1461016f576100a7565b366100a757005b600080fd5b6100c660048036038101906100c191906118c0565b6102c0565b6040516100d39190612030565b60405180910390f35b3480156100e857600080fd5b506100f161054c565b6040516100fe9190611dd3565b60405180910390f35b34801561011357600080fd5b5061012e60048036038101906101299190611900565b610570565b60405161013b9190612030565b60405180910390f35b34801561015057600080fd5b5061015961089b565b6040516101669190612015565b60405180910390f35b34801561017b57600080fd5b5061019660048036038101906101919190611967565b6108bf565b6040516101a39190612030565b60405180910390f35b3480156101b857600080fd5b506101c1610d32565b6040516101ce9190611f1b565b60405180910390f35b3480156101e357600080fd5b506101ec610d56565b6040516101f99190612015565b60405180910390f35b34801561020e57600080fd5b50610217610d7a565b6040516102249190611ee5565b60405180910390f35b34801561023957600080fd5b50610254600480360381019061024f9190611900565b610f6b565b6040516102619190612030565b60405180910390f35b34801561027657600080fd5b5061027f611351565b60405161028c9190611f00565b60405180910390f35b3480156102a157600080fd5b506102aa611375565b6040516102b79190611dd3565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610328576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341415610363576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518060e001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001348152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166304e45aaf34846040518363ffffffff1660e01b81526004016104b49190611ffa565b6020604051808303818588803b1580156104cd57600080fd5b505af11580156104e1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906105069190611a14565b90507f87890b0a30955b1db16cc894fbe24779ae05d9f337bfe8b6dfc0809b5bf9da11348260405161053992919061204b565b60405180910390a1809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806105d85750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561060f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082141561064a576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106773330848673ffffffffffffffffffffffffffffffffffffffff16611399909392919063ffffffff16565b6106c27f0000000000000000000000000000000000000000000000000000000000000000838573ffffffffffffffffffffffffffffffffffffffff166114229092919063ffffffff16565b60006040518060800160405280857f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000604051602001610768959493929190611d48565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b858183f836040518263ffffffff1660e01b81526004016107ff9190611fd8565b602060405180830381600087803b15801561081957600080fd5b505af115801561082d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108519190611a14565b90507f017190d3d99ee6d8dd0604ef1e71ff9802810c6485f57c9b2ed6169848dd119f85858360405161088693929190611eae565b60405180910390a18092505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610927576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000821415610962576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109af3330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611399909392919063ffffffff16565b610a1a7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114229092919063ffffffff16565b60006040518060e001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000062ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001848152602001858152602001600073ffffffffffffffffffffffffffffffffffffffff16815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166304e45aaf836040518263ffffffff1660e01b8152600401610b6a9190611ffa565b602060405180830381600087803b158015610b8457600080fd5b505af1158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190611a14565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610c179190612030565b600060405180830381600087803b158015610c3157600080fd5b505af1158015610c45573d6000803e3d6000fd5b505050507f74e171117e91660f493740924d8bad0caf48dc4fbccb767fb05935397a2c17ae8482604051610c7a92919061204b565b60405180910390a160008673ffffffffffffffffffffffffffffffffffffffff1682604051610ca890611dbe565b60006040518083038185875af1925050503d8060008114610ce5576040519150601f19603f3d011682016040523d82523d6000602084013e610cea565b606091505b5050905080610d25576040517f3794aeaf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8193505050509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631698ee827f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518463ffffffff1660e01b8152600401610e3a93929190611e17565b60206040518083038186803b158015610e5257600080fd5b505afa158015610e66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8a9190611893565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ecb576000915050610f68565b600081905060008173ffffffffffffffffffffffffffffffffffffffff16631a6865026040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1857600080fd5b505afa158015610f2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5091906119e7565b6fffffffffffffffffffffffffffffffff1611925050505b90565b60008060009054906101000a900460ff1615610fb3576040517f29f745a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806110345750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b1561106b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008214156110a6576040517fb813f54900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110f33330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611399909392919063ffffffff16565b61115e7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166114229092919063ffffffff16565b600060405180608001604052807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000089604051602001611204959493929190611d48565b60405160208183030381529060405281526020018773ffffffffffffffffffffffffffffffffffffffff16815260200184815260200186815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b858183f836040518263ffffffff1660e01b815260040161129b9190611fd8565b602060405180830381600087803b1580156112b557600080fd5b505af11580156112c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ed9190611a14565b90507f0a7cb8f6e1d29e616c1209a3f418c17b3a9137005377f6dd072217b1ede2573b85858360405161132293929190611eae565b60405180910390a1809250505060008060006101000a81548160ff021916908315150217905550949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b61141c846323b872dd60e01b8585856040516024016113ba93929190611e4e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611580565b50505050565b60008114806114bb575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611469929190611dee565b60206040518083038186803b15801561148157600080fd5b505afa158015611495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b99190611a14565b145b6114fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f190611fb8565b60405180910390fd5b61157b8363095ea7b360e01b8484604051602401611519929190611e85565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611580565b505050565b60006115e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116479092919063ffffffff16565b9050600081511115611642578080602001905181019061160291906119ba565b611641576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163890611f98565b60405180910390fd5b5b505050565b6060611656848460008561165f565b90509392505050565b6060824710156116a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161169b90611f58565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516116cd9190611da7565b60006040518083038185875af1925050503d806000811461170a576040519150601f19603f3d011682016040523d82523d6000602084013e61170f565b606091505b50915091506117208783838761172c565b92505050949350505050565b6060831561178f5760008351141561178757611747856117a2565b611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177d90611f78565b60405180910390fd5b5b82905061179a565b61179983836117c5565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156117d85781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180c9190611f36565b60405180910390fd5b60008135905061182481612324565b92915050565b60008151905061183981612324565b92915050565b60008151905061184e8161233b565b92915050565b60008151905061186381612352565b92915050565b60008135905061187881612369565b92915050565b60008151905061188d81612369565b92915050565b6000602082840312156118a9576118a86121db565b5b60006118b78482850161182a565b91505092915050565b600080604083850312156118d7576118d66121db565b5b60006118e585828601611815565b92505060206118f685828601611869565b9150509250929050565b6000806000806080858703121561191a576119196121db565b5b600061192887828801611815565b945050602061193987828801611869565b935050604061194a87828801611815565b925050606061195b87828801611869565b91505092959194509250565b6000806000606084860312156119805761197f6121db565b5b600061198e86828701611815565b935050602061199f86828701611869565b92505060406119b086828701611869565b9150509250925092565b6000602082840312156119d0576119cf6121db565b5b60006119de8482850161183f565b91505092915050565b6000602082840312156119fd576119fc6121db565b5b6000611a0b84828501611854565b91505092915050565b600060208284031215611a2a57611a296121db565b5b6000611a388482850161187e565b91505092915050565b611a4a816120b7565b82525050565b611a59816120b7565b82525050565b611a70611a6b826120b7565b6121a5565b82525050565b611a7f816120c9565b82525050565b6000611a9082612074565b611a9a818561208a565b9350611aaa818560208601612172565b611ab3816121e0565b840191505092915050565b6000611ac982612074565b611ad3818561209b565b9350611ae3818560208601612172565b80840191505092915050565b611af88161212a565b82525050565b611b078161213c565b82525050565b6000611b188261207f565b611b2281856120a6565b9350611b32818560208601612172565b611b3b816121e0565b840191505092915050565b6000611b536026836120a6565b9150611b5e8261220b565b604082019050919050565b6000611b7660008361209b565b9150611b818261225a565b600082019050919050565b6000611b99601d836120a6565b9150611ba48261225d565b602082019050919050565b6000611bbc602a836120a6565b9150611bc782612286565b604082019050919050565b6000611bdf6036836120a6565b9150611bea826122d5565b604082019050919050565b60006080830160008301518482036000860152611c128282611a85565b9150506020830151611c276020860182611a41565b506040830151611c3a6040860182611d2a565b506060830151611c4d6060860182611d2a565b508091505092915050565b60e082016000820151611c6e6000850182611a41565b506020820151611c816020850182611a41565b506040820151611c946040850182611cf5565b506060820151611ca76060850182611a41565b506080820151611cba6080850182611d2a565b5060a0820151611ccd60a0850182611d2a565b5060c0820151611ce060c0850182611ce6565b50505050565b611cef816120f1565b82525050565b611cfe81612111565b82525050565b611d0d81612111565b82525050565b611d24611d1f82612111565b6121c9565b82525050565b611d3381612120565b82525050565b611d4281612120565b82525050565b6000611d548288611a5f565b601482019150611d648287611d13565b600382019150611d748286611a5f565b601482019150611d848285611d13565b600382019150611d948284611a5f565b6014820191508190509695505050505050565b6000611db38284611abe565b915081905092915050565b6000611dc982611b69565b9150819050919050565b6000602082019050611de86000830184611a50565b92915050565b6000604082019050611e036000830185611a50565b611e106020830184611a50565b9392505050565b6000606082019050611e2c6000830186611a50565b611e396020830185611a50565b611e466040830184611d04565b949350505050565b6000606082019050611e636000830186611a50565b611e706020830185611a50565b611e7d6040830184611d39565b949350505050565b6000604082019050611e9a6000830185611a50565b611ea76020830184611d39565b9392505050565b6000606082019050611ec36000830186611a50565b611ed06020830185611d39565b611edd6040830184611d39565b949350505050565b6000602082019050611efa6000830184611a76565b92915050565b6000602082019050611f156000830184611aef565b92915050565b6000602082019050611f306000830184611afe565b92915050565b60006020820190508181036000830152611f508184611b0d565b905092915050565b60006020820190508181036000830152611f7181611b46565b9050919050565b60006020820190508181036000830152611f9181611b8c565b9050919050565b60006020820190508181036000830152611fb181611baf565b9050919050565b60006020820190508181036000830152611fd181611bd2565b9050919050565b60006020820190508181036000830152611ff28184611bf5565b905092915050565b600060e08201905061200f6000830184611c58565b92915050565b600060208201905061202a6000830184611d04565b92915050565b60006020820190506120456000830184611d39565b92915050565b60006040820190506120606000830185611d39565b61206d6020830184611d39565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006120c2826120f1565b9050919050565b60008115159050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062ffffff82169050919050565b6000819050919050565b60006121358261214e565b9050919050565b60006121478261214e565b9050919050565b600061215982612160565b9050919050565b600061216b826120f1565b9050919050565b60005b83811015612190578082015181840152602081019050612175565b8381111561219f576000848401525b50505050565b60006121b0826121b7565b9050919050565b60006121c2826121fe565b9050919050565b60006121d4826121f1565b9050919050565b600080fd5b6000601f19601f8301169050919050565b60008160e81b9050919050565b60008160601b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b61232d816120b7565b811461233857600080fd5b50565b612344816120c9565b811461234f57600080fd5b50565b61235b816120d5565b811461236657600080fd5b50565b61237281612120565b811461237d57600080fd5b5056fea264697066735822122027f90d12abe6bc83d01268f9d1f2b1f06cb3a1291fe43afcacc978ec0c07420664736f6c63430008070033"; + +type ZetaTokenConsumerPancakeV3ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ZetaTokenConsumerPancakeV3ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ZetaTokenConsumerPancakeV3__factory extends ContractFactory { + constructor(...args: ZetaTokenConsumerPancakeV3ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + zetaToken_: PromiseOrValue, + pancakeV3Router_: PromiseOrValue, + uniswapV3Factory_: PromiseOrValue, + WETH9Address_: PromiseOrValue, + zetaPoolFee_: PromiseOrValue, + tokenPoolFee_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy( + zetaToken_, + pancakeV3Router_, + uniswapV3Factory_, + WETH9Address_, + zetaPoolFee_, + tokenPoolFee_, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + zetaToken_: PromiseOrValue, + pancakeV3Router_: PromiseOrValue, + uniswapV3Factory_: PromiseOrValue, + WETH9Address_: PromiseOrValue, + zetaPoolFee_: PromiseOrValue, + tokenPoolFee_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction( + zetaToken_, + pancakeV3Router_, + uniswapV3Factory_, + WETH9Address_, + zetaPoolFee_, + tokenPoolFee_, + overrides || {} + ); + } + override attach(address: string): ZetaTokenConsumerPancakeV3 { + return super.attach(address) as ZetaTokenConsumerPancakeV3; + } + override connect(signer: Signer): ZetaTokenConsumerPancakeV3__factory { + return super.connect(signer) as ZetaTokenConsumerPancakeV3__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ZetaTokenConsumerPancakeV3Interface { + return new utils.Interface(_abi) as ZetaTokenConsumerPancakeV3Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaTokenConsumerPancakeV3 { + return new Contract( + address, + _abi, + signerOrProvider + ) as ZetaTokenConsumerPancakeV3; + } +} diff --git a/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts b/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts new file mode 100644 index 00000000..f207c3c6 --- /dev/null +++ b/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ZetaTokenConsumerUniV3Errors, + ZetaTokenConsumerUniV3ErrorsInterface, +} from "../../../../../contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerUniV3Errors"; + +const _abi = [ + { + inputs: [], + name: "ErrorSendingETH", + type: "error", + }, + { + inputs: [], + name: "InputCantBeZero", + type: "error", + }, + { + inputs: [], + name: "ReentrancyError", + type: "error", + }, +] as const; + +export class ZetaTokenConsumerUniV3Errors__factory { + static readonly abi = _abi; + static createInterface(): ZetaTokenConsumerUniV3ErrorsInterface { + return new utils.Interface(_abi) as ZetaTokenConsumerUniV3ErrorsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ZetaTokenConsumerUniV3Errors { + return new Contract( + address, + _abi, + signerOrProvider + ) as ZetaTokenConsumerUniV3Errors; + } +} diff --git a/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/index.ts b/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/index.ts new file mode 100644 index 00000000..e4bff3ee --- /dev/null +++ b/typechain-types/factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ISwapRouterPancake__factory } from "./ISwapRouterPancake__factory"; +export { WETH9__factory } from "./WETH9__factory"; +export { ZetaTokenConsumerPancakeV3__factory } from "./ZetaTokenConsumerPancakeV3__factory"; +export { ZetaTokenConsumerUniV3Errors__factory } from "./ZetaTokenConsumerUniV3Errors__factory"; diff --git a/typechain-types/factories/contracts/evm/tools/index.ts b/typechain-types/factories/contracts/evm/tools/index.ts index 961b142b..8f3bf27d 100644 --- a/typechain-types/factories/contracts/evm/tools/index.ts +++ b/typechain-types/factories/contracts/evm/tools/index.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ export * as immutableCreate2FactorySol from "./ImmutableCreate2Factory.sol"; +export * as zetaTokenConsumerPancakeV3StrategySol from "./ZetaTokenConsumerPancakeV3.strategy.sol"; export * as zetaTokenConsumerTridentStrategySol from "./ZetaTokenConsumerTrident.strategy.sol"; export * as zetaTokenConsumerUniV2StrategySol from "./ZetaTokenConsumerUniV2.strategy.sol"; export * as zetaTokenConsumerUniV3StrategySol from "./ZetaTokenConsumerUniV3.strategy.sol"; diff --git a/typechain-types/hardhat.d.ts b/typechain-types/hardhat.d.ts index c5849184..ee2e5d02 100644 --- a/typechain-types/hardhat.d.ts +++ b/typechain-types/hardhat.d.ts @@ -212,6 +212,22 @@ declare module "hardhat/types/runtime" { name: "ZetaInteractor", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "ISwapRouterPancake", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "WETH9", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaTokenConsumerPancakeV3", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ZetaTokenConsumerUniV3Errors", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "WETH9", signerOrOptions?: ethers.Signer | FactoryOptions @@ -575,6 +591,26 @@ declare module "hardhat/types/runtime" { address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "ISwapRouterPancake", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "WETH9", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaTokenConsumerPancakeV3", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ZetaTokenConsumerUniV3Errors", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "WETH9", address: string, diff --git a/typechain-types/index.ts b/typechain-types/index.ts index 6ea7edff..818d8c39 100644 --- a/typechain-types/index.ts +++ b/typechain-types/index.ts @@ -102,8 +102,14 @@ export type { IPoolRouter } from "./contracts/evm/tools/interfaces/TridentIPoolR export { IPoolRouter__factory } from "./factories/contracts/evm/tools/interfaces/TridentIPoolRouter.sol/IPoolRouter__factory"; export type { ZetaInteractor } from "./contracts/evm/tools/ZetaInteractor"; export { ZetaInteractor__factory } from "./factories/contracts/evm/tools/ZetaInteractor__factory"; -export type { WETH9 } from "./contracts/evm/tools/ZetaTokenConsumerTrident.strategy.sol/WETH9"; -export { WETH9__factory } from "./factories/contracts/evm/tools/ZetaTokenConsumerTrident.strategy.sol/WETH9__factory"; +export type { ISwapRouterPancake } from "./contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ISwapRouterPancake"; +export { ISwapRouterPancake__factory } from "./factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ISwapRouterPancake__factory"; +export type { WETH9 } from "./contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/WETH9"; +export { WETH9__factory } from "./factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/WETH9__factory"; +export type { ZetaTokenConsumerPancakeV3 } from "./contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerPancakeV3"; +export { ZetaTokenConsumerPancakeV3__factory } from "./factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerPancakeV3__factory"; +export type { ZetaTokenConsumerUniV3Errors } from "./contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerUniV3Errors"; +export { ZetaTokenConsumerUniV3Errors__factory } from "./factories/contracts/evm/tools/ZetaTokenConsumerPancakeV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory"; export type { ZetaTokenConsumerTrident } from "./contracts/evm/tools/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident"; export { ZetaTokenConsumerTrident__factory } from "./factories/contracts/evm/tools/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTrident__factory"; export type { ZetaTokenConsumerTridentErrors } from "./contracts/evm/tools/ZetaTokenConsumerTrident.strategy.sol/ZetaTokenConsumerTridentErrors"; @@ -114,8 +120,6 @@ export type { ZetaTokenConsumerUniV2Errors } from "./contracts/evm/tools/ZetaTok export { ZetaTokenConsumerUniV2Errors__factory } from "./factories/contracts/evm/tools/ZetaTokenConsumerUniV2.strategy.sol/ZetaTokenConsumerUniV2Errors__factory"; export type { ZetaTokenConsumerUniV3 } from "./contracts/evm/tools/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3"; export { ZetaTokenConsumerUniV3__factory } from "./factories/contracts/evm/tools/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3__factory"; -export type { ZetaTokenConsumerUniV3Errors } from "./contracts/evm/tools/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors"; -export { ZetaTokenConsumerUniV3Errors__factory } from "./factories/contracts/evm/tools/ZetaTokenConsumerUniV3.strategy.sol/ZetaTokenConsumerUniV3Errors__factory"; export type { ZetaEth } from "./contracts/evm/Zeta.eth.sol/ZetaEth"; export { ZetaEth__factory } from "./factories/contracts/evm/Zeta.eth.sol/ZetaEth__factory"; export type { ZetaNonEth } from "./contracts/evm/Zeta.non-eth.sol/ZetaNonEth";