vault

package
v0.0.0-...-2da98db Latest Latest
Warning

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

Go to latest
Published: Jul 17, 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\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
	Bin: "0x608060405234801561001057600080fd5b50610904806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806347e7ef2414610046578063c23f001f14610062578063f3fef3a314610092575b600080fd5b610060600480360381019061005b9190610564565b6100ae565b005b61007c600480360381019061007791906105a4565b61024c565b60405161008991906105f3565b60405180910390f35b6100ac60048036038101906100a79190610564565b610271565b005b600081116100f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100e89061066b565b60405180910390fd5b60008290508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b81526004016101339392919061069a565b6020604051808303816000875af1158015610152573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101769190610709565b6101b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ac90610782565b60405180910390fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461024091906107d1565b92505081905550505050565b6000602052816000526040600020602052806000526040600020600091509150505481565b600081116102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab9061066b565b60405180910390fd5b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610372576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036990610851565b60405180910390fd5b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546103fd9190610871565b9250508190555060008290508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b81526004016104449291906108a5565b6020604051808303816000875af1158015610463573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104879190610709565b6104c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104bd90610782565b60405180910390fd5b505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104fb826104d0565b9050919050565b61050b816104f0565b811461051657600080fd5b50565b60008135905061052881610502565b92915050565b6000819050919050565b6105418161052e565b811461054c57600080fd5b50565b60008135905061055e81610538565b92915050565b6000806040838503121561057b5761057a6104cb565b5b600061058985828601610519565b925050602061059a8582860161054f565b9150509250929050565b600080604083850312156105bb576105ba6104cb565b5b60006105c985828601610519565b92505060206105da85828601610519565b9150509250929050565b6105ed8161052e565b82525050565b600060208201905061060860008301846105e4565b92915050565b600082825260208201905092915050565b7f416d6f756e742073686f756c642062652067726561746572207468616e203000600082015250565b6000610655601f8361060e565b91506106608261061f565b602082019050919050565b6000602082019050818103600083015261068481610648565b9050919050565b610694816104f0565b82525050565b60006060820190506106af600083018661068b565b6106bc602083018561068b565b6106c960408301846105e4565b949350505050565b60008115159050919050565b6106e6816106d1565b81146106f157600080fd5b50565b600081519050610703816106dd565b92915050565b60006020828403121561071f5761071e6104cb565b5b600061072d848285016106f4565b91505092915050565b7f5472616e73666572206661696c65640000000000000000000000000000000000600082015250565b600061076c600f8361060e565b915061077782610736565b602082019050919050565b6000602082019050818103600083015261079b8161075f565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006107dc8261052e565b91506107e78361052e565b92508282019050808211156107ff576107fe6107a2565b5b92915050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b600061083b60148361060e565b915061084682610805565b602082019050919050565b6000602082019050818103600083015261086a8161082e565b9050919050565b600061087c8261052e565b91506108878361052e565b925082820390508181111561089f5761089e6107a2565b5b92915050565b60006040820190506108ba600083018561068b565b6108c760208301846105e4565b939250505056fea2646970667358221220a4c5411c946fad1845e3d501f7c432ddc24537e71ab463a59742ccbcc57c107264736f6c63430008150033",
}

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) (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) Balances

func (_Vault *VaultCaller) Balances(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error)

Balances is a free data retrieval call binding the contract method 0xc23f001f.

Solidity: function balances(address , address ) view returns(uint256)

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) Balances

func (_Vault *VaultCallerSession) Balances(arg0 common.Address, arg1 common.Address) (*big.Int, error)

Balances is a free data retrieval call binding the contract method 0xc23f001f.

Solidity: function balances(address , address ) view returns(uint256)

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.

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) Balances

func (_Vault *VaultSession) Balances(arg0 common.Address, arg1 common.Address) (*big.Int, error)

Balances is a free data retrieval call binding the contract method 0xc23f001f.

Solidity: function balances(address , address ) view returns(uint256)

func (*VaultSession) Deposit

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

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

Solidity: function deposit(address tokenAddress, uint256 amount) returns()

func (*VaultSession) Withdraw

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

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

Solidity: function withdraw(address tokenAddress, 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, tokenAddress common.Address, amount *big.Int) (*types.Transaction, error)

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

Solidity: function deposit(address tokenAddress, uint256 amount) returns()

func (*VaultTransactor) Withdraw

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

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

Solidity: function withdraw(address tokenAddress, 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(tokenAddress common.Address, amount *big.Int) (*types.Transaction, error)

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

Solidity: function deposit(address tokenAddress, uint256 amount) returns()

func (*VaultTransactorSession) Withdraw

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

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

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

Jump to

Keyboard shortcuts

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