hopSwap

package
v0.140.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HopSwapABI = "" /* 11328-byte string literal not displayed */

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

Variables

This section is empty.

Functions

This section is empty.

Types

type HopSwap

type HopSwap struct {
	HopSwapCaller     // Read-only binding to the contract
	HopSwapTransactor // Write-only binding to the contract
	HopSwapFilterer   // Log filterer for contract events
}

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

func NewHopSwap

func NewHopSwap(address common.Address, backend bind.ContractBackend) (*HopSwap, error)

NewHopSwap creates a new instance of HopSwap, bound to a specific deployed contract.

type HopSwapAddLiquidity

type HopSwapAddLiquidity struct {
	Provider      common.Address
	TokenAmounts  []*big.Int
	Fees          []*big.Int
	Invariant     *big.Int
	LpTokenSupply *big.Int
	Raw           types.Log // Blockchain specific contextual infos
}

HopSwapAddLiquidity represents a AddLiquidity event raised by the HopSwap contract.

type HopSwapAddLiquidityIterator

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

HopSwapAddLiquidityIterator is returned from FilterAddLiquidity and is used to iterate over the raw logs and unpacked data for AddLiquidity events raised by the HopSwap contract.

func (*HopSwapAddLiquidityIterator) Close

func (it *HopSwapAddLiquidityIterator) Close() error

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

func (*HopSwapAddLiquidityIterator) Error

func (it *HopSwapAddLiquidityIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*HopSwapAddLiquidityIterator) Next

func (it *HopSwapAddLiquidityIterator) Next() bool

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 HopSwapCaller

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

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

func NewHopSwapCaller

func NewHopSwapCaller(address common.Address, caller bind.ContractCaller) (*HopSwapCaller, error)

NewHopSwapCaller creates a new read-only instance of HopSwap, bound to a specific deployed contract.

func (*HopSwapCaller) CalculateCurrentWithdrawFee

func (_HopSwap *HopSwapCaller) CalculateCurrentWithdrawFee(opts *bind.CallOpts, user common.Address) (*big.Int, error)

CalculateCurrentWithdrawFee is a free data retrieval call binding the contract method 0x4a1b0d57.

Solidity: function calculateCurrentWithdrawFee(address user) view returns(uint256)

func (*HopSwapCaller) CalculateRemoveLiquidity

func (_HopSwap *HopSwapCaller) CalculateRemoveLiquidity(opts *bind.CallOpts, account common.Address, amount *big.Int) ([]*big.Int, error)

CalculateRemoveLiquidity is a free data retrieval call binding the contract method 0x7c61e561.

Solidity: function calculateRemoveLiquidity(address account, uint256 amount) view returns(uint256[])

func (*HopSwapCaller) CalculateRemoveLiquidityOneToken

func (_HopSwap *HopSwapCaller) CalculateRemoveLiquidityOneToken(opts *bind.CallOpts, account common.Address, tokenAmount *big.Int, tokenIndex uint8) (*big.Int, error)

CalculateRemoveLiquidityOneToken is a free data retrieval call binding the contract method 0x98899f40.

Solidity: function calculateRemoveLiquidityOneToken(address account, uint256 tokenAmount, uint8 tokenIndex) view returns(uint256 availableTokenAmount)

func (*HopSwapCaller) CalculateSwap

func (_HopSwap *HopSwapCaller) CalculateSwap(opts *bind.CallOpts, tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int) (*big.Int, error)

CalculateSwap is a free data retrieval call binding the contract method 0xa95b089f.

Solidity: function calculateSwap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) view returns(uint256)

func (*HopSwapCaller) CalculateTokenAmount

func (_HopSwap *HopSwapCaller) CalculateTokenAmount(opts *bind.CallOpts, account common.Address, amounts []*big.Int, deposit bool) (*big.Int, error)

CalculateTokenAmount is a free data retrieval call binding the contract method 0xf9273ffb.

Solidity: function calculateTokenAmount(address account, uint256[] amounts, bool deposit) view returns(uint256)

func (*HopSwapCaller) GetA

func (_HopSwap *HopSwapCaller) GetA(opts *bind.CallOpts) (*big.Int, error)

GetA is a free data retrieval call binding the contract method 0xd46300fd.

Solidity: function getA() view returns(uint256)

func (*HopSwapCaller) GetAPrecise

func (_HopSwap *HopSwapCaller) GetAPrecise(opts *bind.CallOpts) (*big.Int, error)

GetAPrecise is a free data retrieval call binding the contract method 0x0ba81959.

Solidity: function getAPrecise() view returns(uint256)

func (*HopSwapCaller) GetAdminBalance

func (_HopSwap *HopSwapCaller) GetAdminBalance(opts *bind.CallOpts, index *big.Int) (*big.Int, error)

GetAdminBalance is a free data retrieval call binding the contract method 0xef0a712f.

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

func (*HopSwapCaller) GetDepositTimestamp

func (_HopSwap *HopSwapCaller) GetDepositTimestamp(opts *bind.CallOpts, user common.Address) (*big.Int, error)

GetDepositTimestamp is a free data retrieval call binding the contract method 0xda7a77be.

Solidity: function getDepositTimestamp(address user) view returns(uint256)

func (*HopSwapCaller) GetToken

func (_HopSwap *HopSwapCaller) GetToken(opts *bind.CallOpts, index uint8) (common.Address, error)

GetToken is a free data retrieval call binding the contract method 0x82b86600.

Solidity: function getToken(uint8 index) view returns(address)

func (*HopSwapCaller) GetTokenBalance

func (_HopSwap *HopSwapCaller) GetTokenBalance(opts *bind.CallOpts, index uint8) (*big.Int, error)

GetTokenBalance is a free data retrieval call binding the contract method 0x91ceb3eb.

Solidity: function getTokenBalance(uint8 index) view returns(uint256)

func (*HopSwapCaller) GetTokenIndex

func (_HopSwap *HopSwapCaller) GetTokenIndex(opts *bind.CallOpts, tokenAddress common.Address) (uint8, error)

GetTokenIndex is a free data retrieval call binding the contract method 0x66c0bd24.

Solidity: function getTokenIndex(address tokenAddress) view returns(uint8)

func (*HopSwapCaller) GetVirtualPrice

func (_HopSwap *HopSwapCaller) GetVirtualPrice(opts *bind.CallOpts) (*big.Int, error)

GetVirtualPrice is a free data retrieval call binding the contract method 0xe25aa5fa.

Solidity: function getVirtualPrice() view returns(uint256)

func (*HopSwapCaller) SwapStorage

func (_HopSwap *HopSwapCaller) SwapStorage(opts *bind.CallOpts) (struct {
	InitialA           *big.Int
	FutureA            *big.Int
	InitialATime       *big.Int
	FutureATime        *big.Int
	SwapFee            *big.Int
	AdminFee           *big.Int
	DefaultWithdrawFee *big.Int
	LpToken            common.Address
}, error)

SwapStorage is a free data retrieval call binding the contract method 0x5fd65f0f.

Solidity: function swapStorage() view returns(uint256 initialA, uint256 futureA, uint256 initialATime, uint256 futureATime, uint256 swapFee, uint256 adminFee, uint256 defaultWithdrawFee, address lpToken)

type HopSwapCallerRaw

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

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

func (*HopSwapCallerRaw) Call

func (_HopSwap *HopSwapCallerRaw) 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 HopSwapCallerSession

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

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

func (*HopSwapCallerSession) CalculateCurrentWithdrawFee

func (_HopSwap *HopSwapCallerSession) CalculateCurrentWithdrawFee(user common.Address) (*big.Int, error)

CalculateCurrentWithdrawFee is a free data retrieval call binding the contract method 0x4a1b0d57.

Solidity: function calculateCurrentWithdrawFee(address user) view returns(uint256)

func (*HopSwapCallerSession) CalculateRemoveLiquidity

func (_HopSwap *HopSwapCallerSession) CalculateRemoveLiquidity(account common.Address, amount *big.Int) ([]*big.Int, error)

CalculateRemoveLiquidity is a free data retrieval call binding the contract method 0x7c61e561.

Solidity: function calculateRemoveLiquidity(address account, uint256 amount) view returns(uint256[])

func (*HopSwapCallerSession) CalculateRemoveLiquidityOneToken

func (_HopSwap *HopSwapCallerSession) CalculateRemoveLiquidityOneToken(account common.Address, tokenAmount *big.Int, tokenIndex uint8) (*big.Int, error)

CalculateRemoveLiquidityOneToken is a free data retrieval call binding the contract method 0x98899f40.

Solidity: function calculateRemoveLiquidityOneToken(address account, uint256 tokenAmount, uint8 tokenIndex) view returns(uint256 availableTokenAmount)

func (*HopSwapCallerSession) CalculateSwap

func (_HopSwap *HopSwapCallerSession) CalculateSwap(tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int) (*big.Int, error)

CalculateSwap is a free data retrieval call binding the contract method 0xa95b089f.

Solidity: function calculateSwap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) view returns(uint256)

func (*HopSwapCallerSession) CalculateTokenAmount

func (_HopSwap *HopSwapCallerSession) CalculateTokenAmount(account common.Address, amounts []*big.Int, deposit bool) (*big.Int, error)

CalculateTokenAmount is a free data retrieval call binding the contract method 0xf9273ffb.

Solidity: function calculateTokenAmount(address account, uint256[] amounts, bool deposit) view returns(uint256)

func (*HopSwapCallerSession) GetA

func (_HopSwap *HopSwapCallerSession) GetA() (*big.Int, error)

GetA is a free data retrieval call binding the contract method 0xd46300fd.

Solidity: function getA() view returns(uint256)

func (*HopSwapCallerSession) GetAPrecise

func (_HopSwap *HopSwapCallerSession) GetAPrecise() (*big.Int, error)

GetAPrecise is a free data retrieval call binding the contract method 0x0ba81959.

Solidity: function getAPrecise() view returns(uint256)

func (*HopSwapCallerSession) GetAdminBalance

func (_HopSwap *HopSwapCallerSession) GetAdminBalance(index *big.Int) (*big.Int, error)

GetAdminBalance is a free data retrieval call binding the contract method 0xef0a712f.

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

func (*HopSwapCallerSession) GetDepositTimestamp

func (_HopSwap *HopSwapCallerSession) GetDepositTimestamp(user common.Address) (*big.Int, error)

GetDepositTimestamp is a free data retrieval call binding the contract method 0xda7a77be.

Solidity: function getDepositTimestamp(address user) view returns(uint256)

func (*HopSwapCallerSession) GetToken

func (_HopSwap *HopSwapCallerSession) GetToken(index uint8) (common.Address, error)

GetToken is a free data retrieval call binding the contract method 0x82b86600.

Solidity: function getToken(uint8 index) view returns(address)

func (*HopSwapCallerSession) GetTokenBalance

func (_HopSwap *HopSwapCallerSession) GetTokenBalance(index uint8) (*big.Int, error)

GetTokenBalance is a free data retrieval call binding the contract method 0x91ceb3eb.

Solidity: function getTokenBalance(uint8 index) view returns(uint256)

func (*HopSwapCallerSession) GetTokenIndex

func (_HopSwap *HopSwapCallerSession) GetTokenIndex(tokenAddress common.Address) (uint8, error)

GetTokenIndex is a free data retrieval call binding the contract method 0x66c0bd24.

Solidity: function getTokenIndex(address tokenAddress) view returns(uint8)

func (*HopSwapCallerSession) GetVirtualPrice

func (_HopSwap *HopSwapCallerSession) GetVirtualPrice() (*big.Int, error)

GetVirtualPrice is a free data retrieval call binding the contract method 0xe25aa5fa.

Solidity: function getVirtualPrice() view returns(uint256)

func (*HopSwapCallerSession) SwapStorage

func (_HopSwap *HopSwapCallerSession) SwapStorage() (struct {
	InitialA           *big.Int
	FutureA            *big.Int
	InitialATime       *big.Int
	FutureATime        *big.Int
	SwapFee            *big.Int
	AdminFee           *big.Int
	DefaultWithdrawFee *big.Int
	LpToken            common.Address
}, error)

SwapStorage is a free data retrieval call binding the contract method 0x5fd65f0f.

Solidity: function swapStorage() view returns(uint256 initialA, uint256 futureA, uint256 initialATime, uint256 futureATime, uint256 swapFee, uint256 adminFee, uint256 defaultWithdrawFee, address lpToken)

type HopSwapFilterer

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

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

func NewHopSwapFilterer

func NewHopSwapFilterer(address common.Address, filterer bind.ContractFilterer) (*HopSwapFilterer, error)

NewHopSwapFilterer creates a new log filterer instance of HopSwap, bound to a specific deployed contract.

func (*HopSwapFilterer) FilterAddLiquidity

func (_HopSwap *HopSwapFilterer) FilterAddLiquidity(opts *bind.FilterOpts, provider []common.Address) (*HopSwapAddLiquidityIterator, error)

FilterAddLiquidity is a free log retrieval operation binding the contract event 0x189c623b666b1b45b83d7178f39b8c087cb09774317ca2f53c2d3c3726f222a2.

Solidity: event AddLiquidity(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply)

func (*HopSwapFilterer) FilterNewAdminFee

func (_HopSwap *HopSwapFilterer) FilterNewAdminFee(opts *bind.FilterOpts) (*HopSwapNewAdminFeeIterator, error)

FilterNewAdminFee is a free log retrieval operation binding the contract event 0xab599d640ca80cde2b09b128a4154a8dfe608cb80f4c9399c8b954b01fd35f38.

Solidity: event NewAdminFee(uint256 newAdminFee)

func (*HopSwapFilterer) FilterNewSwapFee

func (_HopSwap *HopSwapFilterer) FilterNewSwapFee(opts *bind.FilterOpts) (*HopSwapNewSwapFeeIterator, error)

FilterNewSwapFee is a free log retrieval operation binding the contract event 0xd88ea5155021c6f8dafa1a741e173f595cdf77ce7c17d43342131d7f06afdfe5.

Solidity: event NewSwapFee(uint256 newSwapFee)

func (*HopSwapFilterer) FilterNewWithdrawFee

func (_HopSwap *HopSwapFilterer) FilterNewWithdrawFee(opts *bind.FilterOpts) (*HopSwapNewWithdrawFeeIterator, error)

FilterNewWithdrawFee is a free log retrieval operation binding the contract event 0xd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d.

Solidity: event NewWithdrawFee(uint256 newWithdrawFee)

func (*HopSwapFilterer) FilterRampA

func (_HopSwap *HopSwapFilterer) FilterRampA(opts *bind.FilterOpts) (*HopSwapRampAIterator, error)

FilterRampA is a free log retrieval operation binding the contract event 0xa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c254.

Solidity: event RampA(uint256 oldA, uint256 newA, uint256 initialTime, uint256 futureTime)

func (*HopSwapFilterer) FilterRemoveLiquidity

func (_HopSwap *HopSwapFilterer) FilterRemoveLiquidity(opts *bind.FilterOpts, provider []common.Address) (*HopSwapRemoveLiquidityIterator, error)

FilterRemoveLiquidity is a free log retrieval operation binding the contract event 0x88d38ed598fdd809c2bf01ee49cd24b7fdabf379a83d29567952b60324d58cef.

Solidity: event RemoveLiquidity(address indexed provider, uint256[] tokenAmounts, uint256 lpTokenSupply)

func (*HopSwapFilterer) FilterRemoveLiquidityImbalance

func (_HopSwap *HopSwapFilterer) FilterRemoveLiquidityImbalance(opts *bind.FilterOpts, provider []common.Address) (*HopSwapRemoveLiquidityImbalanceIterator, error)

FilterRemoveLiquidityImbalance is a free log retrieval operation binding the contract event 0x3631c28b1f9dd213e0319fb167b554d76b6c283a41143eb400a0d1adb1af1755.

Solidity: event RemoveLiquidityImbalance(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply)

func (*HopSwapFilterer) FilterRemoveLiquidityOne

func (_HopSwap *HopSwapFilterer) FilterRemoveLiquidityOne(opts *bind.FilterOpts, provider []common.Address) (*HopSwapRemoveLiquidityOneIterator, error)

FilterRemoveLiquidityOne is a free log retrieval operation binding the contract event 0x43fb02998f4e03da2e0e6fff53fdbf0c40a9f45f145dc377fc30615d7d7a8a64.

Solidity: event RemoveLiquidityOne(address indexed provider, uint256 lpTokenAmount, uint256 lpTokenSupply, uint256 boughtId, uint256 tokensBought)

func (*HopSwapFilterer) FilterStopRampA

func (_HopSwap *HopSwapFilterer) FilterStopRampA(opts *bind.FilterOpts) (*HopSwapStopRampAIterator, error)

FilterStopRampA is a free log retrieval operation binding the contract event 0x46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc201938.

Solidity: event StopRampA(uint256 currentA, uint256 time)

func (*HopSwapFilterer) FilterTokenSwap

func (_HopSwap *HopSwapFilterer) FilterTokenSwap(opts *bind.FilterOpts, buyer []common.Address) (*HopSwapTokenSwapIterator, error)

FilterTokenSwap is a free log retrieval operation binding the contract event 0xc6c1e0630dbe9130cc068028486c0d118ddcea348550819defd5cb8c257f8a38.

Solidity: event TokenSwap(address indexed buyer, uint256 tokensSold, uint256 tokensBought, uint128 soldId, uint128 boughtId)

func (*HopSwapFilterer) ParseAddLiquidity

func (_HopSwap *HopSwapFilterer) ParseAddLiquidity(log types.Log) (*HopSwapAddLiquidity, error)

ParseAddLiquidity is a log parse operation binding the contract event 0x189c623b666b1b45b83d7178f39b8c087cb09774317ca2f53c2d3c3726f222a2.

Solidity: event AddLiquidity(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply)

func (*HopSwapFilterer) ParseNewAdminFee

func (_HopSwap *HopSwapFilterer) ParseNewAdminFee(log types.Log) (*HopSwapNewAdminFee, error)

ParseNewAdminFee is a log parse operation binding the contract event 0xab599d640ca80cde2b09b128a4154a8dfe608cb80f4c9399c8b954b01fd35f38.

Solidity: event NewAdminFee(uint256 newAdminFee)

func (*HopSwapFilterer) ParseNewSwapFee

func (_HopSwap *HopSwapFilterer) ParseNewSwapFee(log types.Log) (*HopSwapNewSwapFee, error)

ParseNewSwapFee is a log parse operation binding the contract event 0xd88ea5155021c6f8dafa1a741e173f595cdf77ce7c17d43342131d7f06afdfe5.

Solidity: event NewSwapFee(uint256 newSwapFee)

func (*HopSwapFilterer) ParseNewWithdrawFee

func (_HopSwap *HopSwapFilterer) ParseNewWithdrawFee(log types.Log) (*HopSwapNewWithdrawFee, error)

ParseNewWithdrawFee is a log parse operation binding the contract event 0xd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d.

Solidity: event NewWithdrawFee(uint256 newWithdrawFee)

func (*HopSwapFilterer) ParseRampA

func (_HopSwap *HopSwapFilterer) ParseRampA(log types.Log) (*HopSwapRampA, error)

ParseRampA is a log parse operation binding the contract event 0xa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c254.

Solidity: event RampA(uint256 oldA, uint256 newA, uint256 initialTime, uint256 futureTime)

func (*HopSwapFilterer) ParseRemoveLiquidity

func (_HopSwap *HopSwapFilterer) ParseRemoveLiquidity(log types.Log) (*HopSwapRemoveLiquidity, error)

ParseRemoveLiquidity is a log parse operation binding the contract event 0x88d38ed598fdd809c2bf01ee49cd24b7fdabf379a83d29567952b60324d58cef.

Solidity: event RemoveLiquidity(address indexed provider, uint256[] tokenAmounts, uint256 lpTokenSupply)

func (*HopSwapFilterer) ParseRemoveLiquidityImbalance

func (_HopSwap *HopSwapFilterer) ParseRemoveLiquidityImbalance(log types.Log) (*HopSwapRemoveLiquidityImbalance, error)

ParseRemoveLiquidityImbalance is a log parse operation binding the contract event 0x3631c28b1f9dd213e0319fb167b554d76b6c283a41143eb400a0d1adb1af1755.

Solidity: event RemoveLiquidityImbalance(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply)

func (*HopSwapFilterer) ParseRemoveLiquidityOne

func (_HopSwap *HopSwapFilterer) ParseRemoveLiquidityOne(log types.Log) (*HopSwapRemoveLiquidityOne, error)

ParseRemoveLiquidityOne is a log parse operation binding the contract event 0x43fb02998f4e03da2e0e6fff53fdbf0c40a9f45f145dc377fc30615d7d7a8a64.

Solidity: event RemoveLiquidityOne(address indexed provider, uint256 lpTokenAmount, uint256 lpTokenSupply, uint256 boughtId, uint256 tokensBought)

func (*HopSwapFilterer) ParseStopRampA

func (_HopSwap *HopSwapFilterer) ParseStopRampA(log types.Log) (*HopSwapStopRampA, error)

ParseStopRampA is a log parse operation binding the contract event 0x46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc201938.

Solidity: event StopRampA(uint256 currentA, uint256 time)

func (*HopSwapFilterer) ParseTokenSwap

func (_HopSwap *HopSwapFilterer) ParseTokenSwap(log types.Log) (*HopSwapTokenSwap, error)

ParseTokenSwap is a log parse operation binding the contract event 0xc6c1e0630dbe9130cc068028486c0d118ddcea348550819defd5cb8c257f8a38.

Solidity: event TokenSwap(address indexed buyer, uint256 tokensSold, uint256 tokensBought, uint128 soldId, uint128 boughtId)

func (*HopSwapFilterer) WatchAddLiquidity

func (_HopSwap *HopSwapFilterer) WatchAddLiquidity(opts *bind.WatchOpts, sink chan<- *HopSwapAddLiquidity, provider []common.Address) (event.Subscription, error)

WatchAddLiquidity is a free log subscription operation binding the contract event 0x189c623b666b1b45b83d7178f39b8c087cb09774317ca2f53c2d3c3726f222a2.

Solidity: event AddLiquidity(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply)

func (*HopSwapFilterer) WatchNewAdminFee

func (_HopSwap *HopSwapFilterer) WatchNewAdminFee(opts *bind.WatchOpts, sink chan<- *HopSwapNewAdminFee) (event.Subscription, error)

WatchNewAdminFee is a free log subscription operation binding the contract event 0xab599d640ca80cde2b09b128a4154a8dfe608cb80f4c9399c8b954b01fd35f38.

Solidity: event NewAdminFee(uint256 newAdminFee)

func (*HopSwapFilterer) WatchNewSwapFee

func (_HopSwap *HopSwapFilterer) WatchNewSwapFee(opts *bind.WatchOpts, sink chan<- *HopSwapNewSwapFee) (event.Subscription, error)

WatchNewSwapFee is a free log subscription operation binding the contract event 0xd88ea5155021c6f8dafa1a741e173f595cdf77ce7c17d43342131d7f06afdfe5.

Solidity: event NewSwapFee(uint256 newSwapFee)

func (*HopSwapFilterer) WatchNewWithdrawFee

func (_HopSwap *HopSwapFilterer) WatchNewWithdrawFee(opts *bind.WatchOpts, sink chan<- *HopSwapNewWithdrawFee) (event.Subscription, error)

WatchNewWithdrawFee is a free log subscription operation binding the contract event 0xd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d.

Solidity: event NewWithdrawFee(uint256 newWithdrawFee)

func (*HopSwapFilterer) WatchRampA

func (_HopSwap *HopSwapFilterer) WatchRampA(opts *bind.WatchOpts, sink chan<- *HopSwapRampA) (event.Subscription, error)

WatchRampA is a free log subscription operation binding the contract event 0xa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c254.

Solidity: event RampA(uint256 oldA, uint256 newA, uint256 initialTime, uint256 futureTime)

func (*HopSwapFilterer) WatchRemoveLiquidity

func (_HopSwap *HopSwapFilterer) WatchRemoveLiquidity(opts *bind.WatchOpts, sink chan<- *HopSwapRemoveLiquidity, provider []common.Address) (event.Subscription, error)

WatchRemoveLiquidity is a free log subscription operation binding the contract event 0x88d38ed598fdd809c2bf01ee49cd24b7fdabf379a83d29567952b60324d58cef.

Solidity: event RemoveLiquidity(address indexed provider, uint256[] tokenAmounts, uint256 lpTokenSupply)

func (*HopSwapFilterer) WatchRemoveLiquidityImbalance

func (_HopSwap *HopSwapFilterer) WatchRemoveLiquidityImbalance(opts *bind.WatchOpts, sink chan<- *HopSwapRemoveLiquidityImbalance, provider []common.Address) (event.Subscription, error)

WatchRemoveLiquidityImbalance is a free log subscription operation binding the contract event 0x3631c28b1f9dd213e0319fb167b554d76b6c283a41143eb400a0d1adb1af1755.

Solidity: event RemoveLiquidityImbalance(address indexed provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply)

func (*HopSwapFilterer) WatchRemoveLiquidityOne

func (_HopSwap *HopSwapFilterer) WatchRemoveLiquidityOne(opts *bind.WatchOpts, sink chan<- *HopSwapRemoveLiquidityOne, provider []common.Address) (event.Subscription, error)

WatchRemoveLiquidityOne is a free log subscription operation binding the contract event 0x43fb02998f4e03da2e0e6fff53fdbf0c40a9f45f145dc377fc30615d7d7a8a64.

Solidity: event RemoveLiquidityOne(address indexed provider, uint256 lpTokenAmount, uint256 lpTokenSupply, uint256 boughtId, uint256 tokensBought)

func (*HopSwapFilterer) WatchStopRampA

func (_HopSwap *HopSwapFilterer) WatchStopRampA(opts *bind.WatchOpts, sink chan<- *HopSwapStopRampA) (event.Subscription, error)

WatchStopRampA is a free log subscription operation binding the contract event 0x46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc201938.

Solidity: event StopRampA(uint256 currentA, uint256 time)

func (*HopSwapFilterer) WatchTokenSwap

func (_HopSwap *HopSwapFilterer) WatchTokenSwap(opts *bind.WatchOpts, sink chan<- *HopSwapTokenSwap, buyer []common.Address) (event.Subscription, error)

WatchTokenSwap is a free log subscription operation binding the contract event 0xc6c1e0630dbe9130cc068028486c0d118ddcea348550819defd5cb8c257f8a38.

Solidity: event TokenSwap(address indexed buyer, uint256 tokensSold, uint256 tokensBought, uint128 soldId, uint128 boughtId)

type HopSwapNewAdminFee

type HopSwapNewAdminFee struct {
	NewAdminFee *big.Int
	Raw         types.Log // Blockchain specific contextual infos
}

HopSwapNewAdminFee represents a NewAdminFee event raised by the HopSwap contract.

type HopSwapNewAdminFeeIterator

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

HopSwapNewAdminFeeIterator is returned from FilterNewAdminFee and is used to iterate over the raw logs and unpacked data for NewAdminFee events raised by the HopSwap contract.

func (*HopSwapNewAdminFeeIterator) Close

func (it *HopSwapNewAdminFeeIterator) Close() error

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

func (*HopSwapNewAdminFeeIterator) Error

func (it *HopSwapNewAdminFeeIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*HopSwapNewAdminFeeIterator) Next

func (it *HopSwapNewAdminFeeIterator) Next() bool

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 HopSwapNewSwapFee

type HopSwapNewSwapFee struct {
	NewSwapFee *big.Int
	Raw        types.Log // Blockchain specific contextual infos
}

HopSwapNewSwapFee represents a NewSwapFee event raised by the HopSwap contract.

type HopSwapNewSwapFeeIterator

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

HopSwapNewSwapFeeIterator is returned from FilterNewSwapFee and is used to iterate over the raw logs and unpacked data for NewSwapFee events raised by the HopSwap contract.

func (*HopSwapNewSwapFeeIterator) Close

func (it *HopSwapNewSwapFeeIterator) Close() error

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

func (*HopSwapNewSwapFeeIterator) Error

func (it *HopSwapNewSwapFeeIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*HopSwapNewSwapFeeIterator) Next

func (it *HopSwapNewSwapFeeIterator) Next() bool

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 HopSwapNewWithdrawFee

type HopSwapNewWithdrawFee struct {
	NewWithdrawFee *big.Int
	Raw            types.Log // Blockchain specific contextual infos
}

HopSwapNewWithdrawFee represents a NewWithdrawFee event raised by the HopSwap contract.

type HopSwapNewWithdrawFeeIterator

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

HopSwapNewWithdrawFeeIterator is returned from FilterNewWithdrawFee and is used to iterate over the raw logs and unpacked data for NewWithdrawFee events raised by the HopSwap contract.

func (*HopSwapNewWithdrawFeeIterator) Close

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

func (*HopSwapNewWithdrawFeeIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*HopSwapNewWithdrawFeeIterator) 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 HopSwapRampA

type HopSwapRampA struct {
	OldA        *big.Int
	NewA        *big.Int
	InitialTime *big.Int
	FutureTime  *big.Int
	Raw         types.Log // Blockchain specific contextual infos
}

HopSwapRampA represents a RampA event raised by the HopSwap contract.

type HopSwapRampAIterator

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

HopSwapRampAIterator is returned from FilterRampA and is used to iterate over the raw logs and unpacked data for RampA events raised by the HopSwap contract.

func (*HopSwapRampAIterator) Close

func (it *HopSwapRampAIterator) Close() error

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

func (*HopSwapRampAIterator) Error

func (it *HopSwapRampAIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*HopSwapRampAIterator) Next

func (it *HopSwapRampAIterator) Next() bool

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 HopSwapRaw

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

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

func (*HopSwapRaw) Call

func (_HopSwap *HopSwapRaw) 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 (*HopSwapRaw) Transact

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

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

func (*HopSwapRaw) Transfer

func (_HopSwap *HopSwapRaw) 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 HopSwapRemoveLiquidity

type HopSwapRemoveLiquidity struct {
	Provider      common.Address
	TokenAmounts  []*big.Int
	LpTokenSupply *big.Int
	Raw           types.Log // Blockchain specific contextual infos
}

HopSwapRemoveLiquidity represents a RemoveLiquidity event raised by the HopSwap contract.

type HopSwapRemoveLiquidityImbalance

type HopSwapRemoveLiquidityImbalance struct {
	Provider      common.Address
	TokenAmounts  []*big.Int
	Fees          []*big.Int
	Invariant     *big.Int
	LpTokenSupply *big.Int
	Raw           types.Log // Blockchain specific contextual infos
}

HopSwapRemoveLiquidityImbalance represents a RemoveLiquidityImbalance event raised by the HopSwap contract.

type HopSwapRemoveLiquidityImbalanceIterator

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

HopSwapRemoveLiquidityImbalanceIterator is returned from FilterRemoveLiquidityImbalance and is used to iterate over the raw logs and unpacked data for RemoveLiquidityImbalance events raised by the HopSwap contract.

func (*HopSwapRemoveLiquidityImbalanceIterator) Close

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

func (*HopSwapRemoveLiquidityImbalanceIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*HopSwapRemoveLiquidityImbalanceIterator) 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 HopSwapRemoveLiquidityIterator

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

HopSwapRemoveLiquidityIterator is returned from FilterRemoveLiquidity and is used to iterate over the raw logs and unpacked data for RemoveLiquidity events raised by the HopSwap contract.

func (*HopSwapRemoveLiquidityIterator) Close

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

func (*HopSwapRemoveLiquidityIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*HopSwapRemoveLiquidityIterator) 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 HopSwapRemoveLiquidityOne

type HopSwapRemoveLiquidityOne struct {
	Provider      common.Address
	LpTokenAmount *big.Int
	LpTokenSupply *big.Int
	BoughtId      *big.Int
	TokensBought  *big.Int
	Raw           types.Log // Blockchain specific contextual infos
}

HopSwapRemoveLiquidityOne represents a RemoveLiquidityOne event raised by the HopSwap contract.

type HopSwapRemoveLiquidityOneIterator

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

HopSwapRemoveLiquidityOneIterator is returned from FilterRemoveLiquidityOne and is used to iterate over the raw logs and unpacked data for RemoveLiquidityOne events raised by the HopSwap contract.

func (*HopSwapRemoveLiquidityOneIterator) Close

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

func (*HopSwapRemoveLiquidityOneIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*HopSwapRemoveLiquidityOneIterator) 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 HopSwapSession

type HopSwapSession struct {
	Contract     *HopSwap          // 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
}

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

func (*HopSwapSession) AddLiquidity

func (_HopSwap *HopSwapSession) AddLiquidity(amounts []*big.Int, minToMint *big.Int, deadline *big.Int) (*types.Transaction, error)

AddLiquidity is a paid mutator transaction binding the contract method 0x4d49e87d.

Solidity: function addLiquidity(uint256[] amounts, uint256 minToMint, uint256 deadline) returns(uint256)

func (*HopSwapSession) CalculateCurrentWithdrawFee

func (_HopSwap *HopSwapSession) CalculateCurrentWithdrawFee(user common.Address) (*big.Int, error)

CalculateCurrentWithdrawFee is a free data retrieval call binding the contract method 0x4a1b0d57.

Solidity: function calculateCurrentWithdrawFee(address user) view returns(uint256)

func (*HopSwapSession) CalculateRemoveLiquidity

func (_HopSwap *HopSwapSession) CalculateRemoveLiquidity(account common.Address, amount *big.Int) ([]*big.Int, error)

CalculateRemoveLiquidity is a free data retrieval call binding the contract method 0x7c61e561.

Solidity: function calculateRemoveLiquidity(address account, uint256 amount) view returns(uint256[])

func (*HopSwapSession) CalculateRemoveLiquidityOneToken

func (_HopSwap *HopSwapSession) CalculateRemoveLiquidityOneToken(account common.Address, tokenAmount *big.Int, tokenIndex uint8) (*big.Int, error)

CalculateRemoveLiquidityOneToken is a free data retrieval call binding the contract method 0x98899f40.

Solidity: function calculateRemoveLiquidityOneToken(address account, uint256 tokenAmount, uint8 tokenIndex) view returns(uint256 availableTokenAmount)

func (*HopSwapSession) CalculateSwap

func (_HopSwap *HopSwapSession) CalculateSwap(tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int) (*big.Int, error)

CalculateSwap is a free data retrieval call binding the contract method 0xa95b089f.

Solidity: function calculateSwap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) view returns(uint256)

func (*HopSwapSession) CalculateTokenAmount

func (_HopSwap *HopSwapSession) CalculateTokenAmount(account common.Address, amounts []*big.Int, deposit bool) (*big.Int, error)

CalculateTokenAmount is a free data retrieval call binding the contract method 0xf9273ffb.

Solidity: function calculateTokenAmount(address account, uint256[] amounts, bool deposit) view returns(uint256)

func (*HopSwapSession) GetA

func (_HopSwap *HopSwapSession) GetA() (*big.Int, error)

GetA is a free data retrieval call binding the contract method 0xd46300fd.

Solidity: function getA() view returns(uint256)

func (*HopSwapSession) GetAPrecise

func (_HopSwap *HopSwapSession) GetAPrecise() (*big.Int, error)

GetAPrecise is a free data retrieval call binding the contract method 0x0ba81959.

Solidity: function getAPrecise() view returns(uint256)

func (*HopSwapSession) GetAdminBalance

func (_HopSwap *HopSwapSession) GetAdminBalance(index *big.Int) (*big.Int, error)

GetAdminBalance is a free data retrieval call binding the contract method 0xef0a712f.

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

func (*HopSwapSession) GetDepositTimestamp

func (_HopSwap *HopSwapSession) GetDepositTimestamp(user common.Address) (*big.Int, error)

GetDepositTimestamp is a free data retrieval call binding the contract method 0xda7a77be.

Solidity: function getDepositTimestamp(address user) view returns(uint256)

func (*HopSwapSession) GetToken

func (_HopSwap *HopSwapSession) GetToken(index uint8) (common.Address, error)

GetToken is a free data retrieval call binding the contract method 0x82b86600.

Solidity: function getToken(uint8 index) view returns(address)

func (*HopSwapSession) GetTokenBalance

func (_HopSwap *HopSwapSession) GetTokenBalance(index uint8) (*big.Int, error)

GetTokenBalance is a free data retrieval call binding the contract method 0x91ceb3eb.

Solidity: function getTokenBalance(uint8 index) view returns(uint256)

func (*HopSwapSession) GetTokenIndex

func (_HopSwap *HopSwapSession) GetTokenIndex(tokenAddress common.Address) (uint8, error)

GetTokenIndex is a free data retrieval call binding the contract method 0x66c0bd24.

Solidity: function getTokenIndex(address tokenAddress) view returns(uint8)

func (*HopSwapSession) GetVirtualPrice

func (_HopSwap *HopSwapSession) GetVirtualPrice() (*big.Int, error)

GetVirtualPrice is a free data retrieval call binding the contract method 0xe25aa5fa.

Solidity: function getVirtualPrice() view returns(uint256)

func (*HopSwapSession) Initialize

func (_HopSwap *HopSwapSession) Initialize(_pooledTokens []common.Address, decimals []uint8, lpTokenName string, lpTokenSymbol string, _a *big.Int, _fee *big.Int, _adminFee *big.Int, _withdrawFee *big.Int) (*types.Transaction, error)

Initialize is a paid mutator transaction binding the contract method 0x6dd4480b.

Solidity: function initialize(address[] _pooledTokens, uint8[] decimals, string lpTokenName, string lpTokenSymbol, uint256 _a, uint256 _fee, uint256 _adminFee, uint256 _withdrawFee) returns()

func (*HopSwapSession) RemoveLiquidity

func (_HopSwap *HopSwapSession) RemoveLiquidity(amount *big.Int, minAmounts []*big.Int, deadline *big.Int) (*types.Transaction, error)

RemoveLiquidity is a paid mutator transaction binding the contract method 0x31cd52b0.

Solidity: function removeLiquidity(uint256 amount, uint256[] minAmounts, uint256 deadline) returns(uint256[])

func (*HopSwapSession) RemoveLiquidityImbalance

func (_HopSwap *HopSwapSession) RemoveLiquidityImbalance(amounts []*big.Int, maxBurnAmount *big.Int, deadline *big.Int) (*types.Transaction, error)

RemoveLiquidityImbalance is a paid mutator transaction binding the contract method 0x84cdd9bc.

Solidity: function removeLiquidityImbalance(uint256[] amounts, uint256 maxBurnAmount, uint256 deadline) returns(uint256)

func (*HopSwapSession) RemoveLiquidityOneToken

func (_HopSwap *HopSwapSession) RemoveLiquidityOneToken(tokenAmount *big.Int, tokenIndex uint8, minAmount *big.Int, deadline *big.Int) (*types.Transaction, error)

RemoveLiquidityOneToken is a paid mutator transaction binding the contract method 0x3e3a1560.

Solidity: function removeLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex, uint256 minAmount, uint256 deadline) returns(uint256)

func (*HopSwapSession) Swap

func (_HopSwap *HopSwapSession) Swap(tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int, minDy *big.Int, deadline *big.Int) (*types.Transaction, error)

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

Solidity: function swap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy, uint256 deadline) returns(uint256)

func (*HopSwapSession) SwapStorage

func (_HopSwap *HopSwapSession) SwapStorage() (struct {
	InitialA           *big.Int
	FutureA            *big.Int
	InitialATime       *big.Int
	FutureATime        *big.Int
	SwapFee            *big.Int
	AdminFee           *big.Int
	DefaultWithdrawFee *big.Int
	LpToken            common.Address
}, error)

SwapStorage is a free data retrieval call binding the contract method 0x5fd65f0f.

Solidity: function swapStorage() view returns(uint256 initialA, uint256 futureA, uint256 initialATime, uint256 futureATime, uint256 swapFee, uint256 adminFee, uint256 defaultWithdrawFee, address lpToken)

func (*HopSwapSession) UpdateUserWithdrawFee

func (_HopSwap *HopSwapSession) UpdateUserWithdrawFee(recipient common.Address, transferAmount *big.Int) (*types.Transaction, error)

UpdateUserWithdrawFee is a paid mutator transaction binding the contract method 0xc00c125c.

Solidity: function updateUserWithdrawFee(address recipient, uint256 transferAmount) returns()

type HopSwapStopRampA

type HopSwapStopRampA struct {
	CurrentA *big.Int
	Time     *big.Int
	Raw      types.Log // Blockchain specific contextual infos
}

HopSwapStopRampA represents a StopRampA event raised by the HopSwap contract.

type HopSwapStopRampAIterator

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

HopSwapStopRampAIterator is returned from FilterStopRampA and is used to iterate over the raw logs and unpacked data for StopRampA events raised by the HopSwap contract.

func (*HopSwapStopRampAIterator) Close

func (it *HopSwapStopRampAIterator) Close() error

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

func (*HopSwapStopRampAIterator) Error

func (it *HopSwapStopRampAIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*HopSwapStopRampAIterator) Next

func (it *HopSwapStopRampAIterator) Next() bool

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 HopSwapTokenSwap

type HopSwapTokenSwap struct {
	Buyer        common.Address
	TokensSold   *big.Int
	TokensBought *big.Int
	SoldId       *big.Int
	BoughtId     *big.Int
	Raw          types.Log // Blockchain specific contextual infos
}

HopSwapTokenSwap represents a TokenSwap event raised by the HopSwap contract.

type HopSwapTokenSwapIterator

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

HopSwapTokenSwapIterator is returned from FilterTokenSwap and is used to iterate over the raw logs and unpacked data for TokenSwap events raised by the HopSwap contract.

func (*HopSwapTokenSwapIterator) Close

func (it *HopSwapTokenSwapIterator) Close() error

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

func (*HopSwapTokenSwapIterator) Error

func (it *HopSwapTokenSwapIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*HopSwapTokenSwapIterator) Next

func (it *HopSwapTokenSwapIterator) Next() bool

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 HopSwapTransactor

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

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

func NewHopSwapTransactor

func NewHopSwapTransactor(address common.Address, transactor bind.ContractTransactor) (*HopSwapTransactor, error)

NewHopSwapTransactor creates a new write-only instance of HopSwap, bound to a specific deployed contract.

func (*HopSwapTransactor) AddLiquidity

func (_HopSwap *HopSwapTransactor) AddLiquidity(opts *bind.TransactOpts, amounts []*big.Int, minToMint *big.Int, deadline *big.Int) (*types.Transaction, error)

AddLiquidity is a paid mutator transaction binding the contract method 0x4d49e87d.

Solidity: function addLiquidity(uint256[] amounts, uint256 minToMint, uint256 deadline) returns(uint256)

func (*HopSwapTransactor) Initialize

func (_HopSwap *HopSwapTransactor) Initialize(opts *bind.TransactOpts, _pooledTokens []common.Address, decimals []uint8, lpTokenName string, lpTokenSymbol string, _a *big.Int, _fee *big.Int, _adminFee *big.Int, _withdrawFee *big.Int) (*types.Transaction, error)

Initialize is a paid mutator transaction binding the contract method 0x6dd4480b.

Solidity: function initialize(address[] _pooledTokens, uint8[] decimals, string lpTokenName, string lpTokenSymbol, uint256 _a, uint256 _fee, uint256 _adminFee, uint256 _withdrawFee) returns()

func (*HopSwapTransactor) RemoveLiquidity

func (_HopSwap *HopSwapTransactor) RemoveLiquidity(opts *bind.TransactOpts, amount *big.Int, minAmounts []*big.Int, deadline *big.Int) (*types.Transaction, error)

RemoveLiquidity is a paid mutator transaction binding the contract method 0x31cd52b0.

Solidity: function removeLiquidity(uint256 amount, uint256[] minAmounts, uint256 deadline) returns(uint256[])

func (*HopSwapTransactor) RemoveLiquidityImbalance

func (_HopSwap *HopSwapTransactor) RemoveLiquidityImbalance(opts *bind.TransactOpts, amounts []*big.Int, maxBurnAmount *big.Int, deadline *big.Int) (*types.Transaction, error)

RemoveLiquidityImbalance is a paid mutator transaction binding the contract method 0x84cdd9bc.

Solidity: function removeLiquidityImbalance(uint256[] amounts, uint256 maxBurnAmount, uint256 deadline) returns(uint256)

func (*HopSwapTransactor) RemoveLiquidityOneToken

func (_HopSwap *HopSwapTransactor) RemoveLiquidityOneToken(opts *bind.TransactOpts, tokenAmount *big.Int, tokenIndex uint8, minAmount *big.Int, deadline *big.Int) (*types.Transaction, error)

RemoveLiquidityOneToken is a paid mutator transaction binding the contract method 0x3e3a1560.

Solidity: function removeLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex, uint256 minAmount, uint256 deadline) returns(uint256)

func (*HopSwapTransactor) Swap

func (_HopSwap *HopSwapTransactor) Swap(opts *bind.TransactOpts, tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int, minDy *big.Int, deadline *big.Int) (*types.Transaction, error)

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

Solidity: function swap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy, uint256 deadline) returns(uint256)

func (*HopSwapTransactor) UpdateUserWithdrawFee

func (_HopSwap *HopSwapTransactor) UpdateUserWithdrawFee(opts *bind.TransactOpts, recipient common.Address, transferAmount *big.Int) (*types.Transaction, error)

UpdateUserWithdrawFee is a paid mutator transaction binding the contract method 0xc00c125c.

Solidity: function updateUserWithdrawFee(address recipient, uint256 transferAmount) returns()

type HopSwapTransactorRaw

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

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

func (*HopSwapTransactorRaw) Transact

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

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

func (*HopSwapTransactorRaw) Transfer

func (_HopSwap *HopSwapTransactorRaw) 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 HopSwapTransactorSession

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

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

func (*HopSwapTransactorSession) AddLiquidity

func (_HopSwap *HopSwapTransactorSession) AddLiquidity(amounts []*big.Int, minToMint *big.Int, deadline *big.Int) (*types.Transaction, error)

AddLiquidity is a paid mutator transaction binding the contract method 0x4d49e87d.

Solidity: function addLiquidity(uint256[] amounts, uint256 minToMint, uint256 deadline) returns(uint256)

func (*HopSwapTransactorSession) Initialize

func (_HopSwap *HopSwapTransactorSession) Initialize(_pooledTokens []common.Address, decimals []uint8, lpTokenName string, lpTokenSymbol string, _a *big.Int, _fee *big.Int, _adminFee *big.Int, _withdrawFee *big.Int) (*types.Transaction, error)

Initialize is a paid mutator transaction binding the contract method 0x6dd4480b.

Solidity: function initialize(address[] _pooledTokens, uint8[] decimals, string lpTokenName, string lpTokenSymbol, uint256 _a, uint256 _fee, uint256 _adminFee, uint256 _withdrawFee) returns()

func (*HopSwapTransactorSession) RemoveLiquidity

func (_HopSwap *HopSwapTransactorSession) RemoveLiquidity(amount *big.Int, minAmounts []*big.Int, deadline *big.Int) (*types.Transaction, error)

RemoveLiquidity is a paid mutator transaction binding the contract method 0x31cd52b0.

Solidity: function removeLiquidity(uint256 amount, uint256[] minAmounts, uint256 deadline) returns(uint256[])

func (*HopSwapTransactorSession) RemoveLiquidityImbalance

func (_HopSwap *HopSwapTransactorSession) RemoveLiquidityImbalance(amounts []*big.Int, maxBurnAmount *big.Int, deadline *big.Int) (*types.Transaction, error)

RemoveLiquidityImbalance is a paid mutator transaction binding the contract method 0x84cdd9bc.

Solidity: function removeLiquidityImbalance(uint256[] amounts, uint256 maxBurnAmount, uint256 deadline) returns(uint256)

func (*HopSwapTransactorSession) RemoveLiquidityOneToken

func (_HopSwap *HopSwapTransactorSession) RemoveLiquidityOneToken(tokenAmount *big.Int, tokenIndex uint8, minAmount *big.Int, deadline *big.Int) (*types.Transaction, error)

RemoveLiquidityOneToken is a paid mutator transaction binding the contract method 0x3e3a1560.

Solidity: function removeLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex, uint256 minAmount, uint256 deadline) returns(uint256)

func (*HopSwapTransactorSession) Swap

func (_HopSwap *HopSwapTransactorSession) Swap(tokenIndexFrom uint8, tokenIndexTo uint8, dx *big.Int, minDy *big.Int, deadline *big.Int) (*types.Transaction, error)

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

Solidity: function swap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy, uint256 deadline) returns(uint256)

func (*HopSwapTransactorSession) UpdateUserWithdrawFee

func (_HopSwap *HopSwapTransactorSession) UpdateUserWithdrawFee(recipient common.Address, transferAmount *big.Int) (*types.Transaction, error)

UpdateUserWithdrawFee is a paid mutator transaction binding the contract method 0xc00c125c.

Solidity: function updateUserWithdrawFee(address recipient, uint256 transferAmount) returns()

Jump to

Keyboard shortcuts

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