vrf_consumer_v2

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 9 Imported by: 0

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\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"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\":\"testCreateSubscriptionAndFund\",\"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\":\"testRequestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"name\":\"updateSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
	Bin: "0x60a060405234801561001057600080fd5b50604051610d09380380610d0983398101604081905261002f9161008e565b6001600160601b0319606083901b16608052600280546001600160a01b03199081166001600160a01b0394851617909155600380549290931691161790556100c1565b80516001600160a01b038116811461008957600080fd5b919050565b600080604083850312156100a157600080fd5b6100aa83610072565b91506100b860208401610072565b90509250929050565b60805160601c610c236100e66000396000818161017001526101d80152610c236000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063706da1ca1161005b578063706da1ca146100ee578063e89e106a14610133578063f08c5daa1461013c578063f6eaffc81461014557600080fd5b80631fe543e31461008d57806327784fad146100a257806336bfffed146100c85780636802f726146100db575b600080fd5b6100a061009b366004610937565b610158565b005b6100b56100b036600461089c565b610218565b6040519081526020015b60405180910390f35b6100a06100d63660046107b4565b6102f5565b6100a06100e93660046109f8565b61047d565b60035461011a9074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016100bf565b6100b560015481565b6100b560045481565b6100b5610153366004610905565b6106fc565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461020a576040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248201526044015b60405180910390fd5b610214828261071d565b5050565b6002546040517f5d3b1d300000000000000000000000000000000000000000000000000000000081526004810187905267ffffffffffffffff8616602482015261ffff8516604482015263ffffffff80851660648301528316608482015260009173ffffffffffffffffffffffffffffffffffffffff1690635d3b1d309060a401602060405180830381600087803b1580156102b357600080fd5b505af11580156102c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102eb919061091e565b9695505050505050565b60035474010000000000000000000000000000000000000000900467ffffffffffffffff16610380576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f7375624944206e6f7420736574000000000000000000000000000000000000006044820152606401610201565b60005b815181101561021457600254600354835173ffffffffffffffffffffffffffffffffffffffff90921691637341c10c9174010000000000000000000000000000000000000000900467ffffffffffffffff16908590859081106103e8576103e8610b9f565b60200260200101516040518363ffffffff1660e01b815260040161043892919067ffffffffffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b15801561045257600080fd5b505af1158015610466573d6000803e3d6000fd5b50505050808061047590610b3f565b915050610383565b60035474010000000000000000000000000000000000000000900467ffffffffffffffff1661062857600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a21a23e46040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561051057600080fd5b505af1158015610524573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054891906109db565b600380547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff938416810291909117918290556002546040517f7341c10c00000000000000000000000000000000000000000000000000000000815291909204909216600483015230602483015273ffffffffffffffffffffffffffffffffffffffff1690637341c10c90604401600060405180830381600087803b15801561060f57600080fd5b505af1158015610623573d6000803e3d6000fd5b505050505b6003546002546040805174010000000000000000000000000000000000000000840467ffffffffffffffff16602082015273ffffffffffffffffffffffffffffffffffffffff93841693634000aea09316918591016040516020818303038152906040526040518463ffffffff1660e01b81526004016106aa93929190610a26565b602060405180830381600087803b1580156106c457600080fd5b505af11580156106d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102149190610873565b6000818154811061070c57600080fd5b600091825260209091200154905081565b5a600455805161073490600090602084019061073b565b5050600155565b828054828255906000526020600020908101928215610776579160200282015b8281111561077657825182559160200191906001019061075b565b50610782929150610786565b5090565b5b808211156107825760008155600101610787565b803563ffffffff811681146107af57600080fd5b919050565b600060208083850312156107c757600080fd5b823567ffffffffffffffff8111156107de57600080fd5b8301601f810185136107ef57600080fd5b80356108026107fd82610b1b565b610acc565b80828252848201915084840188868560051b870101111561082257600080fd5b60009450845b8481101561086557813573ffffffffffffffffffffffffffffffffffffffff81168114610853578687fd5b84529286019290860190600101610828565b509098975050505050505050565b60006020828403121561088557600080fd5b8151801515811461089557600080fd5b9392505050565b600080600080600060a086880312156108b457600080fd5b8535945060208601356108c681610bfd565b9350604086013561ffff811681146108dd57600080fd5b92506108eb6060870161079b565b91506108f96080870161079b565b90509295509295909350565b60006020828403121561091757600080fd5b5035919050565b60006020828403121561093057600080fd5b5051919050565b6000806040838503121561094a57600080fd5b8235915060208084013567ffffffffffffffff81111561096957600080fd5b8401601f8101861361097a57600080fd5b80356109886107fd82610b1b565b80828252848201915084840189868560051b87010111156109a857600080fd5b600094505b838510156109cb5780358352600194909401939185019185016109ad565b5080955050505050509250929050565b6000602082840312156109ed57600080fd5b815161089581610bfd565b600060208284031215610a0a57600080fd5b81356bffffffffffffffffffffffff8116811461089557600080fd5b73ffffffffffffffffffffffffffffffffffffffff84168152600060206bffffffffffffffffffffffff85168184015260606040840152835180606085015260005b81811015610a8457858101830151858201608001528201610a68565b81811115610a96576000608083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160800195945050505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b1357610b13610bce565b604052919050565b600067ffffffffffffffff821115610b3557610b35610bce565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b98577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff81168114610c1357600080fd5b5056fea164736f6c6343000806000a",
}

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)

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

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

	TestRequestRandomness(opts *bind.TransactOpts, keyHash [32]byte, subId uint64, minReqConfs uint16, callbackGasLimit uint32, numWords uint32) (*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) RawFulfillRandomWords

func (_VRFConsumerV2 *VRFConsumerV2Session) RawFulfillRandomWords(requestId *big.Int, randomWords []*big.Int) (*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) TestCreateSubscriptionAndFund

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

func (*VRFConsumerV2Session) TestRequestRandomness

func (_VRFConsumerV2 *VRFConsumerV2Session) TestRequestRandomness(keyHash [32]byte, subId uint64, minReqConfs uint16, callbackGasLimit uint32, numWords uint32) (*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) RawFulfillRandomWords

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

func (*VRFConsumerV2Transactor) TestCreateSubscriptionAndFund

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

func (*VRFConsumerV2Transactor) TestRequestRandomness

func (_VRFConsumerV2 *VRFConsumerV2Transactor) TestRequestRandomness(opts *bind.TransactOpts, keyHash [32]byte, subId uint64, minReqConfs uint16, callbackGasLimit uint32, numWords uint32) (*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) RawFulfillRandomWords

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

func (*VRFConsumerV2TransactorSession) TestCreateSubscriptionAndFund

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

func (*VRFConsumerV2TransactorSession) TestRequestRandomness

func (_VRFConsumerV2 *VRFConsumerV2TransactorSession) TestRequestRandomness(keyHash [32]byte, subId uint64, minReqConfs uint16, callbackGasLimit uint32, numWords uint32) (*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