vrf_consumer_v2

package
v2.4.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VRFConsumerV2ABI = VRFConsumerV2MetaData.ABI
View Source
var VRFConsumerV2Bin = VRFConsumerV2MetaData.Bin
View Source
var VRFConsumerV2MetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"createSubscriptionAndFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"minReqConfs\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"}],\"name\":\"requestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_gasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_requestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_subId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"topUpSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
	Bin: "0x60a060405234801561001057600080fd5b50604051610e8d380380610e8d83398101604081905261002f9161008e565b6001600160601b0319606083901b16608052600280546001600160a01b03199081166001600160a01b0394851617909155600380549290931691161790556100c1565b80516001600160a01b038116811461008957600080fd5b919050565b600080604083850312156100a157600080fd5b6100aa83610072565b91506100b860208401610072565b90509250929050565b60805160601c610da76100e66000396000818161028001526102e80152610da76000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063706da1ca11610076578063e89e106a1161005b578063e89e106a14610161578063f08c5daa1461016a578063f6eaffc81461017357600080fd5b8063706da1ca14610109578063cf62c8ab1461014e57600080fd5b8063177b9692146100a85780631fe543e3146100ce5780632fa4e442146100e357806336bfffed146100f6575b600080fd5b6100bb6100b6366004610a20565b610186565b6040519081526020015b60405180910390f35b6100e16100dc366004610abb565b610268565b005b6100e16100f1366004610b7c565b610328565b6100e1610104366004610938565b610488565b6003546101359074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016100c5565b6100e161015c366004610b7c565b610610565b6100bb60015481565b6100bb60045481565b6100bb610181366004610a89565b610817565b6002546040517f5d3b1d300000000000000000000000000000000000000000000000000000000081526004810187905267ffffffffffffffff8616602482015261ffff8516604482015263ffffffff80851660648301528316608482015260009173ffffffffffffffffffffffffffffffffffffffff1690635d3b1d309060a401602060405180830381600087803b15801561022157600080fd5b505af1158015610235573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102599190610aa2565b60018190559695505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461031a576040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248201526044015b60405180910390fd5b6103248282610838565b5050565b60035474010000000000000000000000000000000000000000900467ffffffffffffffff166103b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737562206e6f74207365740000000000000000000000000000000000000000006044820152606401610311565b6003546002546040805174010000000000000000000000000000000000000000840467ffffffffffffffff16602082015273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591015b6040516020818303038152906040526040518463ffffffff1660e01b815260040161043693929190610baa565b602060405180830381600087803b15801561045057600080fd5b505af1158015610464573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032491906109f7565b60035474010000000000000000000000000000000000000000900467ffffffffffffffff16610513576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f7420736574000000000000000000000000000000000000006044820152606401610311565b60005b815181101561032457600254600354835173ffffffffffffffffffffffffffffffffffffffff90921691637341c10c9174010000000000000000000000000000000000000000900467ffffffffffffffff169085908590811061057b5761057b610d23565b60200260200101516040518363ffffffff1660e01b81526004016105cb92919067ffffffffffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b1580156105e557600080fd5b505af11580156105f9573d6000803e3d6000fd5b50505050808061060890610cc3565b915050610516565b60035474010000000000000000000000000000000000000000900467ffffffffffffffff166103b357600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156106a357600080fd5b505af11580156106b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106db9190610b5f565b600380547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff938416810291909117918290556002546040517f7341c10c00000000000000000000000000000000000000000000000000000000815291909204909216600483015230602483015273ffffffffffffffffffffffffffffffffffffffff1690637341c10c90604401600060405180830381600087803b1580156107a257600080fd5b505af11580156107b6573d6000803e3d6000fd5b50506003546002546040805174010000000000000000000000000000000000000000840467ffffffffffffffff16602082015273ffffffffffffffffffffffffffffffffffffffff9384169550634000aea094509290911691859101610409565b6000818154811061082757600080fd5b600091825260209091200154905081565b60015482146108a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265717565737420494420697320696e636f72726563740000000000000000006044820152606401610311565b5a60045580516108ba9060009060208401906108bf565b505050565b8280548282559060005260206000209081019282156108fa579160200282015b828111156108fa5782518255916020019190600101906108df565b5061090692915061090a565b5090565b5b80821115610906576000815560010161090b565b803563ffffffff8116811461093357600080fd5b919050565b6000602080838503121561094b57600080fd5b823567ffffffffffffffff81111561096257600080fd5b8301601f8101851361097357600080fd5b803561098661098182610c9f565b610c50565b80828252848201915084840188868560051b87010111156109a657600080fd5b60009450845b848110156109e957813573ffffffffffffffffffffffffffffffffffffffff811681146109d7578687fd5b845292860192908601906001016109ac565b509098975050505050505050565b600060208284031215610a0957600080fd5b81518015158114610a1957600080fd5b9392505050565b600080600080600060a08688031215610a3857600080fd5b853594506020860135610a4a81610d81565b9350604086013561ffff81168114610a6157600080fd5b9250610a6f6060870161091f565b9150610a7d6080870161091f565b90509295509295909350565b600060208284031215610a9b57600080fd5b5035919050565b600060208284031215610ab457600080fd5b5051919050565b60008060408385031215610ace57600080fd5b8235915060208084013567ffffffffffffffff811115610aed57600080fd5b8401601f81018613610afe57600080fd5b8035610b0c61098182610c9f565b80828252848201915084840189868560051b8701011115610b2c57600080fd5b600094505b83851015610b4f578035835260019490940193918501918501610b31565b5080955050505050509250929050565b600060208284031215610b7157600080fd5b8151610a1981610d81565b600060208284031215610b8e57600080fd5b81356bffffffffffffffffffffffff81168114610a1957600080fd5b73ffffffffffffffffffffffffffffffffffffffff84168152600060206bffffffffffffffffffffffff85168184015260606040840152835180606085015260005b81811015610c0857858101830151858201608001528201610bec565b81811115610c1a576000608083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160800195945050505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610c9757610c97610d52565b604052919050565b600067ffffffffffffffff821115610cb957610cb9610d52565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610d1c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff81168114610d9757600080fd5b5056fea164736f6c6343000806000a",
}

Functions

This section is empty.

Types

type VRFConsumerV2

type VRFConsumerV2 struct {
	VRFConsumerV2Caller
	VRFConsumerV2Transactor
	VRFConsumerV2Filterer
	// contains filtered or unexported fields
}

func DeployVRFConsumerV2

func DeployVRFConsumerV2(auth *bind.TransactOpts, backend bind.ContractBackend, vrfCoordinator common.Address, link common.Address) (common.Address, *types.Transaction, *VRFConsumerV2, error)

func NewVRFConsumerV2

func NewVRFConsumerV2(address common.Address, backend bind.ContractBackend) (*VRFConsumerV2, error)

func (*VRFConsumerV2) Address

func (_VRFConsumerV2 *VRFConsumerV2) Address() common.Address

type VRFConsumerV2Caller

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

func NewVRFConsumerV2Caller

func NewVRFConsumerV2Caller(address common.Address, caller bind.ContractCaller) (*VRFConsumerV2Caller, error)

func (*VRFConsumerV2Caller) SGasAvailable

func (_VRFConsumerV2 *VRFConsumerV2Caller) SGasAvailable(opts *bind.CallOpts) (*big.Int, error)

func (*VRFConsumerV2Caller) SRandomWords

func (_VRFConsumerV2 *VRFConsumerV2Caller) SRandomWords(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error)

func (*VRFConsumerV2Caller) SRequestId

func (_VRFConsumerV2 *VRFConsumerV2Caller) SRequestId(opts *bind.CallOpts) (*big.Int, error)

func (*VRFConsumerV2Caller) SSubId

func (_VRFConsumerV2 *VRFConsumerV2Caller) SSubId(opts *bind.CallOpts) (uint64, error)

type VRFConsumerV2CallerRaw

type VRFConsumerV2CallerRaw struct {
	Contract *VRFConsumerV2Caller
}

func (*VRFConsumerV2CallerRaw) Call

func (_VRFConsumerV2 *VRFConsumerV2CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

type VRFConsumerV2CallerSession

type VRFConsumerV2CallerSession struct {
	Contract *VRFConsumerV2Caller
	CallOpts bind.CallOpts
}

func (*VRFConsumerV2CallerSession) SGasAvailable

func (_VRFConsumerV2 *VRFConsumerV2CallerSession) SGasAvailable() (*big.Int, error)

func (*VRFConsumerV2CallerSession) SRandomWords

func (_VRFConsumerV2 *VRFConsumerV2CallerSession) SRandomWords(arg0 *big.Int) (*big.Int, error)

func (*VRFConsumerV2CallerSession) SRequestId

func (_VRFConsumerV2 *VRFConsumerV2CallerSession) SRequestId() (*big.Int, error)

func (*VRFConsumerV2CallerSession) SSubId

func (_VRFConsumerV2 *VRFConsumerV2CallerSession) SSubId() (uint64, error)

type VRFConsumerV2Filterer

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

func NewVRFConsumerV2Filterer

func NewVRFConsumerV2Filterer(address common.Address, filterer bind.ContractFilterer) (*VRFConsumerV2Filterer, error)

type VRFConsumerV2Interface

type VRFConsumerV2Interface interface {
	SGasAvailable(opts *bind.CallOpts) (*big.Int, error)

	SRandomWords(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error)

	SRequestId(opts *bind.CallOpts) (*big.Int, error)

	SSubId(opts *bind.CallOpts) (uint64, error)

	CreateSubscriptionAndFund(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error)

	RawFulfillRandomWords(opts *bind.TransactOpts, requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error)

	RequestRandomness(opts *bind.TransactOpts, keyHash [32]byte, subId uint64, minReqConfs uint16, callbackGasLimit uint32, numWords uint32) (*types.Transaction, error)

	TopUpSubscription(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error)

	UpdateSubscription(opts *bind.TransactOpts, consumers []common.Address) (*types.Transaction, error)

	Address() common.Address
}

type VRFConsumerV2Raw

type VRFConsumerV2Raw struct {
	Contract *VRFConsumerV2
}

func (*VRFConsumerV2Raw) Call

func (_VRFConsumerV2 *VRFConsumerV2Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

func (*VRFConsumerV2Raw) Transact

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

func (*VRFConsumerV2Raw) Transfer

func (_VRFConsumerV2 *VRFConsumerV2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

type VRFConsumerV2Session

type VRFConsumerV2Session struct {
	Contract     *VRFConsumerV2
	CallOpts     bind.CallOpts
	TransactOpts bind.TransactOpts
}

func (*VRFConsumerV2Session) CreateSubscriptionAndFund

func (_VRFConsumerV2 *VRFConsumerV2Session) CreateSubscriptionAndFund(amount *big.Int) (*types.Transaction, error)

func (*VRFConsumerV2Session) RawFulfillRandomWords

func (_VRFConsumerV2 *VRFConsumerV2Session) RawFulfillRandomWords(requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error)

func (*VRFConsumerV2Session) RequestRandomness

func (_VRFConsumerV2 *VRFConsumerV2Session) RequestRandomness(keyHash [32]byte, subId uint64, minReqConfs uint16, callbackGasLimit uint32, numWords uint32) (*types.Transaction, error)

func (*VRFConsumerV2Session) SGasAvailable

func (_VRFConsumerV2 *VRFConsumerV2Session) SGasAvailable() (*big.Int, error)

func (*VRFConsumerV2Session) SRandomWords

func (_VRFConsumerV2 *VRFConsumerV2Session) SRandomWords(arg0 *big.Int) (*big.Int, error)

func (*VRFConsumerV2Session) SRequestId

func (_VRFConsumerV2 *VRFConsumerV2Session) SRequestId() (*big.Int, error)

func (*VRFConsumerV2Session) SSubId

func (_VRFConsumerV2 *VRFConsumerV2Session) SSubId() (uint64, error)

func (*VRFConsumerV2Session) TopUpSubscription

func (_VRFConsumerV2 *VRFConsumerV2Session) TopUpSubscription(amount *big.Int) (*types.Transaction, error)

func (*VRFConsumerV2Session) UpdateSubscription

func (_VRFConsumerV2 *VRFConsumerV2Session) UpdateSubscription(consumers []common.Address) (*types.Transaction, error)

type VRFConsumerV2Transactor

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

func NewVRFConsumerV2Transactor

func NewVRFConsumerV2Transactor(address common.Address, transactor bind.ContractTransactor) (*VRFConsumerV2Transactor, error)

func (*VRFConsumerV2Transactor) CreateSubscriptionAndFund

func (_VRFConsumerV2 *VRFConsumerV2Transactor) CreateSubscriptionAndFund(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error)

func (*VRFConsumerV2Transactor) RawFulfillRandomWords

func (_VRFConsumerV2 *VRFConsumerV2Transactor) RawFulfillRandomWords(opts *bind.TransactOpts, requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error)

func (*VRFConsumerV2Transactor) RequestRandomness

func (_VRFConsumerV2 *VRFConsumerV2Transactor) RequestRandomness(opts *bind.TransactOpts, keyHash [32]byte, subId uint64, minReqConfs uint16, callbackGasLimit uint32, numWords uint32) (*types.Transaction, error)

func (*VRFConsumerV2Transactor) TopUpSubscription

func (_VRFConsumerV2 *VRFConsumerV2Transactor) TopUpSubscription(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error)

func (*VRFConsumerV2Transactor) UpdateSubscription

func (_VRFConsumerV2 *VRFConsumerV2Transactor) UpdateSubscription(opts *bind.TransactOpts, consumers []common.Address) (*types.Transaction, error)

type VRFConsumerV2TransactorRaw

type VRFConsumerV2TransactorRaw struct {
	Contract *VRFConsumerV2Transactor
}

func (*VRFConsumerV2TransactorRaw) Transact

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

func (*VRFConsumerV2TransactorRaw) Transfer

func (_VRFConsumerV2 *VRFConsumerV2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

type VRFConsumerV2TransactorSession

type VRFConsumerV2TransactorSession struct {
	Contract     *VRFConsumerV2Transactor
	TransactOpts bind.TransactOpts
}

func (*VRFConsumerV2TransactorSession) CreateSubscriptionAndFund

func (_VRFConsumerV2 *VRFConsumerV2TransactorSession) CreateSubscriptionAndFund(amount *big.Int) (*types.Transaction, error)

func (*VRFConsumerV2TransactorSession) RawFulfillRandomWords

func (_VRFConsumerV2 *VRFConsumerV2TransactorSession) RawFulfillRandomWords(requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error)

func (*VRFConsumerV2TransactorSession) RequestRandomness

func (_VRFConsumerV2 *VRFConsumerV2TransactorSession) RequestRandomness(keyHash [32]byte, subId uint64, minReqConfs uint16, callbackGasLimit uint32, numWords uint32) (*types.Transaction, error)

func (*VRFConsumerV2TransactorSession) TopUpSubscription

func (_VRFConsumerV2 *VRFConsumerV2TransactorSession) TopUpSubscription(amount *big.Int) (*types.Transaction, error)

func (*VRFConsumerV2TransactorSession) UpdateSubscription

func (_VRFConsumerV2 *VRFConsumerV2TransactorSession) UpdateSubscription(consumers []common.Address) (*types.Transaction, error)

Jump to

Keyboard shortcuts

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