refactor: move all remaining files to orig/ directory
Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
280
orig/bindings/interfaces/arbitrage.go
Normal file
280
orig/bindings/interfaces/arbitrage.go
Normal file
@@ -0,0 +1,280 @@
|
||||
// Code generated - DO NOT EDIT.
|
||||
// This file is a generated binding and any manual changes will be lost.
|
||||
|
||||
package interfaces
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
// ArbitrageParams is an auto generated low-level Go binding around an user-defined struct.
|
||||
type ArbitrageParams struct {
|
||||
Tokens []common.Address
|
||||
Pools []common.Address
|
||||
Amounts []*big.Int
|
||||
SwapData [][]byte
|
||||
MinProfit *big.Int
|
||||
Deadline *big.Int
|
||||
}
|
||||
|
||||
// TriangularArbitrageParams is an auto generated low-level Go binding around an user-defined struct.
|
||||
type TriangularArbitrageParams struct {
|
||||
TokenA common.Address
|
||||
TokenB common.Address
|
||||
TokenC common.Address
|
||||
PoolAB common.Address
|
||||
PoolBC common.Address
|
||||
PoolCA common.Address
|
||||
AmountIn *big.Int
|
||||
MinProfit *big.Int
|
||||
SwapDataAB []byte
|
||||
SwapDataBC []byte
|
||||
SwapDataCA []byte
|
||||
Deadline *big.Int
|
||||
}
|
||||
|
||||
// IArbitrageMetaData contains all meta data concerning the IArbitrage contract.
|
||||
var IArbitrageMetaData = &bind.MetaData{
|
||||
ABI: "[{\"type\":\"function\",\"name\":\"executeArbitrage\",\"inputs\":[{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structArbitrageParams\",\"components\":[{\"name\":\"tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"pools\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"amounts\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"swapData\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"minProfit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"deadline\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"executeTriangularArbitrage\",\"inputs\":[{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structTriangularArbitrageParams\",\"components\":[{\"name\":\"tokenA\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenB\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenC\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"poolAB\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"poolBC\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"poolCA\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amountIn\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minProfit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"swapDataAB\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"swapDataBC\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"swapDataCA\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"deadline\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"}]",
|
||||
}
|
||||
|
||||
// IArbitrageABI is the input ABI used to generate the binding from.
|
||||
// Deprecated: Use IArbitrageMetaData.ABI instead.
|
||||
var IArbitrageABI = IArbitrageMetaData.ABI
|
||||
|
||||
// IArbitrage is an auto generated Go binding around an Ethereum contract.
|
||||
type IArbitrage struct {
|
||||
IArbitrageCaller // Read-only binding to the contract
|
||||
IArbitrageTransactor // Write-only binding to the contract
|
||||
IArbitrageFilterer // Log filterer for contract events
|
||||
}
|
||||
|
||||
// IArbitrageCaller is an auto generated read-only Go binding around an Ethereum contract.
|
||||
type IArbitrageCaller struct {
|
||||
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||
}
|
||||
|
||||
// IArbitrageTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
||||
type IArbitrageTransactor struct {
|
||||
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||
}
|
||||
|
||||
// IArbitrageFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
||||
type IArbitrageFilterer struct {
|
||||
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||
}
|
||||
|
||||
// IArbitrageSession is an auto generated Go binding around an Ethereum contract,
|
||||
// with pre-set call and transact options.
|
||||
type IArbitrageSession struct {
|
||||
Contract *IArbitrage // 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
|
||||
}
|
||||
|
||||
// IArbitrageCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
||||
// with pre-set call options.
|
||||
type IArbitrageCallerSession struct {
|
||||
Contract *IArbitrageCaller // Generic contract caller binding to set the session for
|
||||
CallOpts bind.CallOpts // Call options to use throughout this session
|
||||
}
|
||||
|
||||
// IArbitrageTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
||||
// with pre-set transact options.
|
||||
type IArbitrageTransactorSession struct {
|
||||
Contract *IArbitrageTransactor // Generic contract transactor binding to set the session for
|
||||
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
||||
}
|
||||
|
||||
// IArbitrageRaw is an auto generated low-level Go binding around an Ethereum contract.
|
||||
type IArbitrageRaw struct {
|
||||
Contract *IArbitrage // Generic contract binding to access the raw methods on
|
||||
}
|
||||
|
||||
// IArbitrageCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
||||
type IArbitrageCallerRaw struct {
|
||||
Contract *IArbitrageCaller // Generic read-only contract binding to access the raw methods on
|
||||
}
|
||||
|
||||
// IArbitrageTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
||||
type IArbitrageTransactorRaw struct {
|
||||
Contract *IArbitrageTransactor // Generic write-only contract binding to access the raw methods on
|
||||
}
|
||||
|
||||
// NewIArbitrage creates a new instance of IArbitrage, bound to a specific deployed contract.
|
||||
func NewIArbitrage(address common.Address, backend bind.ContractBackend) (*IArbitrage, error) {
|
||||
contract, err := bindIArbitrage(address, backend, backend, backend)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &IArbitrage{IArbitrageCaller: IArbitrageCaller{contract: contract}, IArbitrageTransactor: IArbitrageTransactor{contract: contract}, IArbitrageFilterer: IArbitrageFilterer{contract: contract}}, nil
|
||||
}
|
||||
|
||||
// NewIArbitrageCaller creates a new read-only instance of IArbitrage, bound to a specific deployed contract.
|
||||
func NewIArbitrageCaller(address common.Address, caller bind.ContractCaller) (*IArbitrageCaller, error) {
|
||||
contract, err := bindIArbitrage(address, caller, nil, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &IArbitrageCaller{contract: contract}, nil
|
||||
}
|
||||
|
||||
// NewIArbitrageTransactor creates a new write-only instance of IArbitrage, bound to a specific deployed contract.
|
||||
func NewIArbitrageTransactor(address common.Address, transactor bind.ContractTransactor) (*IArbitrageTransactor, error) {
|
||||
contract, err := bindIArbitrage(address, nil, transactor, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &IArbitrageTransactor{contract: contract}, nil
|
||||
}
|
||||
|
||||
// NewIArbitrageFilterer creates a new log filterer instance of IArbitrage, bound to a specific deployed contract.
|
||||
func NewIArbitrageFilterer(address common.Address, filterer bind.ContractFilterer) (*IArbitrageFilterer, error) {
|
||||
contract, err := bindIArbitrage(address, nil, nil, filterer)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &IArbitrageFilterer{contract: contract}, nil
|
||||
}
|
||||
|
||||
// bindIArbitrage binds a generic wrapper to an already deployed contract.
|
||||
func bindIArbitrage(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
||||
parsed, err := IArbitrageMetaData.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 (_IArbitrage *IArbitrageRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
||||
return _IArbitrage.Contract.IArbitrageCaller.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 (_IArbitrage *IArbitrageRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
||||
return _IArbitrage.Contract.IArbitrageTransactor.contract.Transfer(opts)
|
||||
}
|
||||
|
||||
// Transact invokes the (paid) contract method with params as input values.
|
||||
func (_IArbitrage *IArbitrageRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
||||
return _IArbitrage.Contract.IArbitrageTransactor.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 (_IArbitrage *IArbitrageCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
||||
return _IArbitrage.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 (_IArbitrage *IArbitrageTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
||||
return _IArbitrage.Contract.contract.Transfer(opts)
|
||||
}
|
||||
|
||||
// Transact invokes the (paid) contract method with params as input values.
|
||||
func (_IArbitrage *IArbitrageTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
||||
return _IArbitrage.Contract.contract.Transact(opts, method, params...)
|
||||
}
|
||||
|
||||
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
||||
//
|
||||
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
||||
func (_IArbitrage *IArbitrageCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
||||
var out []interface{}
|
||||
err := _IArbitrage.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
||||
|
||||
if err != nil {
|
||||
return *new(bool), err
|
||||
}
|
||||
|
||||
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
||||
|
||||
return out0, err
|
||||
|
||||
}
|
||||
|
||||
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
||||
//
|
||||
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
||||
func (_IArbitrage *IArbitrageSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
||||
return _IArbitrage.Contract.SupportsInterface(&_IArbitrage.CallOpts, interfaceId)
|
||||
}
|
||||
|
||||
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
||||
//
|
||||
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
||||
func (_IArbitrage *IArbitrageCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
||||
return _IArbitrage.Contract.SupportsInterface(&_IArbitrage.CallOpts, interfaceId)
|
||||
}
|
||||
|
||||
// ExecuteArbitrage is a paid mutator transaction binding the contract method 0x9aab798a.
|
||||
//
|
||||
// Solidity: function executeArbitrage((address[],address[],uint256[],bytes[],uint256,uint256) params) returns()
|
||||
func (_IArbitrage *IArbitrageTransactor) ExecuteArbitrage(opts *bind.TransactOpts, params ArbitrageParams) (*types.Transaction, error) {
|
||||
return _IArbitrage.contract.Transact(opts, "executeArbitrage", params)
|
||||
}
|
||||
|
||||
// ExecuteArbitrage is a paid mutator transaction binding the contract method 0x9aab798a.
|
||||
//
|
||||
// Solidity: function executeArbitrage((address[],address[],uint256[],bytes[],uint256,uint256) params) returns()
|
||||
func (_IArbitrage *IArbitrageSession) ExecuteArbitrage(params ArbitrageParams) (*types.Transaction, error) {
|
||||
return _IArbitrage.Contract.ExecuteArbitrage(&_IArbitrage.TransactOpts, params)
|
||||
}
|
||||
|
||||
// ExecuteArbitrage is a paid mutator transaction binding the contract method 0x9aab798a.
|
||||
//
|
||||
// Solidity: function executeArbitrage((address[],address[],uint256[],bytes[],uint256,uint256) params) returns()
|
||||
func (_IArbitrage *IArbitrageTransactorSession) ExecuteArbitrage(params ArbitrageParams) (*types.Transaction, error) {
|
||||
return _IArbitrage.Contract.ExecuteArbitrage(&_IArbitrage.TransactOpts, params)
|
||||
}
|
||||
|
||||
// ExecuteTriangularArbitrage is a paid mutator transaction binding the contract method 0xc91d0155.
|
||||
//
|
||||
// Solidity: function executeTriangularArbitrage((address,address,address,address,address,address,uint256,uint256,bytes,bytes,bytes,uint256) params) returns()
|
||||
func (_IArbitrage *IArbitrageTransactor) ExecuteTriangularArbitrage(opts *bind.TransactOpts, params TriangularArbitrageParams) (*types.Transaction, error) {
|
||||
return _IArbitrage.contract.Transact(opts, "executeTriangularArbitrage", params)
|
||||
}
|
||||
|
||||
// ExecuteTriangularArbitrage is a paid mutator transaction binding the contract method 0xc91d0155.
|
||||
//
|
||||
// Solidity: function executeTriangularArbitrage((address,address,address,address,address,address,uint256,uint256,bytes,bytes,bytes,uint256) params) returns()
|
||||
func (_IArbitrage *IArbitrageSession) ExecuteTriangularArbitrage(params TriangularArbitrageParams) (*types.Transaction, error) {
|
||||
return _IArbitrage.Contract.ExecuteTriangularArbitrage(&_IArbitrage.TransactOpts, params)
|
||||
}
|
||||
|
||||
// ExecuteTriangularArbitrage is a paid mutator transaction binding the contract method 0xc91d0155.
|
||||
//
|
||||
// Solidity: function executeTriangularArbitrage((address,address,address,address,address,address,uint256,uint256,bytes,bytes,bytes,uint256) params) returns()
|
||||
func (_IArbitrage *IArbitrageTransactorSession) ExecuteTriangularArbitrage(params TriangularArbitrageParams) (*types.Transaction, error) {
|
||||
return _IArbitrage.Contract.ExecuteTriangularArbitrage(&_IArbitrage.TransactOpts, params)
|
||||
}
|
||||
289
orig/bindings/interfaces/flash_swapper.go
Normal file
289
orig/bindings/interfaces/flash_swapper.go
Normal file
@@ -0,0 +1,289 @@
|
||||
// Code generated - DO NOT EDIT.
|
||||
// This file is a generated binding and any manual changes will be lost.
|
||||
|
||||
package interfaces
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
// FlashSwapParams is an auto generated low-level Go binding around an user-defined struct.
|
||||
type FlashSwapParams struct {
|
||||
Token0 common.Address
|
||||
Token1 common.Address
|
||||
Amount0 *big.Int
|
||||
Amount1 *big.Int
|
||||
To common.Address
|
||||
Data []byte
|
||||
Deadline *big.Int
|
||||
}
|
||||
|
||||
// IFlashSwapperMetaData contains all meta data concerning the IFlashSwapper contract.
|
||||
var IFlashSwapperMetaData = &bind.MetaData{
|
||||
ABI: "[{\"type\":\"function\",\"name\":\"calculateFlashSwapFee\",\"inputs\":[{\"name\":\"pool\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount0\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"amount1\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"fee0\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"fee1\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"executeFlashSwap\",\"inputs\":[{\"name\":\"pool\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"params\",\"type\":\"tuple\",\"internalType\":\"structFlashSwapParams\",\"components\":[{\"name\":\"token0\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"token1\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount0\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"amount1\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"deadline\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"}]",
|
||||
}
|
||||
|
||||
// IFlashSwapperABI is the input ABI used to generate the binding from.
|
||||
// Deprecated: Use IFlashSwapperMetaData.ABI instead.
|
||||
var IFlashSwapperABI = IFlashSwapperMetaData.ABI
|
||||
|
||||
// IFlashSwapper is an auto generated Go binding around an Ethereum contract.
|
||||
type IFlashSwapper struct {
|
||||
IFlashSwapperCaller // Read-only binding to the contract
|
||||
IFlashSwapperTransactor // Write-only binding to the contract
|
||||
IFlashSwapperFilterer // Log filterer for contract events
|
||||
}
|
||||
|
||||
// IFlashSwapperCaller is an auto generated read-only Go binding around an Ethereum contract.
|
||||
type IFlashSwapperCaller struct {
|
||||
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||
}
|
||||
|
||||
// IFlashSwapperTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
||||
type IFlashSwapperTransactor struct {
|
||||
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||
}
|
||||
|
||||
// IFlashSwapperFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
||||
type IFlashSwapperFilterer struct {
|
||||
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||
}
|
||||
|
||||
// IFlashSwapperSession is an auto generated Go binding around an Ethereum contract,
|
||||
// with pre-set call and transact options.
|
||||
type IFlashSwapperSession struct {
|
||||
Contract *IFlashSwapper // 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
|
||||
}
|
||||
|
||||
// IFlashSwapperCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
||||
// with pre-set call options.
|
||||
type IFlashSwapperCallerSession struct {
|
||||
Contract *IFlashSwapperCaller // Generic contract caller binding to set the session for
|
||||
CallOpts bind.CallOpts // Call options to use throughout this session
|
||||
}
|
||||
|
||||
// IFlashSwapperTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
||||
// with pre-set transact options.
|
||||
type IFlashSwapperTransactorSession struct {
|
||||
Contract *IFlashSwapperTransactor // Generic contract transactor binding to set the session for
|
||||
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
||||
}
|
||||
|
||||
// IFlashSwapperRaw is an auto generated low-level Go binding around an Ethereum contract.
|
||||
type IFlashSwapperRaw struct {
|
||||
Contract *IFlashSwapper // Generic contract binding to access the raw methods on
|
||||
}
|
||||
|
||||
// IFlashSwapperCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
||||
type IFlashSwapperCallerRaw struct {
|
||||
Contract *IFlashSwapperCaller // Generic read-only contract binding to access the raw methods on
|
||||
}
|
||||
|
||||
// IFlashSwapperTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
||||
type IFlashSwapperTransactorRaw struct {
|
||||
Contract *IFlashSwapperTransactor // Generic write-only contract binding to access the raw methods on
|
||||
}
|
||||
|
||||
// NewIFlashSwapper creates a new instance of IFlashSwapper, bound to a specific deployed contract.
|
||||
func NewIFlashSwapper(address common.Address, backend bind.ContractBackend) (*IFlashSwapper, error) {
|
||||
contract, err := bindIFlashSwapper(address, backend, backend, backend)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &IFlashSwapper{IFlashSwapperCaller: IFlashSwapperCaller{contract: contract}, IFlashSwapperTransactor: IFlashSwapperTransactor{contract: contract}, IFlashSwapperFilterer: IFlashSwapperFilterer{contract: contract}}, nil
|
||||
}
|
||||
|
||||
// NewIFlashSwapperCaller creates a new read-only instance of IFlashSwapper, bound to a specific deployed contract.
|
||||
func NewIFlashSwapperCaller(address common.Address, caller bind.ContractCaller) (*IFlashSwapperCaller, error) {
|
||||
contract, err := bindIFlashSwapper(address, caller, nil, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &IFlashSwapperCaller{contract: contract}, nil
|
||||
}
|
||||
|
||||
// NewIFlashSwapperTransactor creates a new write-only instance of IFlashSwapper, bound to a specific deployed contract.
|
||||
func NewIFlashSwapperTransactor(address common.Address, transactor bind.ContractTransactor) (*IFlashSwapperTransactor, error) {
|
||||
contract, err := bindIFlashSwapper(address, nil, transactor, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &IFlashSwapperTransactor{contract: contract}, nil
|
||||
}
|
||||
|
||||
// NewIFlashSwapperFilterer creates a new log filterer instance of IFlashSwapper, bound to a specific deployed contract.
|
||||
func NewIFlashSwapperFilterer(address common.Address, filterer bind.ContractFilterer) (*IFlashSwapperFilterer, error) {
|
||||
contract, err := bindIFlashSwapper(address, nil, nil, filterer)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &IFlashSwapperFilterer{contract: contract}, nil
|
||||
}
|
||||
|
||||
// bindIFlashSwapper binds a generic wrapper to an already deployed contract.
|
||||
func bindIFlashSwapper(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
||||
parsed, err := IFlashSwapperMetaData.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 (_IFlashSwapper *IFlashSwapperRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
||||
return _IFlashSwapper.Contract.IFlashSwapperCaller.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 (_IFlashSwapper *IFlashSwapperRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
||||
return _IFlashSwapper.Contract.IFlashSwapperTransactor.contract.Transfer(opts)
|
||||
}
|
||||
|
||||
// Transact invokes the (paid) contract method with params as input values.
|
||||
func (_IFlashSwapper *IFlashSwapperRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
||||
return _IFlashSwapper.Contract.IFlashSwapperTransactor.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 (_IFlashSwapper *IFlashSwapperCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
||||
return _IFlashSwapper.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 (_IFlashSwapper *IFlashSwapperTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
||||
return _IFlashSwapper.Contract.contract.Transfer(opts)
|
||||
}
|
||||
|
||||
// Transact invokes the (paid) contract method with params as input values.
|
||||
func (_IFlashSwapper *IFlashSwapperTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
||||
return _IFlashSwapper.Contract.contract.Transact(opts, method, params...)
|
||||
}
|
||||
|
||||
// CalculateFlashSwapFee is a free data retrieval call binding the contract method 0x62e0cd29.
|
||||
//
|
||||
// Solidity: function calculateFlashSwapFee(address pool, uint256 amount0, uint256 amount1) view returns(uint256 fee0, uint256 fee1)
|
||||
func (_IFlashSwapper *IFlashSwapperCaller) CalculateFlashSwapFee(opts *bind.CallOpts, pool common.Address, amount0 *big.Int, amount1 *big.Int) (struct {
|
||||
Fee0 *big.Int
|
||||
Fee1 *big.Int
|
||||
}, error) {
|
||||
var out []interface{}
|
||||
err := _IFlashSwapper.contract.Call(opts, &out, "calculateFlashSwapFee", pool, amount0, amount1)
|
||||
|
||||
outstruct := new(struct {
|
||||
Fee0 *big.Int
|
||||
Fee1 *big.Int
|
||||
})
|
||||
if err != nil {
|
||||
return *outstruct, err
|
||||
}
|
||||
|
||||
outstruct.Fee0 = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
||||
outstruct.Fee1 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
|
||||
|
||||
return *outstruct, err
|
||||
|
||||
}
|
||||
|
||||
// CalculateFlashSwapFee is a free data retrieval call binding the contract method 0x62e0cd29.
|
||||
//
|
||||
// Solidity: function calculateFlashSwapFee(address pool, uint256 amount0, uint256 amount1) view returns(uint256 fee0, uint256 fee1)
|
||||
func (_IFlashSwapper *IFlashSwapperSession) CalculateFlashSwapFee(pool common.Address, amount0 *big.Int, amount1 *big.Int) (struct {
|
||||
Fee0 *big.Int
|
||||
Fee1 *big.Int
|
||||
}, error) {
|
||||
return _IFlashSwapper.Contract.CalculateFlashSwapFee(&_IFlashSwapper.CallOpts, pool, amount0, amount1)
|
||||
}
|
||||
|
||||
// CalculateFlashSwapFee is a free data retrieval call binding the contract method 0x62e0cd29.
|
||||
//
|
||||
// Solidity: function calculateFlashSwapFee(address pool, uint256 amount0, uint256 amount1) view returns(uint256 fee0, uint256 fee1)
|
||||
func (_IFlashSwapper *IFlashSwapperCallerSession) CalculateFlashSwapFee(pool common.Address, amount0 *big.Int, amount1 *big.Int) (struct {
|
||||
Fee0 *big.Int
|
||||
Fee1 *big.Int
|
||||
}, error) {
|
||||
return _IFlashSwapper.Contract.CalculateFlashSwapFee(&_IFlashSwapper.CallOpts, pool, amount0, amount1)
|
||||
}
|
||||
|
||||
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
||||
//
|
||||
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
||||
func (_IFlashSwapper *IFlashSwapperCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) {
|
||||
var out []interface{}
|
||||
err := _IFlashSwapper.contract.Call(opts, &out, "supportsInterface", interfaceId)
|
||||
|
||||
if err != nil {
|
||||
return *new(bool), err
|
||||
}
|
||||
|
||||
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
||||
|
||||
return out0, err
|
||||
|
||||
}
|
||||
|
||||
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
||||
//
|
||||
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
||||
func (_IFlashSwapper *IFlashSwapperSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
||||
return _IFlashSwapper.Contract.SupportsInterface(&_IFlashSwapper.CallOpts, interfaceId)
|
||||
}
|
||||
|
||||
// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.
|
||||
//
|
||||
// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)
|
||||
func (_IFlashSwapper *IFlashSwapperCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) {
|
||||
return _IFlashSwapper.Contract.SupportsInterface(&_IFlashSwapper.CallOpts, interfaceId)
|
||||
}
|
||||
|
||||
// ExecuteFlashSwap is a paid mutator transaction binding the contract method 0xbbaccd73.
|
||||
//
|
||||
// Solidity: function executeFlashSwap(address pool, (address,address,uint256,uint256,address,bytes,uint256) params) returns()
|
||||
func (_IFlashSwapper *IFlashSwapperTransactor) ExecuteFlashSwap(opts *bind.TransactOpts, pool common.Address, params FlashSwapParams) (*types.Transaction, error) {
|
||||
return _IFlashSwapper.contract.Transact(opts, "executeFlashSwap", pool, params)
|
||||
}
|
||||
|
||||
// ExecuteFlashSwap is a paid mutator transaction binding the contract method 0xbbaccd73.
|
||||
//
|
||||
// Solidity: function executeFlashSwap(address pool, (address,address,uint256,uint256,address,bytes,uint256) params) returns()
|
||||
func (_IFlashSwapper *IFlashSwapperSession) ExecuteFlashSwap(pool common.Address, params FlashSwapParams) (*types.Transaction, error) {
|
||||
return _IFlashSwapper.Contract.ExecuteFlashSwap(&_IFlashSwapper.TransactOpts, pool, params)
|
||||
}
|
||||
|
||||
// ExecuteFlashSwap is a paid mutator transaction binding the contract method 0xbbaccd73.
|
||||
//
|
||||
// Solidity: function executeFlashSwap(address pool, (address,address,uint256,uint256,address,bytes,uint256) params) returns()
|
||||
func (_IFlashSwapper *IFlashSwapperTransactorSession) ExecuteFlashSwap(pool common.Address, params FlashSwapParams) (*types.Transaction, error) {
|
||||
return _IFlashSwapper.Contract.ExecuteFlashSwap(&_IFlashSwapper.TransactOpts, pool, params)
|
||||
}
|
||||
Reference in New Issue
Block a user