swap

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 8 Imported by: 0

README

接口含义

GetTokens

查与某个币关联的交易对

    TestSwapExchangeCaller_GetTokens: exchange_test.go:31: Base Token USDT
    TestSwapExchangeCaller_GetTokens: exchange_test.go:33:      token[0] SERO
    TestSwapExchangeCaller_GetTokens: exchange_test.go:33:      token[1] CORAL
    TestSwapExchangeCaller_GetTokens: exchange_test.go:33:      token[2] VIRTUE
    TestSwapExchangeCaller_GetTokens: exchange_test.go:33:      token[3] SEED
    TestSwapExchangeCaller_GetTokens: exchange_test.go:33:      token[4] ASNOW
    TestSwapExchangeCaller_GetTokens: exchange_test.go:33:      token[5] SUSD

GetGroupTokens

一次查多个币的关联币种

Documentation

Index

Constants

View Source
const SwapExchangeABI = "" /* 12112-byte string literal not displayed */

SwapExchangeABI is the input ABI used to generate the binding from.

Variables

This section is empty.

Functions

This section is empty.

Types

type Liquidity

type Liquidity struct {
	Value     *big.Int
	NextValue *big.Int
	NextIndex *big.Int
	PrevIndex *big.Int
	Flag      bool
}

Liquidity is an auto generated low-level Go binding around an user-defined struct.

type Pair

type Pair struct {
	TokenA       [32]byte
	TokenB       [32]byte
	ReserveA     *big.Int
	ReserveB     *big.Int
	TotalShares  *big.Int
	MyShare      *big.Int
	ShareRreward *big.Int
	Mining       bool
}

Pair is an auto generated low-level Go binding around an user-defined struct.

type SwapExchange

type SwapExchange struct {
	SwapExchangeCaller     // Read-only binding to the contract
	SwapExchangeTransactor // Write-only binding to the contract
	SwapExchangeFilterer   // Log filterer for contract events
}

SwapExchange is an auto generated Go binding around an Ethereum contract.

func NewSwapExchange

func NewSwapExchange(address common.Address, backend bind.ContractBackend) (*SwapExchange, error)

NewSwapExchange creates a new instance of SwapExchange, bound to a specific deployed contract.

type SwapExchangeCaller

type SwapExchangeCaller struct {
	// contains filtered or unexported fields
}

SwapExchangeCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewSwapExchangeCaller

func NewSwapExchangeCaller(address common.Address, caller bind.ContractCaller) (*SwapExchangeCaller, error)

NewSwapExchangeCaller creates a new read-only instance of SwapExchange, bound to a specific deployed contract.

func (*SwapExchangeCaller) EstimateSwap

func (_SwapExchange *SwapExchangeCaller) EstimateSwap(opts *bind.CallOpts, key [32]byte, tokenIn [32]byte, amountIn *big.Int) (*big.Int, error)

EstimateSwap is a free data retrieval call binding the contract method 0x737f4194.

Solidity: function estimateSwap(bytes32 key, bytes32 tokenIn, uint256 amountIn) view returns(uint256 value)

func (*SwapExchangeCaller) EstimateSwapBuy

func (_SwapExchange *SwapExchangeCaller) EstimateSwapBuy(opts *bind.CallOpts, key [32]byte, tokenOut [32]byte, amountOut *big.Int) (*big.Int, error)

EstimateSwapBuy is a free data retrieval call binding the contract method 0xf5e1f98c.

Solidity: function estimateSwapBuy(bytes32 key, bytes32 tokenOut, uint256 amountOut) view returns(uint256 amountIn)

func (*SwapExchangeCaller) FeeRateMap

func (_SwapExchange *SwapExchangeCaller) FeeRateMap(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error)

FeeRateMap is a free data retrieval call binding the contract method 0xdfab082d.

Solidity: function feeRateMap(bytes32 ) view returns(uint256)

func (*SwapExchangeCaller) GetGroupTokens

func (_SwapExchange *SwapExchangeCaller) GetGroupTokens(opts *bind.CallOpts, tokens [][32]byte) ([][][32]byte, error)

GetGroupTokens is a free data retrieval call binding the contract method 0x20a3aa7e.

Solidity: function getGroupTokens(bytes32[] tokens) view returns(bytes32[][] rets)

func (*SwapExchangeCaller) GetTokens

func (_SwapExchange *SwapExchangeCaller) GetTokens(opts *bind.CallOpts, token [32]byte) ([][32]byte, error)

GetTokens is a free data retrieval call binding the contract method 0xecbbc033.

Solidity: function getTokens(bytes32 token) view returns(bytes32[] rets)

func (*SwapExchangeCaller) HasPair

func (_SwapExchange *SwapExchangeCaller) HasPair(opts *bind.CallOpts, _key [32]byte) (bool, error)

HasPair is a free data retrieval call binding the contract method 0x610a5f3a.

Solidity: function hasPair(bytes32 _key) view returns(bool)

func (*SwapExchangeCaller) HashKey

func (_SwapExchange *SwapExchangeCaller) HashKey(opts *bind.CallOpts, tokenA [32]byte, tokenB [32]byte) ([32]byte, error)

HashKey is a free data retrieval call binding the contract method 0x72091e9b.

Solidity: function hashKey(bytes32 tokenA, bytes32 tokenB) pure returns(bytes32)

func (*SwapExchangeCaller) InvestAmount

func (_SwapExchange *SwapExchangeCaller) InvestAmount(opts *bind.CallOpts) (struct {
	Token [32]byte
	Value *big.Int
}, error)

InvestAmount is a free data retrieval call binding the contract method 0x0311904c.

Solidity: function investAmount() view returns(bytes32 token, uint256 value)

func (*SwapExchangeCaller) LastIndexsMap

func (_SwapExchange *SwapExchangeCaller) LastIndexsMap(opts *bind.CallOpts, arg0 common.ContractAddress, arg1 [32]byte) (*big.Int, error)

LastIndexsMap is a free data retrieval call binding the contract method 0x7294460a.

Solidity: function lastIndexsMap(address , bytes32 ) view returns(uint256)

func (*SwapExchangeCaller) LiquidityOfPair

func (_SwapExchange *SwapExchangeCaller) LiquidityOfPair(opts *bind.CallOpts, tokenA string, tokenB string) ([]Liquidity, []Liquidity, error)

LiquidityOfPair is a free data retrieval call binding the contract method 0xecdce0de.

Solidity: function liquidityOfPair(string tokenA, string tokenB) view returns((uint256,uint256,uint256,uint256,bool)[], (uint256,uint256,uint256,uint256,bool)[])

func (*SwapExchangeCaller) MintDayIndex

func (_SwapExchange *SwapExchangeCaller) MintDayIndex(opts *bind.CallOpts) (*big.Int, error)

MintDayIndex is a free data retrieval call binding the contract method 0x18e35fcf.

Solidity: function mintDayIndex() view returns(uint256)

func (*SwapExchangeCaller) Output

func (_SwapExchange *SwapExchangeCaller) Output(opts *bind.CallOpts, index *big.Int) (*big.Int, error)

Output is a free data retrieval call binding the contract method 0x64f9016b.

Solidity: function output(uint256 index) view returns(uint256)

func (*SwapExchangeCaller) Owner

func (_SwapExchange *SwapExchangeCaller) Owner(opts *bind.CallOpts) (common.ContractAddress, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*SwapExchangeCaller) PairInfo

func (_SwapExchange *SwapExchangeCaller) PairInfo(opts *bind.CallOpts, key [32]byte) (Pair, error)

PairInfo is a free data retrieval call binding the contract method 0xabc48614.

Solidity: function pairInfo(bytes32 key) view returns((bytes32,bytes32,uint256,uint256,uint256,uint256,uint256,bool))

func (*SwapExchangeCaller) PairKeys

func (_SwapExchange *SwapExchangeCaller) PairKeys(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error)

PairKeys is a free data retrieval call binding the contract method 0xad8c5668.

Solidity: function pairKeys(uint256 ) view returns(bytes32)

func (*SwapExchangeCaller) PairList

func (_SwapExchange *SwapExchangeCaller) PairList(opts *bind.CallOpts, _start *big.Int, _end *big.Int) ([]Pair, error)

PairList is a free data retrieval call binding the contract method 0x435a508a.

Solidity: function pairList(uint256 _start, uint256 _end) view returns((bytes32,bytes32,uint256,uint256,uint256,uint256,uint256,bool)[] rets)

func (*SwapExchangeCaller) PairListByToken

func (_SwapExchange *SwapExchangeCaller) PairListByToken(opts *bind.CallOpts, token [32]byte, _start *big.Int, _end *big.Int) ([]Pair, error)

PairListByToken is a free data retrieval call binding the contract method 0x8336762f.

Solidity: function pairListByToken(bytes32 token, uint256 _start, uint256 _end) view returns((bytes32,bytes32,uint256,uint256,uint256,uint256,uint256,bool)[] rets)

func (*SwapExchangeCaller) RateMap

func (_SwapExchange *SwapExchangeCaller) RateMap(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error)

RateMap is a free data retrieval call binding the contract method 0x90b23000.

Solidity: function rateMap(bytes32 ) view returns(uint256)

func (*SwapExchangeCaller) ShareReward

func (_SwapExchange *SwapExchangeCaller) ShareReward(opts *bind.CallOpts, key [32]byte) (*big.Int, error)

ShareReward is a free data retrieval call binding the contract method 0xfbb453ca.

Solidity: function shareReward(bytes32 key) view returns(uint256 reward)

func (*SwapExchangeCaller) StartDay

func (_SwapExchange *SwapExchangeCaller) StartDay(opts *bind.CallOpts) (*big.Int, error)

StartDay is a free data retrieval call binding the contract method 0x0539272a.

Solidity: function startDay() view returns(uint256)

func (*SwapExchangeCaller) VolumeDayOfPair

func (_SwapExchange *SwapExchangeCaller) VolumeDayOfPair(opts *bind.CallOpts, tokenA string, tokenB string, time *big.Int) (*big.Int, *big.Int, error)

VolumeDayOfPair is a free data retrieval call binding the contract method 0xe94f8f2a.

Solidity: function volumeDayOfPair(string tokenA, string tokenB, uint256 time) view returns(uint256, uint256)

func (*SwapExchangeCaller) VolumesOfPair

func (_SwapExchange *SwapExchangeCaller) VolumesOfPair(opts *bind.CallOpts, tokenA string, tokenB string) ([]Volume, []Volume, error)

VolumesOfPair is a free data retrieval call binding the contract method 0x87399950.

Solidity: function volumesOfPair(string tokenA, string tokenB) view returns((uint256,uint256)[], (uint256,uint256)[])

type SwapExchangeCallerRaw

type SwapExchangeCallerRaw struct {
	Contract *SwapExchangeCaller // Generic read-only contract binding to access the raw methods on
}

SwapExchangeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*SwapExchangeCallerRaw) Call

func (_SwapExchange *SwapExchangeCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

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.

type SwapExchangeCallerSession

type SwapExchangeCallerSession struct {
	Contract *SwapExchangeCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts       // Call options to use throughout this session
}

SwapExchangeCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*SwapExchangeCallerSession) EstimateSwap

func (_SwapExchange *SwapExchangeCallerSession) EstimateSwap(key [32]byte, tokenIn [32]byte, amountIn *big.Int) (*big.Int, error)

EstimateSwap is a free data retrieval call binding the contract method 0x737f4194.

Solidity: function estimateSwap(bytes32 key, bytes32 tokenIn, uint256 amountIn) view returns(uint256 value)

func (*SwapExchangeCallerSession) EstimateSwapBuy

func (_SwapExchange *SwapExchangeCallerSession) EstimateSwapBuy(key [32]byte, tokenOut [32]byte, amountOut *big.Int) (*big.Int, error)

EstimateSwapBuy is a free data retrieval call binding the contract method 0xf5e1f98c.

Solidity: function estimateSwapBuy(bytes32 key, bytes32 tokenOut, uint256 amountOut) view returns(uint256 amountIn)

func (*SwapExchangeCallerSession) FeeRateMap

func (_SwapExchange *SwapExchangeCallerSession) FeeRateMap(arg0 [32]byte) (*big.Int, error)

FeeRateMap is a free data retrieval call binding the contract method 0xdfab082d.

Solidity: function feeRateMap(bytes32 ) view returns(uint256)

func (*SwapExchangeCallerSession) GetGroupTokens

func (_SwapExchange *SwapExchangeCallerSession) GetGroupTokens(tokens [][32]byte) ([][][32]byte, error)

GetGroupTokens is a free data retrieval call binding the contract method 0x20a3aa7e.

Solidity: function getGroupTokens(bytes32[] tokens) view returns(bytes32[][] rets)

func (*SwapExchangeCallerSession) GetTokens

func (_SwapExchange *SwapExchangeCallerSession) GetTokens(token [32]byte) ([][32]byte, error)

GetTokens is a free data retrieval call binding the contract method 0xecbbc033.

Solidity: function getTokens(bytes32 token) view returns(bytes32[] rets)

func (*SwapExchangeCallerSession) HasPair

func (_SwapExchange *SwapExchangeCallerSession) HasPair(_key [32]byte) (bool, error)

HasPair is a free data retrieval call binding the contract method 0x610a5f3a.

Solidity: function hasPair(bytes32 _key) view returns(bool)

func (*SwapExchangeCallerSession) HashKey

func (_SwapExchange *SwapExchangeCallerSession) HashKey(tokenA [32]byte, tokenB [32]byte) ([32]byte, error)

HashKey is a free data retrieval call binding the contract method 0x72091e9b.

Solidity: function hashKey(bytes32 tokenA, bytes32 tokenB) pure returns(bytes32)

func (*SwapExchangeCallerSession) InvestAmount

func (_SwapExchange *SwapExchangeCallerSession) InvestAmount() (struct {
	Token [32]byte
	Value *big.Int
}, error)

InvestAmount is a free data retrieval call binding the contract method 0x0311904c.

Solidity: function investAmount() view returns(bytes32 token, uint256 value)

func (*SwapExchangeCallerSession) LastIndexsMap

func (_SwapExchange *SwapExchangeCallerSession) LastIndexsMap(arg0 common.ContractAddress, arg1 [32]byte) (*big.Int, error)

LastIndexsMap is a free data retrieval call binding the contract method 0x7294460a.

Solidity: function lastIndexsMap(address , bytes32 ) view returns(uint256)

func (*SwapExchangeCallerSession) LiquidityOfPair

func (_SwapExchange *SwapExchangeCallerSession) LiquidityOfPair(tokenA string, tokenB string) ([]Liquidity, []Liquidity, error)

LiquidityOfPair is a free data retrieval call binding the contract method 0xecdce0de.

Solidity: function liquidityOfPair(string tokenA, string tokenB) view returns((uint256,uint256,uint256,uint256,bool)[], (uint256,uint256,uint256,uint256,bool)[])

func (*SwapExchangeCallerSession) MintDayIndex

func (_SwapExchange *SwapExchangeCallerSession) MintDayIndex() (*big.Int, error)

MintDayIndex is a free data retrieval call binding the contract method 0x18e35fcf.

Solidity: function mintDayIndex() view returns(uint256)

func (*SwapExchangeCallerSession) Output

func (_SwapExchange *SwapExchangeCallerSession) Output(index *big.Int) (*big.Int, error)

Output is a free data retrieval call binding the contract method 0x64f9016b.

Solidity: function output(uint256 index) view returns(uint256)

func (*SwapExchangeCallerSession) Owner

func (_SwapExchange *SwapExchangeCallerSession) Owner() (common.ContractAddress, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*SwapExchangeCallerSession) PairInfo

func (_SwapExchange *SwapExchangeCallerSession) PairInfo(key [32]byte) (Pair, error)

PairInfo is a free data retrieval call binding the contract method 0xabc48614.

Solidity: function pairInfo(bytes32 key) view returns((bytes32,bytes32,uint256,uint256,uint256,uint256,uint256,bool))

func (*SwapExchangeCallerSession) PairKeys

func (_SwapExchange *SwapExchangeCallerSession) PairKeys(arg0 *big.Int) ([32]byte, error)

PairKeys is a free data retrieval call binding the contract method 0xad8c5668.

Solidity: function pairKeys(uint256 ) view returns(bytes32)

func (*SwapExchangeCallerSession) PairList

func (_SwapExchange *SwapExchangeCallerSession) PairList(_start *big.Int, _end *big.Int) ([]Pair, error)

PairList is a free data retrieval call binding the contract method 0x435a508a.

Solidity: function pairList(uint256 _start, uint256 _end) view returns((bytes32,bytes32,uint256,uint256,uint256,uint256,uint256,bool)[] rets)

func (*SwapExchangeCallerSession) PairListByToken

func (_SwapExchange *SwapExchangeCallerSession) PairListByToken(token [32]byte, _start *big.Int, _end *big.Int) ([]Pair, error)

PairListByToken is a free data retrieval call binding the contract method 0x8336762f.

Solidity: function pairListByToken(bytes32 token, uint256 _start, uint256 _end) view returns((bytes32,bytes32,uint256,uint256,uint256,uint256,uint256,bool)[] rets)

func (*SwapExchangeCallerSession) RateMap

func (_SwapExchange *SwapExchangeCallerSession) RateMap(arg0 [32]byte) (*big.Int, error)

RateMap is a free data retrieval call binding the contract method 0x90b23000.

Solidity: function rateMap(bytes32 ) view returns(uint256)

func (*SwapExchangeCallerSession) ShareReward

func (_SwapExchange *SwapExchangeCallerSession) ShareReward(key [32]byte) (*big.Int, error)

ShareReward is a free data retrieval call binding the contract method 0xfbb453ca.

Solidity: function shareReward(bytes32 key) view returns(uint256 reward)

func (*SwapExchangeCallerSession) StartDay

func (_SwapExchange *SwapExchangeCallerSession) StartDay() (*big.Int, error)

StartDay is a free data retrieval call binding the contract method 0x0539272a.

Solidity: function startDay() view returns(uint256)

func (*SwapExchangeCallerSession) VolumeDayOfPair

func (_SwapExchange *SwapExchangeCallerSession) VolumeDayOfPair(tokenA string, tokenB string, time *big.Int) (*big.Int, *big.Int, error)

VolumeDayOfPair is a free data retrieval call binding the contract method 0xe94f8f2a.

Solidity: function volumeDayOfPair(string tokenA, string tokenB, uint256 time) view returns(uint256, uint256)

func (*SwapExchangeCallerSession) VolumesOfPair

func (_SwapExchange *SwapExchangeCallerSession) VolumesOfPair(tokenA string, tokenB string) ([]Volume, []Volume, error)

VolumesOfPair is a free data retrieval call binding the contract method 0x87399950.

Solidity: function volumesOfPair(string tokenA, string tokenB) view returns((uint256,uint256)[], (uint256,uint256)[])

type SwapExchangeFilterer

type SwapExchangeFilterer struct {
	// contains filtered or unexported fields
}

SwapExchangeFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewSwapExchangeFilterer

func NewSwapExchangeFilterer(address common.Address, filterer bind.ContractFilterer) (*SwapExchangeFilterer, error)

NewSwapExchangeFilterer creates a new log filterer instance of SwapExchange, bound to a specific deployed contract.

func (*SwapExchangeFilterer) FilterOwnershipTransferred

func (_SwapExchange *SwapExchangeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.ContractAddress, newOwner []common.ContractAddress) (*SwapExchangeOwnershipTransferredIterator, error)

FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.

Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

func (*SwapExchangeFilterer) ParseOwnershipTransferred

func (_SwapExchange *SwapExchangeFilterer) ParseOwnershipTransferred(log types.Log) (*SwapExchangeOwnershipTransferred, error)

ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.

Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

func (*SwapExchangeFilterer) WatchOwnershipTransferred

func (_SwapExchange *SwapExchangeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *SwapExchangeOwnershipTransferred, previousOwner []common.ContractAddress, newOwner []common.ContractAddress) (event.Subscription, error)

WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.

Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

type SwapExchangeOwnershipTransferred

type SwapExchangeOwnershipTransferred struct {
	PreviousOwner common.ContractAddress
	NewOwner      common.ContractAddress
	Raw           types.Log // Blockchain specific contextual infos
}

SwapExchangeOwnershipTransferred represents a OwnershipTransferred event raised by the SwapExchange contract.

type SwapExchangeOwnershipTransferredIterator

type SwapExchangeOwnershipTransferredIterator struct {
	Event *SwapExchangeOwnershipTransferred // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SwapExchangeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the SwapExchange contract.

func (*SwapExchangeOwnershipTransferredIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*SwapExchangeOwnershipTransferredIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*SwapExchangeOwnershipTransferredIterator) Next

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.

type SwapExchangeRaw

type SwapExchangeRaw struct {
	Contract *SwapExchange // Generic contract binding to access the raw methods on
}

SwapExchangeRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*SwapExchangeRaw) Call

func (_SwapExchange *SwapExchangeRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

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 (*SwapExchangeRaw) Transact

func (_SwapExchange *SwapExchangeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*SwapExchangeRaw) Transfer

func (_SwapExchange *SwapExchangeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type SwapExchangeSession

type SwapExchangeSession struct {
	Contract     *SwapExchange     // 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
}

SwapExchangeSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*SwapExchangeSession) CancelInvest

func (_SwapExchange *SwapExchangeSession) CancelInvest() (*types.Transaction, error)

CancelInvest is a paid mutator transaction binding the contract method 0xb4f81dcc.

Solidity: function cancelInvest() returns(bool)

func (*SwapExchangeSession) DivestLiquidity

func (_SwapExchange *SwapExchangeSession) DivestLiquidity(key [32]byte, _sharesBurned *big.Int, _minTokenA *big.Int, _minTokenB *big.Int) (*types.Transaction, error)

DivestLiquidity is a paid mutator transaction binding the contract method 0x756925ff.

Solidity: function divestLiquidity(bytes32 key, uint256 _sharesBurned, uint256 _minTokenA, uint256 _minTokenB) returns()

func (*SwapExchangeSession) EstimateSwap

func (_SwapExchange *SwapExchangeSession) EstimateSwap(key [32]byte, tokenIn [32]byte, amountIn *big.Int) (*big.Int, error)

EstimateSwap is a free data retrieval call binding the contract method 0x737f4194.

Solidity: function estimateSwap(bytes32 key, bytes32 tokenIn, uint256 amountIn) view returns(uint256 value)

func (*SwapExchangeSession) EstimateSwapBuy

func (_SwapExchange *SwapExchangeSession) EstimateSwapBuy(key [32]byte, tokenOut [32]byte, amountOut *big.Int) (*big.Int, error)

EstimateSwapBuy is a free data retrieval call binding the contract method 0xf5e1f98c.

Solidity: function estimateSwapBuy(bytes32 key, bytes32 tokenOut, uint256 amountOut) view returns(uint256 amountIn)

func (*SwapExchangeSession) FeeRateMap

func (_SwapExchange *SwapExchangeSession) FeeRateMap(arg0 [32]byte) (*big.Int, error)

FeeRateMap is a free data retrieval call binding the contract method 0xdfab082d.

Solidity: function feeRateMap(bytes32 ) view returns(uint256)

func (*SwapExchangeSession) GetGroupTokens

func (_SwapExchange *SwapExchangeSession) GetGroupTokens(tokens [][32]byte) ([][][32]byte, error)

GetGroupTokens is a free data retrieval call binding the contract method 0x20a3aa7e.

Solidity: function getGroupTokens(bytes32[] tokens) view returns(bytes32[][] rets)

func (*SwapExchangeSession) GetTokens

func (_SwapExchange *SwapExchangeSession) GetTokens(token [32]byte) ([][32]byte, error)

GetTokens is a free data retrieval call binding the contract method 0xecbbc033.

Solidity: function getTokens(bytes32 token) view returns(bytes32[] rets)

func (*SwapExchangeSession) HasPair

func (_SwapExchange *SwapExchangeSession) HasPair(_key [32]byte) (bool, error)

HasPair is a free data retrieval call binding the contract method 0x610a5f3a.

Solidity: function hasPair(bytes32 _key) view returns(bool)

func (*SwapExchangeSession) HashKey

func (_SwapExchange *SwapExchangeSession) HashKey(tokenA [32]byte, tokenB [32]byte) ([32]byte, error)

HashKey is a free data retrieval call binding the contract method 0x72091e9b.

Solidity: function hashKey(bytes32 tokenA, bytes32 tokenB) pure returns(bytes32)

func (*SwapExchangeSession) InvestAmount

func (_SwapExchange *SwapExchangeSession) InvestAmount() (struct {
	Token [32]byte
	Value *big.Int
}, error)

InvestAmount is a free data retrieval call binding the contract method 0x0311904c.

Solidity: function investAmount() view returns(bytes32 token, uint256 value)

func (*SwapExchangeSession) InvestLiquidity

func (_SwapExchange *SwapExchangeSession) InvestLiquidity(_minShares *big.Int) (*types.Transaction, error)

InvestLiquidity is a paid mutator transaction binding the contract method 0x12675e01.

Solidity: function investLiquidity(uint256 _minShares) payable returns()

func (*SwapExchangeSession) LastIndexsMap

func (_SwapExchange *SwapExchangeSession) LastIndexsMap(arg0 common.ContractAddress, arg1 [32]byte) (*big.Int, error)

LastIndexsMap is a free data retrieval call binding the contract method 0x7294460a.

Solidity: function lastIndexsMap(address , bytes32 ) view returns(uint256)

func (*SwapExchangeSession) LiquidityOfPair

func (_SwapExchange *SwapExchangeSession) LiquidityOfPair(tokenA string, tokenB string) ([]Liquidity, []Liquidity, error)

LiquidityOfPair is a free data retrieval call binding the contract method 0xecdce0de.

Solidity: function liquidityOfPair(string tokenA, string tokenB) view returns((uint256,uint256,uint256,uint256,bool)[], (uint256,uint256,uint256,uint256,bool)[])

func (*SwapExchangeSession) MintDayIndex

func (_SwapExchange *SwapExchangeSession) MintDayIndex() (*big.Int, error)

MintDayIndex is a free data retrieval call binding the contract method 0x18e35fcf.

Solidity: function mintDayIndex() view returns(uint256)

func (*SwapExchangeSession) Output

func (_SwapExchange *SwapExchangeSession) Output(index *big.Int) (*big.Int, error)

Output is a free data retrieval call binding the contract method 0x64f9016b.

Solidity: function output(uint256 index) view returns(uint256)

func (*SwapExchangeSession) Owner

func (_SwapExchange *SwapExchangeSession) Owner() (common.ContractAddress, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*SwapExchangeSession) PairInfo

func (_SwapExchange *SwapExchangeSession) PairInfo(key [32]byte) (Pair, error)

PairInfo is a free data retrieval call binding the contract method 0xabc48614.

Solidity: function pairInfo(bytes32 key) view returns((bytes32,bytes32,uint256,uint256,uint256,uint256,uint256,bool))

func (*SwapExchangeSession) PairKeys

func (_SwapExchange *SwapExchangeSession) PairKeys(arg0 *big.Int) ([32]byte, error)

PairKeys is a free data retrieval call binding the contract method 0xad8c5668.

Solidity: function pairKeys(uint256 ) view returns(bytes32)

func (*SwapExchangeSession) PairList

func (_SwapExchange *SwapExchangeSession) PairList(_start *big.Int, _end *big.Int) ([]Pair, error)

PairList is a free data retrieval call binding the contract method 0x435a508a.

Solidity: function pairList(uint256 _start, uint256 _end) view returns((bytes32,bytes32,uint256,uint256,uint256,uint256,uint256,bool)[] rets)

func (*SwapExchangeSession) PairListByToken

func (_SwapExchange *SwapExchangeSession) PairListByToken(token [32]byte, _start *big.Int, _end *big.Int) ([]Pair, error)

PairListByToken is a free data retrieval call binding the contract method 0x8336762f.

Solidity: function pairListByToken(bytes32 token, uint256 _start, uint256 _end) view returns((bytes32,bytes32,uint256,uint256,uint256,uint256,uint256,bool)[] rets)

func (*SwapExchangeSession) RateMap

func (_SwapExchange *SwapExchangeSession) RateMap(arg0 [32]byte) (*big.Int, error)

RateMap is a free data retrieval call binding the contract method 0x90b23000.

Solidity: function rateMap(bytes32 ) view returns(uint256)

func (*SwapExchangeSession) Receive

func (_SwapExchange *SwapExchangeSession) Receive() (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*SwapExchangeSession) SetFeeRate

func (_SwapExchange *SwapExchangeSession) SetFeeRate(tokenA string, tokenB string, _feeRate *big.Int) (*types.Transaction, error)

SetFeeRate is a paid mutator transaction binding the contract method 0x9029feed.

Solidity: function setFeeRate(string tokenA, string tokenB, uint256 _feeRate) returns()

func (*SwapExchangeSession) SetTokenBase

func (_SwapExchange *SwapExchangeSession) SetTokenBase(tokenA string, tokenB string, _baseToken string, _rate *big.Int) (*types.Transaction, error)

SetTokenBase is a paid mutator transaction binding the contract method 0x3ad7bacc.

Solidity: function setTokenBase(string tokenA, string tokenB, string _baseToken, uint256 _rate) returns()

func (*SwapExchangeSession) ShareReward

func (_SwapExchange *SwapExchangeSession) ShareReward(key [32]byte) (*big.Int, error)

ShareReward is a free data retrieval call binding the contract method 0xfbb453ca.

Solidity: function shareReward(bytes32 key) view returns(uint256 reward)

func (*SwapExchangeSession) Start

func (_SwapExchange *SwapExchangeSession) Start() (*types.Transaction, error)

Start is a paid mutator transaction binding the contract method 0xbe9a6555.

Solidity: function start() returns()

func (*SwapExchangeSession) StartDay

func (_SwapExchange *SwapExchangeSession) StartDay() (*big.Int, error)

StartDay is a free data retrieval call binding the contract method 0x0539272a.

Solidity: function startDay() view returns(uint256)

func (*SwapExchangeSession) Swap

func (_SwapExchange *SwapExchangeSession) Swap(key [32]byte, _minTokensReceived *big.Int, _timeout *big.Int, _recipient common.ContractAddress) (*types.Transaction, error)

Swap is a paid mutator transaction binding the contract method 0x82daa6f6.

Solidity: function swap(bytes32 key, uint256 _minTokensReceived, uint256 _timeout, address _recipient) payable returns(uint256)

func (*SwapExchangeSession) TransferOwnership

func (_SwapExchange *SwapExchangeSession) TransferOwnership(newOwner common.ContractAddress) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

func (*SwapExchangeSession) VolumeDayOfPair

func (_SwapExchange *SwapExchangeSession) VolumeDayOfPair(tokenA string, tokenB string, time *big.Int) (*big.Int, *big.Int, error)

VolumeDayOfPair is a free data retrieval call binding the contract method 0xe94f8f2a.

Solidity: function volumeDayOfPair(string tokenA, string tokenB, uint256 time) view returns(uint256, uint256)

func (*SwapExchangeSession) VolumesOfPair

func (_SwapExchange *SwapExchangeSession) VolumesOfPair(tokenA string, tokenB string) ([]Volume, []Volume, error)

VolumesOfPair is a free data retrieval call binding the contract method 0x87399950.

Solidity: function volumesOfPair(string tokenA, string tokenB) view returns((uint256,uint256)[], (uint256,uint256)[])

func (*SwapExchangeSession) WithdrawShareReward

func (_SwapExchange *SwapExchangeSession) WithdrawShareReward(key [32]byte) (*types.Transaction, error)

WithdrawShareReward is a paid mutator transaction binding the contract method 0xc127a9b0.

Solidity: function withdrawShareReward(bytes32 key) returns()

type SwapExchangeTransactor

type SwapExchangeTransactor struct {
	// contains filtered or unexported fields
}

SwapExchangeTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewSwapExchangeTransactor

func NewSwapExchangeTransactor(address common.Address, transactor bind.ContractTransactor) (*SwapExchangeTransactor, error)

NewSwapExchangeTransactor creates a new write-only instance of SwapExchange, bound to a specific deployed contract.

func (*SwapExchangeTransactor) CancelInvest

func (_SwapExchange *SwapExchangeTransactor) CancelInvest(opts *bind.TransactOpts) (*types.Transaction, error)

CancelInvest is a paid mutator transaction binding the contract method 0xb4f81dcc.

Solidity: function cancelInvest() returns(bool)

func (*SwapExchangeTransactor) DivestLiquidity

func (_SwapExchange *SwapExchangeTransactor) DivestLiquidity(opts *bind.TransactOpts, key [32]byte, _sharesBurned *big.Int, _minTokenA *big.Int, _minTokenB *big.Int) (*types.Transaction, error)

DivestLiquidity is a paid mutator transaction binding the contract method 0x756925ff.

Solidity: function divestLiquidity(bytes32 key, uint256 _sharesBurned, uint256 _minTokenA, uint256 _minTokenB) returns()

func (*SwapExchangeTransactor) InvestLiquidity

func (_SwapExchange *SwapExchangeTransactor) InvestLiquidity(opts *bind.TransactOpts, _minShares *big.Int) (*types.Transaction, error)

InvestLiquidity is a paid mutator transaction binding the contract method 0x12675e01.

Solidity: function investLiquidity(uint256 _minShares) payable returns()

func (*SwapExchangeTransactor) Receive

func (_SwapExchange *SwapExchangeTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*SwapExchangeTransactor) SetFeeRate

func (_SwapExchange *SwapExchangeTransactor) SetFeeRate(opts *bind.TransactOpts, tokenA string, tokenB string, _feeRate *big.Int) (*types.Transaction, error)

SetFeeRate is a paid mutator transaction binding the contract method 0x9029feed.

Solidity: function setFeeRate(string tokenA, string tokenB, uint256 _feeRate) returns()

func (*SwapExchangeTransactor) SetTokenBase

func (_SwapExchange *SwapExchangeTransactor) SetTokenBase(opts *bind.TransactOpts, tokenA string, tokenB string, _baseToken string, _rate *big.Int) (*types.Transaction, error)

SetTokenBase is a paid mutator transaction binding the contract method 0x3ad7bacc.

Solidity: function setTokenBase(string tokenA, string tokenB, string _baseToken, uint256 _rate) returns()

func (*SwapExchangeTransactor) Start

func (_SwapExchange *SwapExchangeTransactor) Start(opts *bind.TransactOpts) (*types.Transaction, error)

Start is a paid mutator transaction binding the contract method 0xbe9a6555.

Solidity: function start() returns()

func (*SwapExchangeTransactor) Swap

func (_SwapExchange *SwapExchangeTransactor) Swap(opts *bind.TransactOpts, key [32]byte, _minTokensReceived *big.Int, _timeout *big.Int, _recipient common.ContractAddress) (*types.Transaction, error)

Swap is a paid mutator transaction binding the contract method 0x82daa6f6.

Solidity: function swap(bytes32 key, uint256 _minTokensReceived, uint256 _timeout, address _recipient) payable returns(uint256)

func (*SwapExchangeTransactor) TransferOwnership

func (_SwapExchange *SwapExchangeTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.ContractAddress) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

func (*SwapExchangeTransactor) WithdrawShareReward

func (_SwapExchange *SwapExchangeTransactor) WithdrawShareReward(opts *bind.TransactOpts, key [32]byte) (*types.Transaction, error)

WithdrawShareReward is a paid mutator transaction binding the contract method 0xc127a9b0.

Solidity: function withdrawShareReward(bytes32 key) returns()

type SwapExchangeTransactorRaw

type SwapExchangeTransactorRaw struct {
	Contract *SwapExchangeTransactor // Generic write-only contract binding to access the raw methods on
}

SwapExchangeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*SwapExchangeTransactorRaw) Transact

func (_SwapExchange *SwapExchangeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*SwapExchangeTransactorRaw) Transfer

func (_SwapExchange *SwapExchangeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type SwapExchangeTransactorSession

type SwapExchangeTransactorSession struct {
	Contract     *SwapExchangeTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts       // Transaction auth options to use throughout this session
}

SwapExchangeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*SwapExchangeTransactorSession) CancelInvest

func (_SwapExchange *SwapExchangeTransactorSession) CancelInvest() (*types.Transaction, error)

CancelInvest is a paid mutator transaction binding the contract method 0xb4f81dcc.

Solidity: function cancelInvest() returns(bool)

func (*SwapExchangeTransactorSession) DivestLiquidity

func (_SwapExchange *SwapExchangeTransactorSession) DivestLiquidity(key [32]byte, _sharesBurned *big.Int, _minTokenA *big.Int, _minTokenB *big.Int) (*types.Transaction, error)

DivestLiquidity is a paid mutator transaction binding the contract method 0x756925ff.

Solidity: function divestLiquidity(bytes32 key, uint256 _sharesBurned, uint256 _minTokenA, uint256 _minTokenB) returns()

func (*SwapExchangeTransactorSession) InvestLiquidity

func (_SwapExchange *SwapExchangeTransactorSession) InvestLiquidity(_minShares *big.Int) (*types.Transaction, error)

InvestLiquidity is a paid mutator transaction binding the contract method 0x12675e01.

Solidity: function investLiquidity(uint256 _minShares) payable returns()

func (*SwapExchangeTransactorSession) Receive

func (_SwapExchange *SwapExchangeTransactorSession) Receive() (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*SwapExchangeTransactorSession) SetFeeRate

func (_SwapExchange *SwapExchangeTransactorSession) SetFeeRate(tokenA string, tokenB string, _feeRate *big.Int) (*types.Transaction, error)

SetFeeRate is a paid mutator transaction binding the contract method 0x9029feed.

Solidity: function setFeeRate(string tokenA, string tokenB, uint256 _feeRate) returns()

func (*SwapExchangeTransactorSession) SetTokenBase

func (_SwapExchange *SwapExchangeTransactorSession) SetTokenBase(tokenA string, tokenB string, _baseToken string, _rate *big.Int) (*types.Transaction, error)

SetTokenBase is a paid mutator transaction binding the contract method 0x3ad7bacc.

Solidity: function setTokenBase(string tokenA, string tokenB, string _baseToken, uint256 _rate) returns()

func (*SwapExchangeTransactorSession) Start

func (_SwapExchange *SwapExchangeTransactorSession) Start() (*types.Transaction, error)

Start is a paid mutator transaction binding the contract method 0xbe9a6555.

Solidity: function start() returns()

func (*SwapExchangeTransactorSession) Swap

func (_SwapExchange *SwapExchangeTransactorSession) Swap(key [32]byte, _minTokensReceived *big.Int, _timeout *big.Int, _recipient common.ContractAddress) (*types.Transaction, error)

Swap is a paid mutator transaction binding the contract method 0x82daa6f6.

Solidity: function swap(bytes32 key, uint256 _minTokensReceived, uint256 _timeout, address _recipient) payable returns(uint256)

func (*SwapExchangeTransactorSession) TransferOwnership

func (_SwapExchange *SwapExchangeTransactorSession) TransferOwnership(newOwner common.ContractAddress) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

func (*SwapExchangeTransactorSession) WithdrawShareReward

func (_SwapExchange *SwapExchangeTransactorSession) WithdrawShareReward(key [32]byte) (*types.Transaction, error)

WithdrawShareReward is a paid mutator transaction binding the contract method 0xc127a9b0.

Solidity: function withdrawShareReward(bytes32 key) returns()

type Volume

type Volume struct {
	Index *big.Int
	Value *big.Int
}

Volume is an auto generated low-level Go binding around an user-defined struct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL