vault

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VaultABI = VaultMetaData.ABI

VaultABI is the input ABI used to generate the binding from. Deprecated: Use VaultMetaData.ABI instead.

View Source
var VaultBin = VaultMetaData.Bin

VaultBin is the compiled bytecode used for deploying new contracts. Deprecated: Use VaultMetaData.Bin instead.

View Source
var VaultMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectValue\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"required\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"NotOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"authorizer\",\"outputs\":[{\"internalType\":\"contractIAuthorize\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"balancesOfTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIAuthorize\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"setAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
	Bin: "0x60a060405234801562000010575f80fd5b50604051620015d9380380620015d98339818101604052810190620000369190620000dd565b60015f819055508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010d565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620000a7826200007c565b9050919050565b620000b9816200009b565b8114620000c4575f80fd5b50565b5f81519050620000d781620000ae565b92915050565b5f60208284031215620000f557620000f462000078565b5b5f6200010484828501620000c7565b91505092915050565b6080516114ac6200012d5f395f81816101b601526104e601526114ac5ff3fe608060405260043610610073575f3560e01c8063a568e4211161004d578063a568e421146100ea578063d09edf3114610126578063f3fef3a314610150578063f7888aec146101785761007a565b8063058a628f1461007c57806347e7ef24146100a45780638da5cb5b146100c05761007a565b3661007a57005b005b348015610087575f80fd5b506100a2600480360381019061009d9190610e47565b6101b4565b005b6100be60048036038101906100b99190610ecf565b610287565b005b3480156100cb575f80fd5b506100d46104e4565b6040516100e19190610f1c565b60405180910390f35b3480156100f5575f80fd5b50610110600480360381019061010b9190610f96565b610508565b60405161011d91906110aa565b60405180910390f35b348015610131575f80fd5b5061013a610644565b6040516101479190611125565b60405180910390f35b34801561015b575f80fd5b5061017660048036038101906101719190610ecf565b610669565b005b348015610183575f80fd5b5061019e6004803603810190610199919061113e565b6109c0565b6040516101ab919061118b565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461024457336040517f245aecd300000000000000000000000000000000000000000000000000000000815260040161023b9190610f1c565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610386578034146102f3576040517fd2ade55600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461037a91906111d1565b9250508190555061047b565b5f34146103bf576040517fd2ade55600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103ec3330838573ffffffffffffffffffffffffffffffffffffffff16610a42909392919063ffffffff16565b8060015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461047391906111d1565b925050819055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8752a472e571a816aea92eec8dae9baf628e840f4929fbcc2d155e6233ff68a7836040516104d8919061118b565b60405180910390a35050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60605f8383905067ffffffffffffffff81111561052857610527611204565b5b6040519080825280602002602001820160405280156105565781602001602082028036833780820191505090505b5090505f5b848490508110156106385760015f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8686848181106105b7576105b6611231565b5b90506020020160208101906105cc919061125e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205482828151811061061957610618611231565b5b602002602001018181525050808061063090611289565b91505061055b565b50809150509392505050565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610671610ac4565b5f60015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610736578282826040517fdb42144d00000000000000000000000000000000000000000000000000000000815260040161072d939291906112d0565b60405180910390fd5b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166347c359103385856040518463ffffffff1660e01b815260040161079493929190611305565b602060405180830381865afa1580156107af573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d3919061136f565b610818573383836040517f431ef61600000000000000000000000000000000000000000000000000000000815260040161080f93929190611305565b60405180910390fd5b8160015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461089f919061139a565b925050819055505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610922573373ffffffffffffffffffffffffffffffffffffffff166108fc8390811502906040515f60405180830381858888f1935050505015801561091c573d5f803e3d5ffd5b5061094e565b61094d33838573ffffffffffffffffffffffffffffffffffffffff16610b089092919063ffffffff16565b5b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb846040516109ab919061118b565b60405180910390a3506109bc610b87565b5050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610abe848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401610a7793929190611305565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610b90565b50505050565b60025f5403610aff576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f81905550565b610b82838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401610b3b9291906113cd565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610b90565b505050565b60015f81905550565b5f610bba828473ffffffffffffffffffffffffffffffffffffffff16610c2590919063ffffffff16565b90505f815114158015610bde575080806020019051810190610bdc919061136f565b155b15610c2057826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401610c179190610f1c565b60405180910390fd5b505050565b6060610c3283835f610c3a565b905092915050565b606081471015610c8157306040517fcd786059000000000000000000000000000000000000000000000000000000008152600401610c789190610f1c565b60405180910390fd5b5f808573ffffffffffffffffffffffffffffffffffffffff168486604051610ca99190611460565b5f6040518083038185875af1925050503d805f8114610ce3576040519150601f19603f3d011682016040523d82523d5f602084013e610ce8565b606091505b5091509150610cf8868383610d03565b925050509392505050565b606082610d1857610d1382610d90565b610d88565b5f8251148015610d3e57505f8473ffffffffffffffffffffffffffffffffffffffff163b145b15610d8057836040517f9996b315000000000000000000000000000000000000000000000000000000008152600401610d779190610f1c565b60405180910390fd5b819050610d89565b5b9392505050565b5f81511115610da25780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e0582610ddc565b9050919050565b5f610e1682610dfb565b9050919050565b610e2681610e0c565b8114610e30575f80fd5b50565b5f81359050610e4181610e1d565b92915050565b5f60208284031215610e5c57610e5b610dd4565b5b5f610e6984828501610e33565b91505092915050565b610e7b81610dfb565b8114610e85575f80fd5b50565b5f81359050610e9681610e72565b92915050565b5f819050919050565b610eae81610e9c565b8114610eb8575f80fd5b50565b5f81359050610ec981610ea5565b92915050565b5f8060408385031215610ee557610ee4610dd4565b5b5f610ef285828601610e88565b9250506020610f0385828601610ebb565b9150509250929050565b610f1681610dfb565b82525050565b5f602082019050610f2f5f830184610f0d565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112610f5657610f55610f35565b5b8235905067ffffffffffffffff811115610f7357610f72610f39565b5b602083019150836020820283011115610f8f57610f8e610f3d565b5b9250929050565b5f805f60408486031215610fad57610fac610dd4565b5b5f610fba86828701610e88565b935050602084013567ffffffffffffffff811115610fdb57610fda610dd8565b5b610fe786828701610f41565b92509250509250925092565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61102581610e9c565b82525050565b5f611036838361101c565b60208301905092915050565b5f602082019050919050565b5f61105882610ff3565b6110628185610ffd565b935061106d8361100d565b805f5b8381101561109d578151611084888261102b565b975061108f83611042565b925050600181019050611070565b5085935050505092915050565b5f6020820190508181035f8301526110c2818461104e565b905092915050565b5f819050919050565b5f6110ed6110e86110e384610ddc565b6110ca565b610ddc565b9050919050565b5f6110fe826110d3565b9050919050565b5f61110f826110f4565b9050919050565b61111f81611105565b82525050565b5f6020820190506111385f830184611116565b92915050565b5f806040838503121561115457611153610dd4565b5b5f61116185828601610e88565b925050602061117285828601610e88565b9150509250929050565b61118581610e9c565b82525050565b5f60208201905061119e5f83018461117c565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6111db82610e9c565b91506111e683610e9c565b92508282019050808211156111fe576111fd6111a4565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561127357611272610dd4565b5b5f61128084828501610e88565b91505092915050565b5f61129382610e9c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036112c5576112c46111a4565b5b600182019050919050565b5f6060820190506112e35f830186610f0d565b6112f0602083018561117c565b6112fd604083018461117c565b949350505050565b5f6060820190506113185f830186610f0d565b6113256020830185610f0d565b611332604083018461117c565b949350505050565b5f8115159050919050565b61134e8161133a565b8114611358575f80fd5b50565b5f8151905061136981611345565b92915050565b5f6020828403121561138457611383610dd4565b5b5f6113918482850161135b565b91505092915050565b5f6113a482610e9c565b91506113af83610e9c565b92508282039050818111156113c7576113c66111a4565b5b92915050565b5f6040820190506113e05f830185610f0d565b6113ed602083018461117c565b9392505050565b5f81519050919050565b5f81905092915050565b5f5b8381101561142557808201518184015260208101905061140a565b5f8484015250505050565b5f61143a826113f4565b61144481856113fe565b9350611454818560208601611408565b80840191505092915050565b5f61146b8284611430565b91508190509291505056fea26469706673582212203cef0f3af1dace722bda0b4e4bfa42198e18a33846525f8de477cb8041bed5f264736f6c63430008140033",
}

VaultMetaData contains all meta data concerning the Vault contract.

Functions

This section is empty.

Types

type Vault

type Vault struct {
	VaultCaller     // Read-only binding to the contract
	VaultTransactor // Write-only binding to the contract
	VaultFilterer   // Log filterer for contract events
}

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

func DeployVault

func DeployVault(auth *bind.TransactOpts, backend bind.ContractBackend, owner_ common.Address) (common.Address, *types.Transaction, *Vault, error)

DeployVault deploys a new Ethereum contract, binding an instance of Vault to it.

func NewVault

func NewVault(address common.Address, backend bind.ContractBackend) (*Vault, error)

NewVault creates a new instance of Vault, bound to a specific deployed contract.

type VaultCaller

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

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

func NewVaultCaller

func NewVaultCaller(address common.Address, caller bind.ContractCaller) (*VaultCaller, error)

NewVaultCaller creates a new read-only instance of Vault, bound to a specific deployed contract.

func (*VaultCaller) Authorizer

func (_Vault *VaultCaller) Authorizer(opts *bind.CallOpts) (common.Address, error)

Authorizer is a free data retrieval call binding the contract method 0xd09edf31.

Solidity: function authorizer() view returns(address)

func (*VaultCaller) BalanceOf

func (_Vault *VaultCaller) BalanceOf(opts *bind.CallOpts, user common.Address, token common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0xf7888aec.

Solidity: function balanceOf(address user, address token) view returns(uint256)

func (*VaultCaller) BalancesOfTokens

func (_Vault *VaultCaller) BalancesOfTokens(opts *bind.CallOpts, user common.Address, tokens []common.Address) ([]*big.Int, error)

BalancesOfTokens is a free data retrieval call binding the contract method 0xa568e421.

Solidity: function balancesOfTokens(address user, address[] tokens) view returns(uint256[])

func (*VaultCaller) Owner

func (_Vault *VaultCaller) Owner(opts *bind.CallOpts) (common.Address, error)

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

Solidity: function owner() view returns(address)

type VaultCallerRaw

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

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

func (*VaultCallerRaw) Call

func (_Vault *VaultCallerRaw) 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 VaultCallerSession

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

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

func (*VaultCallerSession) Authorizer

func (_Vault *VaultCallerSession) Authorizer() (common.Address, error)

Authorizer is a free data retrieval call binding the contract method 0xd09edf31.

Solidity: function authorizer() view returns(address)

func (*VaultCallerSession) BalanceOf

func (_Vault *VaultCallerSession) BalanceOf(user common.Address, token common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0xf7888aec.

Solidity: function balanceOf(address user, address token) view returns(uint256)

func (*VaultCallerSession) BalancesOfTokens

func (_Vault *VaultCallerSession) BalancesOfTokens(user common.Address, tokens []common.Address) ([]*big.Int, error)

BalancesOfTokens is a free data retrieval call binding the contract method 0xa568e421.

Solidity: function balancesOfTokens(address user, address[] tokens) view returns(uint256[])

func (*VaultCallerSession) Owner

func (_Vault *VaultCallerSession) Owner() (common.Address, error)

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

Solidity: function owner() view returns(address)

type VaultDeposited

type VaultDeposited struct {
	User   common.Address
	Token  common.Address
	Amount *big.Int
	Raw    types.Log // Blockchain specific contextual infos
}

VaultDeposited represents a Deposited event raised by the Vault contract.

type VaultDepositedIterator

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

VaultDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the Vault contract.

func (*VaultDepositedIterator) Close

func (it *VaultDepositedIterator) Close() error

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

func (*VaultDepositedIterator) Error

func (it *VaultDepositedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*VaultDepositedIterator) Next

func (it *VaultDepositedIterator) 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 VaultFilterer

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

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

func NewVaultFilterer

func NewVaultFilterer(address common.Address, filterer bind.ContractFilterer) (*VaultFilterer, error)

NewVaultFilterer creates a new log filterer instance of Vault, bound to a specific deployed contract.

func (*VaultFilterer) FilterDeposited

func (_Vault *VaultFilterer) FilterDeposited(opts *bind.FilterOpts, user []common.Address, token []common.Address) (*VaultDepositedIterator, error)

FilterDeposited is a free log retrieval operation binding the contract event 0x8752a472e571a816aea92eec8dae9baf628e840f4929fbcc2d155e6233ff68a7.

Solidity: event Deposited(address indexed user, address indexed token, uint256 amount)

func (*VaultFilterer) FilterWithdrawn

func (_Vault *VaultFilterer) FilterWithdrawn(opts *bind.FilterOpts, user []common.Address, token []common.Address) (*VaultWithdrawnIterator, error)

FilterWithdrawn is a free log retrieval operation binding the contract event 0xd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb.

Solidity: event Withdrawn(address indexed user, address indexed token, uint256 amount)

func (*VaultFilterer) ParseDeposited

func (_Vault *VaultFilterer) ParseDeposited(log types.Log) (*VaultDeposited, error)

ParseDeposited is a log parse operation binding the contract event 0x8752a472e571a816aea92eec8dae9baf628e840f4929fbcc2d155e6233ff68a7.

Solidity: event Deposited(address indexed user, address indexed token, uint256 amount)

func (*VaultFilterer) ParseWithdrawn

func (_Vault *VaultFilterer) ParseWithdrawn(log types.Log) (*VaultWithdrawn, error)

ParseWithdrawn is a log parse operation binding the contract event 0xd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb.

Solidity: event Withdrawn(address indexed user, address indexed token, uint256 amount)

func (*VaultFilterer) WatchDeposited

func (_Vault *VaultFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *VaultDeposited, user []common.Address, token []common.Address) (event.Subscription, error)

WatchDeposited is a free log subscription operation binding the contract event 0x8752a472e571a816aea92eec8dae9baf628e840f4929fbcc2d155e6233ff68a7.

Solidity: event Deposited(address indexed user, address indexed token, uint256 amount)

func (*VaultFilterer) WatchWithdrawn

func (_Vault *VaultFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *VaultWithdrawn, user []common.Address, token []common.Address) (event.Subscription, error)

WatchWithdrawn is a free log subscription operation binding the contract event 0xd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb.

Solidity: event Withdrawn(address indexed user, address indexed token, uint256 amount)

type VaultRaw

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

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

func (*VaultRaw) Call

func (_Vault *VaultRaw) 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 (*VaultRaw) Transact

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

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

func (*VaultRaw) Transfer

func (_Vault *VaultRaw) 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 VaultSession

type VaultSession struct {
	Contract     *Vault            // 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
}

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

func (*VaultSession) Authorizer

func (_Vault *VaultSession) Authorizer() (common.Address, error)

Authorizer is a free data retrieval call binding the contract method 0xd09edf31.

Solidity: function authorizer() view returns(address)

func (*VaultSession) BalanceOf

func (_Vault *VaultSession) BalanceOf(user common.Address, token common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0xf7888aec.

Solidity: function balanceOf(address user, address token) view returns(uint256)

func (*VaultSession) BalancesOfTokens

func (_Vault *VaultSession) BalancesOfTokens(user common.Address, tokens []common.Address) ([]*big.Int, error)

BalancesOfTokens is a free data retrieval call binding the contract method 0xa568e421.

Solidity: function balancesOfTokens(address user, address[] tokens) view returns(uint256[])

func (*VaultSession) Deposit

func (_Vault *VaultSession) Deposit(token common.Address, amount *big.Int) (*types.Transaction, error)

Deposit is a paid mutator transaction binding the contract method 0x47e7ef24.

Solidity: function deposit(address token, uint256 amount) payable returns()

func (*VaultSession) Fallback

func (_Vault *VaultSession) Fallback(calldata []byte) (*types.Transaction, error)

Fallback is a paid mutator transaction binding the contract fallback function.

Solidity: fallback() payable returns()

func (*VaultSession) Owner

func (_Vault *VaultSession) Owner() (common.Address, error)

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

Solidity: function owner() view returns(address)

func (*VaultSession) Receive

func (_Vault *VaultSession) Receive() (*types.Transaction, error)

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

Solidity: receive() payable returns()

func (*VaultSession) SetAuthorizer

func (_Vault *VaultSession) SetAuthorizer(newAuthorizer common.Address) (*types.Transaction, error)

SetAuthorizer is a paid mutator transaction binding the contract method 0x058a628f.

Solidity: function setAuthorizer(address newAuthorizer) returns()

func (*VaultSession) Withdraw

func (_Vault *VaultSession) Withdraw(token common.Address, amount *big.Int) (*types.Transaction, error)

Withdraw is a paid mutator transaction binding the contract method 0xf3fef3a3.

Solidity: function withdraw(address token, uint256 amount) returns()

type VaultTransactor

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

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

func NewVaultTransactor

func NewVaultTransactor(address common.Address, transactor bind.ContractTransactor) (*VaultTransactor, error)

NewVaultTransactor creates a new write-only instance of Vault, bound to a specific deployed contract.

func (*VaultTransactor) Deposit

func (_Vault *VaultTransactor) Deposit(opts *bind.TransactOpts, token common.Address, amount *big.Int) (*types.Transaction, error)

Deposit is a paid mutator transaction binding the contract method 0x47e7ef24.

Solidity: function deposit(address token, uint256 amount) payable returns()

func (*VaultTransactor) Fallback

func (_Vault *VaultTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error)

Fallback is a paid mutator transaction binding the contract fallback function.

Solidity: fallback() payable returns()

func (*VaultTransactor) Receive

func (_Vault *VaultTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error)

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

Solidity: receive() payable returns()

func (*VaultTransactor) SetAuthorizer

func (_Vault *VaultTransactor) SetAuthorizer(opts *bind.TransactOpts, newAuthorizer common.Address) (*types.Transaction, error)

SetAuthorizer is a paid mutator transaction binding the contract method 0x058a628f.

Solidity: function setAuthorizer(address newAuthorizer) returns()

func (*VaultTransactor) Withdraw

func (_Vault *VaultTransactor) Withdraw(opts *bind.TransactOpts, token common.Address, amount *big.Int) (*types.Transaction, error)

Withdraw is a paid mutator transaction binding the contract method 0xf3fef3a3.

Solidity: function withdraw(address token, uint256 amount) returns()

type VaultTransactorRaw

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

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

func (*VaultTransactorRaw) Transact

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

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

func (*VaultTransactorRaw) Transfer

func (_Vault *VaultTransactorRaw) 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 VaultTransactorSession

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

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

func (*VaultTransactorSession) Deposit

func (_Vault *VaultTransactorSession) Deposit(token common.Address, amount *big.Int) (*types.Transaction, error)

Deposit is a paid mutator transaction binding the contract method 0x47e7ef24.

Solidity: function deposit(address token, uint256 amount) payable returns()

func (*VaultTransactorSession) Fallback

func (_Vault *VaultTransactorSession) Fallback(calldata []byte) (*types.Transaction, error)

Fallback is a paid mutator transaction binding the contract fallback function.

Solidity: fallback() payable returns()

func (*VaultTransactorSession) Receive

func (_Vault *VaultTransactorSession) Receive() (*types.Transaction, error)

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

Solidity: receive() payable returns()

func (*VaultTransactorSession) SetAuthorizer

func (_Vault *VaultTransactorSession) SetAuthorizer(newAuthorizer common.Address) (*types.Transaction, error)

SetAuthorizer is a paid mutator transaction binding the contract method 0x058a628f.

Solidity: function setAuthorizer(address newAuthorizer) returns()

func (*VaultTransactorSession) Withdraw

func (_Vault *VaultTransactorSession) Withdraw(token common.Address, amount *big.Int) (*types.Transaction, error)

Withdraw is a paid mutator transaction binding the contract method 0xf3fef3a3.

Solidity: function withdraw(address token, uint256 amount) returns()

type VaultWithdrawn

type VaultWithdrawn struct {
	User   common.Address
	Token  common.Address
	Amount *big.Int
	Raw    types.Log // Blockchain specific contextual infos
}

VaultWithdrawn represents a Withdrawn event raised by the Vault contract.

type VaultWithdrawnIterator

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

VaultWithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the Vault contract.

func (*VaultWithdrawnIterator) Close

func (it *VaultWithdrawnIterator) Close() error

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

func (*VaultWithdrawnIterator) Error

func (it *VaultWithdrawnIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*VaultWithdrawnIterator) Next

func (it *VaultWithdrawnIterator) 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.

Jump to

Keyboard shortcuts

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