Documentation
¶
Index ¶
- Variables
- type Router
- type RouterCaller
- func (_Router *RouterCaller) ApprovedPlugins(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (bool, error)
- func (_Router *RouterCaller) Gov(opts *bind.CallOpts) (common.Address, error)
- func (_Router *RouterCaller) Plugins(opts *bind.CallOpts, arg0 common.Address) (bool, error)
- func (_Router *RouterCaller) Usdg(opts *bind.CallOpts) (common.Address, error)
- func (_Router *RouterCaller) Vault(opts *bind.CallOpts) (common.Address, error)
- func (_Router *RouterCaller) Weth(opts *bind.CallOpts) (common.Address, error)
- type RouterCallerRaw
- type RouterCallerSession
- func (_Router *RouterCallerSession) ApprovedPlugins(arg0 common.Address, arg1 common.Address) (bool, error)
- func (_Router *RouterCallerSession) Gov() (common.Address, error)
- func (_Router *RouterCallerSession) Plugins(arg0 common.Address) (bool, error)
- func (_Router *RouterCallerSession) Usdg() (common.Address, error)
- func (_Router *RouterCallerSession) Vault() (common.Address, error)
- func (_Router *RouterCallerSession) Weth() (common.Address, error)
- type RouterFilterer
- type RouterRaw
- func (_Router *RouterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_Router *RouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_Router *RouterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type RouterSession
- func (_Router *RouterSession) AddPlugin(_plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterSession) ApprovePlugin(_plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterSession) ApprovedPlugins(arg0 common.Address, arg1 common.Address) (bool, error)
- func (_Router *RouterSession) DecreasePosition(_collateralToken common.Address, _indexToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterSession) DecreasePositionAndSwap(_path []common.Address, _indexToken common.Address, _collateralDelta *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterSession) DecreasePositionAndSwapETH(_path []common.Address, _indexToken common.Address, _collateralDelta *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterSession) DecreasePositionETH(_collateralToken common.Address, _indexToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterSession) DenyPlugin(_plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterSession) DirectPoolDeposit(_token common.Address, _amount *big.Int) (*types.Transaction, error)
- func (_Router *RouterSession) Gov() (common.Address, error)
- func (_Router *RouterSession) IncreasePosition(_path []common.Address, _indexToken common.Address, _amountIn *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterSession) IncreasePositionETH(_path []common.Address, _indexToken common.Address, _minOut *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterSession) PluginDecreasePosition(_account common.Address, _collateralToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterSession) PluginIncreasePosition(_account common.Address, _collateralToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterSession) PluginTransfer(_token common.Address, _account common.Address, _receiver common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterSession) Plugins(arg0 common.Address) (bool, error)
- func (_Router *RouterSession) Receive() (*types.Transaction, error)
- func (_Router *RouterSession) RemovePlugin(_plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterSession) SetGov(_gov common.Address) (*types.Transaction, error)
- func (_Router *RouterSession) Swap(_path []common.Address, _amountIn *big.Int, _minOut *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterSession) SwapETHToTokens(_path []common.Address, _minOut *big.Int, _receiver common.Address) (*types.Transaction, error)
- func (_Router *RouterSession) SwapTokensToETH(_path []common.Address, _amountIn *big.Int, _minOut *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterSession) Usdg() (common.Address, error)
- func (_Router *RouterSession) Vault() (common.Address, error)
- func (_Router *RouterSession) Weth() (common.Address, error)
- type RouterSwap
- type RouterSwapIterator
- type RouterTransactor
- func (_Router *RouterTransactor) AddPlugin(opts *bind.TransactOpts, _plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterTransactor) ApprovePlugin(opts *bind.TransactOpts, _plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterTransactor) DecreasePosition(opts *bind.TransactOpts, _collateralToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactor) DecreasePositionAndSwap(opts *bind.TransactOpts, _path []common.Address, _indexToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactor) DecreasePositionAndSwapETH(opts *bind.TransactOpts, _path []common.Address, _indexToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactor) DecreasePositionETH(opts *bind.TransactOpts, _collateralToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactor) DenyPlugin(opts *bind.TransactOpts, _plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterTransactor) DirectPoolDeposit(opts *bind.TransactOpts, _token common.Address, _amount *big.Int) (*types.Transaction, error)
- func (_Router *RouterTransactor) IncreasePosition(opts *bind.TransactOpts, _path []common.Address, _indexToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactor) IncreasePositionETH(opts *bind.TransactOpts, _path []common.Address, _indexToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactor) PluginDecreasePosition(opts *bind.TransactOpts, _account common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactor) PluginIncreasePosition(opts *bind.TransactOpts, _account common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactor) PluginTransfer(opts *bind.TransactOpts, _token common.Address, _account common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error)
- func (_Router *RouterTransactor) RemovePlugin(opts *bind.TransactOpts, _plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterTransactor) SetGov(opts *bind.TransactOpts, _gov common.Address) (*types.Transaction, error)
- func (_Router *RouterTransactor) Swap(opts *bind.TransactOpts, _path []common.Address, _amountIn *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterTransactor) SwapETHToTokens(opts *bind.TransactOpts, _path []common.Address, _minOut *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterTransactor) SwapTokensToETH(opts *bind.TransactOpts, _path []common.Address, _amountIn *big.Int, ...) (*types.Transaction, error)
- type RouterTransactorRaw
- type RouterTransactorSession
- func (_Router *RouterTransactorSession) AddPlugin(_plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) ApprovePlugin(_plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) DecreasePosition(_collateralToken common.Address, _indexToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) DecreasePositionAndSwap(_path []common.Address, _indexToken common.Address, _collateralDelta *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) DecreasePositionAndSwapETH(_path []common.Address, _indexToken common.Address, _collateralDelta *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) DecreasePositionETH(_collateralToken common.Address, _indexToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) DenyPlugin(_plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) DirectPoolDeposit(_token common.Address, _amount *big.Int) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) IncreasePosition(_path []common.Address, _indexToken common.Address, _amountIn *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) IncreasePositionETH(_path []common.Address, _indexToken common.Address, _minOut *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) PluginDecreasePosition(_account common.Address, _collateralToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) PluginIncreasePosition(_account common.Address, _collateralToken common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) PluginTransfer(_token common.Address, _account common.Address, _receiver common.Address, ...) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) Receive() (*types.Transaction, error)
- func (_Router *RouterTransactorSession) RemovePlugin(_plugin common.Address) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) SetGov(_gov common.Address) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) Swap(_path []common.Address, _amountIn *big.Int, _minOut *big.Int, ...) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) SwapETHToTokens(_path []common.Address, _minOut *big.Int, _receiver common.Address) (*types.Transaction, error)
- func (_Router *RouterTransactorSession) SwapTokensToETH(_path []common.Address, _amountIn *big.Int, _minOut *big.Int, ...) (*types.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
var RouterABI = RouterMetaData.ABI
RouterABI is the input ABI used to generate the binding from. Deprecated: Use RouterMetaData.ABI instead.
var RouterMetaData = &bind.MetaData{
ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_vault\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_usdg\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_weth\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"addPlugin\",\"inputs\":[{\"name\":\"_plugin\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"approvePlugin\",\"inputs\":[{\"name\":\"_plugin\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"approvedPlugins\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decreasePosition\",\"inputs\":[{\"name\":\"_collateralToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_indexToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_collateralDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_sizeDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_isLong\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"_receiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_price\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"decreasePositionAndSwap\",\"inputs\":[{\"name\":\"_path\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_indexToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_collateralDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_sizeDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_isLong\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"_receiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_price\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minOut\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"decreasePositionAndSwapETH\",\"inputs\":[{\"name\":\"_path\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_indexToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_collateralDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_sizeDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_isLong\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"_receiver\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"_price\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minOut\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"decreasePositionETH\",\"inputs\":[{\"name\":\"_collateralToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_indexToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_collateralDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_sizeDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_isLong\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"_receiver\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"_price\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"denyPlugin\",\"inputs\":[{\"name\":\"_plugin\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"directPoolDeposit\",\"inputs\":[{\"name\":\"_token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"gov\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"increasePosition\",\"inputs\":[{\"name\":\"_path\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_indexToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amountIn\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minOut\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_sizeDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_isLong\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"_price\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"increasePositionETH\",\"inputs\":[{\"name\":\"_path\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_indexToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_minOut\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_sizeDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_isLong\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"_price\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"pluginDecreasePosition\",\"inputs\":[{\"name\":\"_account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_collateralToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_indexToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_collateralDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_sizeDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_isLong\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"_receiver\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pluginIncreasePosition\",\"inputs\":[{\"name\":\"_account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_collateralToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_indexToken\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_sizeDelta\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_isLong\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pluginTransfer\",\"inputs\":[{\"name\":\"_token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_receiver\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"plugins\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removePlugin\",\"inputs\":[{\"name\":\"_plugin\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGov\",\"inputs\":[{\"name\":\"_gov\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"swap\",\"inputs\":[{\"name\":\"_path\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_amountIn\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minOut\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_receiver\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"swapETHToTokens\",\"inputs\":[{\"name\":\"_path\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_minOut\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_receiver\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"swapTokensToETH\",\"inputs\":[{\"name\":\"_path\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_amountIn\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minOut\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_receiver\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"usdg\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"vault\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"weth\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Swap\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"tokenIn\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"tokenOut\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amountIn\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"amountOut\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false}]",
}
RouterMetaData contains all meta data concerning the Router contract.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct { RouterCaller // Read-only binding to the contract RouterTransactor // Write-only binding to the contract RouterFilterer // Log filterer for contract events }
Router is an auto generated Go binding around an Ethereum contract.
type RouterCaller ¶
type RouterCaller struct {
// contains filtered or unexported fields
}
RouterCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewRouterCaller ¶
func NewRouterCaller(address common.Address, caller bind.ContractCaller) (*RouterCaller, error)
NewRouterCaller creates a new read-only instance of Router, bound to a specific deployed contract.
func (*RouterCaller) ApprovedPlugins ¶
func (_Router *RouterCaller) ApprovedPlugins(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (bool, error)
ApprovedPlugins is a free data retrieval call binding the contract method 0x956f285e.
Solidity: function approvedPlugins(address , address ) view returns(bool)
func (*RouterCaller) Gov ¶
Gov is a free data retrieval call binding the contract method 0x12d43a51.
Solidity: function gov() view returns(address)
func (*RouterCaller) Plugins ¶
Plugins is a free data retrieval call binding the contract method 0x4b12e643.
Solidity: function plugins(address ) view returns(bool)
func (*RouterCaller) Usdg ¶
Usdg is a free data retrieval call binding the contract method 0xf5b91b7b.
Solidity: function usdg() view returns(address)
type RouterCallerRaw ¶
type RouterCallerRaw struct {
Contract *RouterCaller // Generic read-only contract binding to access the raw methods on
}
RouterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*RouterCallerRaw) Call ¶
func (_Router *RouterCallerRaw) 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 RouterCallerSession ¶
type RouterCallerSession struct { Contract *RouterCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
RouterCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*RouterCallerSession) ApprovedPlugins ¶
func (_Router *RouterCallerSession) ApprovedPlugins(arg0 common.Address, arg1 common.Address) (bool, error)
ApprovedPlugins is a free data retrieval call binding the contract method 0x956f285e.
Solidity: function approvedPlugins(address , address ) view returns(bool)
func (*RouterCallerSession) Gov ¶
func (_Router *RouterCallerSession) Gov() (common.Address, error)
Gov is a free data retrieval call binding the contract method 0x12d43a51.
Solidity: function gov() view returns(address)
func (*RouterCallerSession) Plugins ¶
func (_Router *RouterCallerSession) Plugins(arg0 common.Address) (bool, error)
Plugins is a free data retrieval call binding the contract method 0x4b12e643.
Solidity: function plugins(address ) view returns(bool)
func (*RouterCallerSession) Usdg ¶
func (_Router *RouterCallerSession) Usdg() (common.Address, error)
Usdg is a free data retrieval call binding the contract method 0xf5b91b7b.
Solidity: function usdg() view returns(address)
type RouterFilterer ¶
type RouterFilterer struct {
// contains filtered or unexported fields
}
RouterFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewRouterFilterer ¶
func NewRouterFilterer(address common.Address, filterer bind.ContractFilterer) (*RouterFilterer, error)
NewRouterFilterer creates a new log filterer instance of Router, bound to a specific deployed contract.
func (*RouterFilterer) FilterSwap ¶
func (_Router *RouterFilterer) FilterSwap(opts *bind.FilterOpts) (*RouterSwapIterator, error)
FilterSwap is a free log retrieval operation binding the contract event 0xcd3829a3813dc3cdd188fd3d01dcf3268c16be2fdd2dd21d0665418816e46062.
Solidity: event Swap(address account, address tokenIn, address tokenOut, uint256 amountIn, uint256 amountOut)
func (*RouterFilterer) ParseSwap ¶
func (_Router *RouterFilterer) ParseSwap(log types.Log) (*RouterSwap, error)
ParseSwap is a log parse operation binding the contract event 0xcd3829a3813dc3cdd188fd3d01dcf3268c16be2fdd2dd21d0665418816e46062.
Solidity: event Swap(address account, address tokenIn, address tokenOut, uint256 amountIn, uint256 amountOut)
func (*RouterFilterer) WatchSwap ¶
func (_Router *RouterFilterer) WatchSwap(opts *bind.WatchOpts, sink chan<- *RouterSwap) (event.Subscription, error)
WatchSwap is a free log subscription operation binding the contract event 0xcd3829a3813dc3cdd188fd3d01dcf3268c16be2fdd2dd21d0665418816e46062.
Solidity: event Swap(address account, address tokenIn, address tokenOut, uint256 amountIn, uint256 amountOut)
type RouterRaw ¶
type RouterRaw struct {
Contract *Router // Generic contract binding to access the raw methods on
}
RouterRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*RouterRaw) Call ¶
func (_Router *RouterRaw) 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 (*RouterRaw) Transact ¶
func (_Router *RouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*RouterRaw) Transfer ¶
func (_Router *RouterRaw) 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 RouterSession ¶
type RouterSession struct { Contract *Router // 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 }
RouterSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*RouterSession) AddPlugin ¶
func (_Router *RouterSession) AddPlugin(_plugin common.Address) (*types.Transaction, error)
AddPlugin is a paid mutator transaction binding the contract method 0xd8867fc8.
Solidity: function addPlugin(address _plugin) returns()
func (*RouterSession) ApprovePlugin ¶
func (_Router *RouterSession) ApprovePlugin(_plugin common.Address) (*types.Transaction, error)
ApprovePlugin is a paid mutator transaction binding the contract method 0x38c74dd9.
Solidity: function approvePlugin(address _plugin) returns()
func (*RouterSession) ApprovedPlugins ¶
func (_Router *RouterSession) ApprovedPlugins(arg0 common.Address, arg1 common.Address) (bool, error)
ApprovedPlugins is a free data retrieval call binding the contract method 0x956f285e.
Solidity: function approvedPlugins(address , address ) view returns(bool)
func (*RouterSession) DecreasePosition ¶
func (_Router *RouterSession) DecreasePosition(_collateralToken common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int) (*types.Transaction, error)
DecreasePosition is a paid mutator transaction binding the contract method 0x90205d8c.
Solidity: function decreasePosition(address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price) returns()
func (*RouterSession) DecreasePositionAndSwap ¶
func (_Router *RouterSession) DecreasePositionAndSwap(_path []common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int, _minOut *big.Int) (*types.Transaction, error)
DecreasePositionAndSwap is a paid mutator transaction binding the contract method 0x5fc8500e.
Solidity: function decreasePositionAndSwap(address[] _path, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price, uint256 _minOut) returns()
func (*RouterSession) DecreasePositionAndSwapETH ¶
func (_Router *RouterSession) DecreasePositionAndSwapETH(_path []common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int, _minOut *big.Int) (*types.Transaction, error)
DecreasePositionAndSwapETH is a paid mutator transaction binding the contract method 0x3039e37f.
Solidity: function decreasePositionAndSwapETH(address[] _path, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price, uint256 _minOut) returns()
func (*RouterSession) DecreasePositionETH ¶
func (_Router *RouterSession) DecreasePositionETH(_collateralToken common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int) (*types.Transaction, error)
DecreasePositionETH is a paid mutator transaction binding the contract method 0x430ed37c.
Solidity: function decreasePositionETH(address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price) returns()
func (*RouterSession) DenyPlugin ¶
func (_Router *RouterSession) DenyPlugin(_plugin common.Address) (*types.Transaction, error)
DenyPlugin is a paid mutator transaction binding the contract method 0xcedd4375.
Solidity: function denyPlugin(address _plugin) returns()
func (*RouterSession) DirectPoolDeposit ¶
func (_Router *RouterSession) DirectPoolDeposit(_token common.Address, _amount *big.Int) (*types.Transaction, error)
DirectPoolDeposit is a paid mutator transaction binding the contract method 0x90b64ad3.
Solidity: function directPoolDeposit(address _token, uint256 _amount) returns()
func (*RouterSession) Gov ¶
func (_Router *RouterSession) Gov() (common.Address, error)
Gov is a free data retrieval call binding the contract method 0x12d43a51.
Solidity: function gov() view returns(address)
func (*RouterSession) IncreasePosition ¶
func (_Router *RouterSession) IncreasePosition(_path []common.Address, _indexToken common.Address, _amountIn *big.Int, _minOut *big.Int, _sizeDelta *big.Int, _isLong bool, _price *big.Int) (*types.Transaction, error)
IncreasePosition is a paid mutator transaction binding the contract method 0xb7ddc992.
Solidity: function increasePosition(address[] _path, address _indexToken, uint256 _amountIn, uint256 _minOut, uint256 _sizeDelta, bool _isLong, uint256 _price) returns()
func (*RouterSession) IncreasePositionETH ¶
func (_Router *RouterSession) IncreasePositionETH(_path []common.Address, _indexToken common.Address, _minOut *big.Int, _sizeDelta *big.Int, _isLong bool, _price *big.Int) (*types.Transaction, error)
IncreasePositionETH is a paid mutator transaction binding the contract method 0xb32755de.
Solidity: function increasePositionETH(address[] _path, address _indexToken, uint256 _minOut, uint256 _sizeDelta, bool _isLong, uint256 _price) payable returns()
func (*RouterSession) PluginDecreasePosition ¶
func (_Router *RouterSession) PluginDecreasePosition(_account common.Address, _collateralToken common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address) (*types.Transaction, error)
PluginDecreasePosition is a paid mutator transaction binding the contract method 0x2662166b.
Solidity: function pluginDecreasePosition(address _account, address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver) returns(uint256)
func (*RouterSession) PluginIncreasePosition ¶
func (_Router *RouterSession) PluginIncreasePosition(_account common.Address, _collateralToken common.Address, _indexToken common.Address, _sizeDelta *big.Int, _isLong bool) (*types.Transaction, error)
PluginIncreasePosition is a paid mutator transaction binding the contract method 0x1f1dd176.
Solidity: function pluginIncreasePosition(address _account, address _collateralToken, address _indexToken, uint256 _sizeDelta, bool _isLong) returns()
func (*RouterSession) PluginTransfer ¶
func (_Router *RouterSession) PluginTransfer(_token common.Address, _account common.Address, _receiver common.Address, _amount *big.Int) (*types.Transaction, error)
PluginTransfer is a paid mutator transaction binding the contract method 0x1b827878.
Solidity: function pluginTransfer(address _token, address _account, address _receiver, uint256 _amount) returns()
func (*RouterSession) Plugins ¶
func (_Router *RouterSession) Plugins(arg0 common.Address) (bool, error)
Plugins is a free data retrieval call binding the contract method 0x4b12e643.
Solidity: function plugins(address ) view returns(bool)
func (*RouterSession) Receive ¶
func (_Router *RouterSession) Receive() (*types.Transaction, error)
Receive is a paid mutator transaction binding the contract receive function.
Solidity: receive() payable returns()
func (*RouterSession) RemovePlugin ¶
func (_Router *RouterSession) RemovePlugin(_plugin common.Address) (*types.Transaction, error)
RemovePlugin is a paid mutator transaction binding the contract method 0xa4d95b64.
Solidity: function removePlugin(address _plugin) returns()
func (*RouterSession) SetGov ¶
func (_Router *RouterSession) SetGov(_gov common.Address) (*types.Transaction, error)
SetGov is a paid mutator transaction binding the contract method 0xcfad57a2.
Solidity: function setGov(address _gov) returns()
func (*RouterSession) Swap ¶
func (_Router *RouterSession) Swap(_path []common.Address, _amountIn *big.Int, _minOut *big.Int, _receiver common.Address) (*types.Transaction, error)
Swap is a paid mutator transaction binding the contract method 0x6023e966.
Solidity: function swap(address[] _path, uint256 _amountIn, uint256 _minOut, address _receiver) returns()
func (*RouterSession) SwapETHToTokens ¶
func (_Router *RouterSession) SwapETHToTokens(_path []common.Address, _minOut *big.Int, _receiver common.Address) (*types.Transaction, error)
SwapETHToTokens is a paid mutator transaction binding the contract method 0xabe68eaa.
Solidity: function swapETHToTokens(address[] _path, uint256 _minOut, address _receiver) payable returns()
func (*RouterSession) SwapTokensToETH ¶
func (_Router *RouterSession) SwapTokensToETH(_path []common.Address, _amountIn *big.Int, _minOut *big.Int, _receiver common.Address) (*types.Transaction, error)
SwapTokensToETH is a paid mutator transaction binding the contract method 0x2d4ba6a7.
Solidity: function swapTokensToETH(address[] _path, uint256 _amountIn, uint256 _minOut, address _receiver) returns()
func (*RouterSession) Usdg ¶
func (_Router *RouterSession) Usdg() (common.Address, error)
Usdg is a free data retrieval call binding the contract method 0xf5b91b7b.
Solidity: function usdg() view returns(address)
type RouterSwap ¶
type RouterSwap struct { Account common.Address TokenIn common.Address TokenOut common.Address AmountIn *big.Int AmountOut *big.Int Raw types.Log // Blockchain specific contextual infos }
RouterSwap represents a Swap event raised by the Router contract.
type RouterSwapIterator ¶
type RouterSwapIterator struct { Event *RouterSwap // Event containing the contract specifics and raw log // contains filtered or unexported fields }
RouterSwapIterator is returned from FilterSwap and is used to iterate over the raw logs and unpacked data for Swap events raised by the Router contract.
func (*RouterSwapIterator) Close ¶
func (it *RouterSwapIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*RouterSwapIterator) Error ¶
func (it *RouterSwapIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*RouterSwapIterator) Next ¶
func (it *RouterSwapIterator) 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 RouterTransactor ¶
type RouterTransactor struct {
// contains filtered or unexported fields
}
RouterTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewRouterTransactor ¶
func NewRouterTransactor(address common.Address, transactor bind.ContractTransactor) (*RouterTransactor, error)
NewRouterTransactor creates a new write-only instance of Router, bound to a specific deployed contract.
func (*RouterTransactor) AddPlugin ¶
func (_Router *RouterTransactor) AddPlugin(opts *bind.TransactOpts, _plugin common.Address) (*types.Transaction, error)
AddPlugin is a paid mutator transaction binding the contract method 0xd8867fc8.
Solidity: function addPlugin(address _plugin) returns()
func (*RouterTransactor) ApprovePlugin ¶
func (_Router *RouterTransactor) ApprovePlugin(opts *bind.TransactOpts, _plugin common.Address) (*types.Transaction, error)
ApprovePlugin is a paid mutator transaction binding the contract method 0x38c74dd9.
Solidity: function approvePlugin(address _plugin) returns()
func (*RouterTransactor) DecreasePosition ¶
func (_Router *RouterTransactor) DecreasePosition(opts *bind.TransactOpts, _collateralToken common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int) (*types.Transaction, error)
DecreasePosition is a paid mutator transaction binding the contract method 0x90205d8c.
Solidity: function decreasePosition(address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price) returns()
func (*RouterTransactor) DecreasePositionAndSwap ¶
func (_Router *RouterTransactor) DecreasePositionAndSwap(opts *bind.TransactOpts, _path []common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int, _minOut *big.Int) (*types.Transaction, error)
DecreasePositionAndSwap is a paid mutator transaction binding the contract method 0x5fc8500e.
Solidity: function decreasePositionAndSwap(address[] _path, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price, uint256 _minOut) returns()
func (*RouterTransactor) DecreasePositionAndSwapETH ¶
func (_Router *RouterTransactor) DecreasePositionAndSwapETH(opts *bind.TransactOpts, _path []common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int, _minOut *big.Int) (*types.Transaction, error)
DecreasePositionAndSwapETH is a paid mutator transaction binding the contract method 0x3039e37f.
Solidity: function decreasePositionAndSwapETH(address[] _path, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price, uint256 _minOut) returns()
func (*RouterTransactor) DecreasePositionETH ¶
func (_Router *RouterTransactor) DecreasePositionETH(opts *bind.TransactOpts, _collateralToken common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int) (*types.Transaction, error)
DecreasePositionETH is a paid mutator transaction binding the contract method 0x430ed37c.
Solidity: function decreasePositionETH(address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price) returns()
func (*RouterTransactor) DenyPlugin ¶
func (_Router *RouterTransactor) DenyPlugin(opts *bind.TransactOpts, _plugin common.Address) (*types.Transaction, error)
DenyPlugin is a paid mutator transaction binding the contract method 0xcedd4375.
Solidity: function denyPlugin(address _plugin) returns()
func (*RouterTransactor) DirectPoolDeposit ¶
func (_Router *RouterTransactor) DirectPoolDeposit(opts *bind.TransactOpts, _token common.Address, _amount *big.Int) (*types.Transaction, error)
DirectPoolDeposit is a paid mutator transaction binding the contract method 0x90b64ad3.
Solidity: function directPoolDeposit(address _token, uint256 _amount) returns()
func (*RouterTransactor) IncreasePosition ¶
func (_Router *RouterTransactor) IncreasePosition(opts *bind.TransactOpts, _path []common.Address, _indexToken common.Address, _amountIn *big.Int, _minOut *big.Int, _sizeDelta *big.Int, _isLong bool, _price *big.Int) (*types.Transaction, error)
IncreasePosition is a paid mutator transaction binding the contract method 0xb7ddc992.
Solidity: function increasePosition(address[] _path, address _indexToken, uint256 _amountIn, uint256 _minOut, uint256 _sizeDelta, bool _isLong, uint256 _price) returns()
func (*RouterTransactor) IncreasePositionETH ¶
func (_Router *RouterTransactor) IncreasePositionETH(opts *bind.TransactOpts, _path []common.Address, _indexToken common.Address, _minOut *big.Int, _sizeDelta *big.Int, _isLong bool, _price *big.Int) (*types.Transaction, error)
IncreasePositionETH is a paid mutator transaction binding the contract method 0xb32755de.
Solidity: function increasePositionETH(address[] _path, address _indexToken, uint256 _minOut, uint256 _sizeDelta, bool _isLong, uint256 _price) payable returns()
func (*RouterTransactor) PluginDecreasePosition ¶
func (_Router *RouterTransactor) PluginDecreasePosition(opts *bind.TransactOpts, _account common.Address, _collateralToken common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address) (*types.Transaction, error)
PluginDecreasePosition is a paid mutator transaction binding the contract method 0x2662166b.
Solidity: function pluginDecreasePosition(address _account, address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver) returns(uint256)
func (*RouterTransactor) PluginIncreasePosition ¶
func (_Router *RouterTransactor) PluginIncreasePosition(opts *bind.TransactOpts, _account common.Address, _collateralToken common.Address, _indexToken common.Address, _sizeDelta *big.Int, _isLong bool) (*types.Transaction, error)
PluginIncreasePosition is a paid mutator transaction binding the contract method 0x1f1dd176.
Solidity: function pluginIncreasePosition(address _account, address _collateralToken, address _indexToken, uint256 _sizeDelta, bool _isLong) returns()
func (*RouterTransactor) PluginTransfer ¶
func (_Router *RouterTransactor) PluginTransfer(opts *bind.TransactOpts, _token common.Address, _account common.Address, _receiver common.Address, _amount *big.Int) (*types.Transaction, error)
PluginTransfer is a paid mutator transaction binding the contract method 0x1b827878.
Solidity: function pluginTransfer(address _token, address _account, address _receiver, uint256 _amount) returns()
func (*RouterTransactor) Receive ¶
func (_Router *RouterTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error)
Receive is a paid mutator transaction binding the contract receive function.
Solidity: receive() payable returns()
func (*RouterTransactor) RemovePlugin ¶
func (_Router *RouterTransactor) RemovePlugin(opts *bind.TransactOpts, _plugin common.Address) (*types.Transaction, error)
RemovePlugin is a paid mutator transaction binding the contract method 0xa4d95b64.
Solidity: function removePlugin(address _plugin) returns()
func (*RouterTransactor) SetGov ¶
func (_Router *RouterTransactor) SetGov(opts *bind.TransactOpts, _gov common.Address) (*types.Transaction, error)
SetGov is a paid mutator transaction binding the contract method 0xcfad57a2.
Solidity: function setGov(address _gov) returns()
func (*RouterTransactor) Swap ¶
func (_Router *RouterTransactor) Swap(opts *bind.TransactOpts, _path []common.Address, _amountIn *big.Int, _minOut *big.Int, _receiver common.Address) (*types.Transaction, error)
Swap is a paid mutator transaction binding the contract method 0x6023e966.
Solidity: function swap(address[] _path, uint256 _amountIn, uint256 _minOut, address _receiver) returns()
func (*RouterTransactor) SwapETHToTokens ¶
func (_Router *RouterTransactor) SwapETHToTokens(opts *bind.TransactOpts, _path []common.Address, _minOut *big.Int, _receiver common.Address) (*types.Transaction, error)
SwapETHToTokens is a paid mutator transaction binding the contract method 0xabe68eaa.
Solidity: function swapETHToTokens(address[] _path, uint256 _minOut, address _receiver) payable returns()
func (*RouterTransactor) SwapTokensToETH ¶
func (_Router *RouterTransactor) SwapTokensToETH(opts *bind.TransactOpts, _path []common.Address, _amountIn *big.Int, _minOut *big.Int, _receiver common.Address) (*types.Transaction, error)
SwapTokensToETH is a paid mutator transaction binding the contract method 0x2d4ba6a7.
Solidity: function swapTokensToETH(address[] _path, uint256 _amountIn, uint256 _minOut, address _receiver) returns()
type RouterTransactorRaw ¶
type RouterTransactorRaw struct {
Contract *RouterTransactor // Generic write-only contract binding to access the raw methods on
}
RouterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*RouterTransactorRaw) Transact ¶
func (_Router *RouterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*RouterTransactorRaw) Transfer ¶
func (_Router *RouterTransactorRaw) 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 RouterTransactorSession ¶
type RouterTransactorSession struct { Contract *RouterTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
RouterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*RouterTransactorSession) AddPlugin ¶
func (_Router *RouterTransactorSession) AddPlugin(_plugin common.Address) (*types.Transaction, error)
AddPlugin is a paid mutator transaction binding the contract method 0xd8867fc8.
Solidity: function addPlugin(address _plugin) returns()
func (*RouterTransactorSession) ApprovePlugin ¶
func (_Router *RouterTransactorSession) ApprovePlugin(_plugin common.Address) (*types.Transaction, error)
ApprovePlugin is a paid mutator transaction binding the contract method 0x38c74dd9.
Solidity: function approvePlugin(address _plugin) returns()
func (*RouterTransactorSession) DecreasePosition ¶
func (_Router *RouterTransactorSession) DecreasePosition(_collateralToken common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int) (*types.Transaction, error)
DecreasePosition is a paid mutator transaction binding the contract method 0x90205d8c.
Solidity: function decreasePosition(address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price) returns()
func (*RouterTransactorSession) DecreasePositionAndSwap ¶
func (_Router *RouterTransactorSession) DecreasePositionAndSwap(_path []common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int, _minOut *big.Int) (*types.Transaction, error)
DecreasePositionAndSwap is a paid mutator transaction binding the contract method 0x5fc8500e.
Solidity: function decreasePositionAndSwap(address[] _path, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price, uint256 _minOut) returns()
func (*RouterTransactorSession) DecreasePositionAndSwapETH ¶
func (_Router *RouterTransactorSession) DecreasePositionAndSwapETH(_path []common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int, _minOut *big.Int) (*types.Transaction, error)
DecreasePositionAndSwapETH is a paid mutator transaction binding the contract method 0x3039e37f.
Solidity: function decreasePositionAndSwapETH(address[] _path, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price, uint256 _minOut) returns()
func (*RouterTransactorSession) DecreasePositionETH ¶
func (_Router *RouterTransactorSession) DecreasePositionETH(_collateralToken common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address, _price *big.Int) (*types.Transaction, error)
DecreasePositionETH is a paid mutator transaction binding the contract method 0x430ed37c.
Solidity: function decreasePositionETH(address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver, uint256 _price) returns()
func (*RouterTransactorSession) DenyPlugin ¶
func (_Router *RouterTransactorSession) DenyPlugin(_plugin common.Address) (*types.Transaction, error)
DenyPlugin is a paid mutator transaction binding the contract method 0xcedd4375.
Solidity: function denyPlugin(address _plugin) returns()
func (*RouterTransactorSession) DirectPoolDeposit ¶
func (_Router *RouterTransactorSession) DirectPoolDeposit(_token common.Address, _amount *big.Int) (*types.Transaction, error)
DirectPoolDeposit is a paid mutator transaction binding the contract method 0x90b64ad3.
Solidity: function directPoolDeposit(address _token, uint256 _amount) returns()
func (*RouterTransactorSession) IncreasePosition ¶
func (_Router *RouterTransactorSession) IncreasePosition(_path []common.Address, _indexToken common.Address, _amountIn *big.Int, _minOut *big.Int, _sizeDelta *big.Int, _isLong bool, _price *big.Int) (*types.Transaction, error)
IncreasePosition is a paid mutator transaction binding the contract method 0xb7ddc992.
Solidity: function increasePosition(address[] _path, address _indexToken, uint256 _amountIn, uint256 _minOut, uint256 _sizeDelta, bool _isLong, uint256 _price) returns()
func (*RouterTransactorSession) IncreasePositionETH ¶
func (_Router *RouterTransactorSession) IncreasePositionETH(_path []common.Address, _indexToken common.Address, _minOut *big.Int, _sizeDelta *big.Int, _isLong bool, _price *big.Int) (*types.Transaction, error)
IncreasePositionETH is a paid mutator transaction binding the contract method 0xb32755de.
Solidity: function increasePositionETH(address[] _path, address _indexToken, uint256 _minOut, uint256 _sizeDelta, bool _isLong, uint256 _price) payable returns()
func (*RouterTransactorSession) PluginDecreasePosition ¶
func (_Router *RouterTransactorSession) PluginDecreasePosition(_account common.Address, _collateralToken common.Address, _indexToken common.Address, _collateralDelta *big.Int, _sizeDelta *big.Int, _isLong bool, _receiver common.Address) (*types.Transaction, error)
PluginDecreasePosition is a paid mutator transaction binding the contract method 0x2662166b.
Solidity: function pluginDecreasePosition(address _account, address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver) returns(uint256)
func (*RouterTransactorSession) PluginIncreasePosition ¶
func (_Router *RouterTransactorSession) PluginIncreasePosition(_account common.Address, _collateralToken common.Address, _indexToken common.Address, _sizeDelta *big.Int, _isLong bool) (*types.Transaction, error)
PluginIncreasePosition is a paid mutator transaction binding the contract method 0x1f1dd176.
Solidity: function pluginIncreasePosition(address _account, address _collateralToken, address _indexToken, uint256 _sizeDelta, bool _isLong) returns()
func (*RouterTransactorSession) PluginTransfer ¶
func (_Router *RouterTransactorSession) PluginTransfer(_token common.Address, _account common.Address, _receiver common.Address, _amount *big.Int) (*types.Transaction, error)
PluginTransfer is a paid mutator transaction binding the contract method 0x1b827878.
Solidity: function pluginTransfer(address _token, address _account, address _receiver, uint256 _amount) returns()
func (*RouterTransactorSession) Receive ¶
func (_Router *RouterTransactorSession) Receive() (*types.Transaction, error)
Receive is a paid mutator transaction binding the contract receive function.
Solidity: receive() payable returns()
func (*RouterTransactorSession) RemovePlugin ¶
func (_Router *RouterTransactorSession) RemovePlugin(_plugin common.Address) (*types.Transaction, error)
RemovePlugin is a paid mutator transaction binding the contract method 0xa4d95b64.
Solidity: function removePlugin(address _plugin) returns()
func (*RouterTransactorSession) SetGov ¶
func (_Router *RouterTransactorSession) SetGov(_gov common.Address) (*types.Transaction, error)
SetGov is a paid mutator transaction binding the contract method 0xcfad57a2.
Solidity: function setGov(address _gov) returns()
func (*RouterTransactorSession) Swap ¶
func (_Router *RouterTransactorSession) Swap(_path []common.Address, _amountIn *big.Int, _minOut *big.Int, _receiver common.Address) (*types.Transaction, error)
Swap is a paid mutator transaction binding the contract method 0x6023e966.
Solidity: function swap(address[] _path, uint256 _amountIn, uint256 _minOut, address _receiver) returns()
func (*RouterTransactorSession) SwapETHToTokens ¶
func (_Router *RouterTransactorSession) SwapETHToTokens(_path []common.Address, _minOut *big.Int, _receiver common.Address) (*types.Transaction, error)
SwapETHToTokens is a paid mutator transaction binding the contract method 0xabe68eaa.
Solidity: function swapETHToTokens(address[] _path, uint256 _minOut, address _receiver) payable returns()
func (*RouterTransactorSession) SwapTokensToETH ¶
func (_Router *RouterTransactorSession) SwapTokensToETH(_path []common.Address, _amountIn *big.Int, _minOut *big.Int, _receiver common.Address) (*types.Transaction, error)
SwapTokensToETH is a paid mutator transaction binding the contract method 0x2d4ba6a7.
Solidity: function swapTokensToETH(address[] _path, uint256 _amountIn, uint256 _minOut, address _receiver) returns()