solidity_vrf

package
v0.0.0-...-9c382e0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 9 Imported by: 0

README

Testing

Step 1

Install and start ganache cli.

 npm install ganache --global
 
 ganache

Step 2

Copy one of the private key and replace in the verify_test.go on line 26 without the 0x prefix of the private key.

Step 3

Run from this directory root on terminal.

go test

Proof will be generated in golang and verified with solidity.

solc --abi contract/VerifyVRF.sol -o ./build --bin --overwrite

abigen --bin=build/VerifyVRF.bin --abi=build/VerifyVRF.abi --pkg solidity_vrf --type VerifyVRF -out verify.go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VerifyVRFABI = VerifyVRFMetaData.ABI

VerifyVRFABI is the input ABI used to generate the binding from. Deprecated: Use VerifyVRFMetaData.ABI instead.

View Source
var VerifyVRFBin = VerifyVRFMetaData.Bin

VerifyVRFBin is the compiled bytecode used for deploying new contracts. Deprecated: Use VerifyVRFMetaData.Bin instead.

View Source
var VerifyVRFMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"}],\"name\":\"decodeProof\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"_publicKey\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_proof\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]",
	Bin: "0x608060405234801561000f575f80fd5b50335f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506120f38061005c5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c80638da5cb5b14610043578063bbe95b4c14610061578063c9d4ef1f14610091575b5f80fd5b61004b6100c1565b604051610058919061156c565b60405180910390f35b61007b60048036038101906100769190611865565b6100e4565b60405161008891906118eb565b60405180910390f35b6100ab60048036038101906100a69190611904565b6100f9565b6040516100b891906119f0565b60405180910390f35b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f6100f0848484610111565b90509392505050565b61010161150b565b61010a826102ca565b9050919050565b5f805f61011e8685610382565b915091505f806101d18760036004811061013b5761013a611a09565b5b60200201517f79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f817987f483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b88a60026004811061019657610195611a09565b5b60200201518c5f600281106101ae576101ad611a09565b5b60200201518d6001600281106101c7576101c6611a09565b5b602002015161051a565b915091505f80610244896003600481106101ee576101ed611a09565b5b602002015187878c60026004811061020957610208611a09565b5b60200201518d5f6004811061022157610220611a09565b5b60200201518e60016004811061023a57610239611a09565b5b602002015161051a565b915091505f61028887878c5f6004811061026157610260611a09565b5b60200201518d60016004811061027a57610279611a09565b5b602002015189898989610589565b90508960026004811061029e5761029d611a09565b5b60200201518160801c6fffffffffffffffffffffffffffffffff16149750505050505050509392505050565b6102d261150b565b6051825114610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d90611a90565b60405180910390fd5b5f805f80600186015193506021860151925060318601519150605186015190505f6103418585610652565b90506040518060800160405280858152602001828152602001846fffffffffffffffffffffffffffffffff1681526020018381525095505050505050919050565b5f805f60fe60016103c2875f6002811061039f5761039e611a09565b5b6020020151886001600281106103b8576103b7611a09565b5b6020020151610689565b866040516020016103d69493929190611b5a565b60405160208183030381529060405290505f5b6101008160ff1610156104d7575f600283835f60405160200161040e93929190611b9f565b60405160208183030381529060405260405161042a9190611bd7565b602060405180830381855afa158015610445573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906104689190611c20565b90505f815f1c90505f61047c600283610652565b90506104ac82825f60077ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f6106d2565b156104c1578181965096505050505050610513565b50505080806104cf90611c78565b9150506103e9565b506040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050a90611cea565b60405180910390fd5b9250929050565b5f805f806105298a8a8a610798565b915091505f8061053a898989610798565b915091505f8061056e868686865f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f6107d3565b91509150818197509750505050505050965096945050505050565b5f8060fe60026105998c8c610689565b6105a38b8b610689565b6105ad8a8a610689565b6105b78989610689565b5f6040516020016105ce9796959493929190611d08565b60405160208183030381529060405290505f6002826040516105f09190611bd7565b602060405180830381855afa15801561060b573d5f803e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061062e9190611c20565b90505f604051825f8201525f81015191505080935050505098975050505050505050565b5f61068183835f60077ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f610805565b905092915050565b60605f6002836106999190611da5565b60026106a59190611dd5565b905080846040516020016106ba929190611e28565b60405160208183030381529060405291505092915050565b5f855f14806106e15750818610155b806106eb5750845f145b806106f65750818510155b15610703575f905061078f565b5f828061071357610712611d78565b5b86870990505f838061072857610727611d78565b5b88858061073857610737611d78565b5b8a8b090990505f861461076b57838061075457610753611d78565b5b848061076357610762611d78565b5b878a09820890505b5f851461078757838061078157610780611d78565b5b85820890505b808214925050505b95945050505050565b5f806107c78585855f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f61091d565b91509150935093915050565b5f805f806107e2888887610954565b915091506107f48a8a84848a8a61097a565b935093505050965096945050505050565b5f60028660ff16148061081b575060038660ff16145b61085a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085190611ec3565b60405180910390fd5b5f828061086a57610869611d78565b5b838061087957610878611d78565b5b85858061088957610888611d78565b5b888a0908848061089c5761089b611d78565b5b85806108ab576108aa611d78565b5b898a0989090890506108d68160046001866108c69190611dd5565b6108d09190611ee1565b85610a08565b90505f8060028960ff16846108eb9190611dd5565b6108f59190611da5565b1461090b5781846109069190611f11565b61090d565b815b9050809250505095945050505050565b5f805f805f6109318a8a8a60018b8b610af9565b92509250925061094383838389610b91565b945094505050509550959350505050565b5f80848385856109649190611f11565b61096e9190611da5565b91509150935093915050565b5f805f805f888b036109cb575f868061099657610995611d78565b5b898c08036109ac575f80945094505050506109fd565b6109ba8b8b60018a8a610c03565b8093508194508295505050506109e9565b6109dc8b8b60018c8c60018c610dba565b8093508194508295505050505b6109f583838389610b91565b945094505050505b965096945050505050565b5f808203610a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4290611f8e565b60405180910390fd5b5f8403610a5a575f9050610af2565b5f8303610a6a5760019050610af2565b5f600190505f7f800000000000000000000000000000000000000000000000000000000000000090505b5f811115610aec57838186161515870a85848509099150836002820486161515870a85848509099150836004820486161515870a85848509099150836008820486161515870a85848509099150601081049050610a94565b81925050505b9392505050565b5f805f808903610b1157878787925092509250610b85565b5f8990505f805f600190505b5f8414610b77575f6001851614610b4a57610b3d8383838f8f8f8e610dba565b8093508194508295505050505b600284610b579190611ee1565b9350610b668c8c8c8c8c610c03565b809c50819d50829e50505050610b1d565b828282965096509650505050505b96509650969350505050565b5f805f610b9e8585611425565b90505f8480610bb057610baf611d78565b5b82830990505f8580610bc557610bc4611d78565b5b828a0990505f8680610bda57610bd9611d78565b5b8780610be957610be8611d78565b5b8486098a0990508181955095505050505094509492505050565b5f805f808603610c1b57878787925092509250610daf565b5f8480610c2b57610c2a611d78565b5b898a0990505f8580610c4057610c3f611d78565b5b898a0990505f8680610c5557610c54611d78565b5b898a0990505f8780610c6a57610c69611d78565b5b8880610c7957610c78611d78565b5b848e0960040990505f8880610c9157610c90611d78565b5b8980610ca057610c9f611d78565b5b8a80610caf57610cae611d78565b5b8586098c098a80610cc357610cc2611d78565b5b876003090890508880610cd957610cd8611d78565b5b8980610ce857610ce7611d78565b5b8384088a610cf69190611f11565b8a80610d0557610d04611d78565b5b8384090894508880610d1a57610d19611d78565b5b8980610d2957610d28611d78565b5b8a80610d3857610d37611d78565b5b8687096008098a610d499190611f11565b8a80610d5857610d57611d78565b5b8b80610d6757610d66611d78565b5b888d610d739190611f11565b860884090893508880610d8957610d88611d78565b5b8980610d9857610d97611d78565b5b8c8e09600209925084848497509750975050505050505b955095509592505050565b5f805f808a148015610dcb57505f89145b15610dde57868686925092509250611418565b5f87148015610dec57505f86145b15610dff57898989925092509250611418565b610e0761150b565b8480610e1657610e15611d78565b5b898a09815f60048110610e2c57610e2b611a09565b5b6020020181815250508480610e4457610e43611d78565b5b815f60048110610e5757610e56611a09565b5b60200201518a0981600160048110610e7257610e71611a09565b5b6020020181815250508480610e8a57610e89611d78565b5b86870981600260048110610ea157610ea0611a09565b5b6020020181815250508480610eb957610eb8611d78565b5b81600260048110610ecd57610ecc611a09565b5b6020020151870981600360048110610ee857610ee7611a09565b5b60200201818152505060405180608001604052808680610f0b57610f0a611d78565b5b83600260048110610f1f57610f1e611a09565b5b60200201518e0981526020018680610f3a57610f39611d78565b5b83600360048110610f4e57610f4d611a09565b5b60200201518d0981526020018680610f6957610f68611d78565b5b835f60048110610f7c57610f7b611a09565b5b60200201518b0981526020018680610f9757610f96611d78565b5b83600160048110610fab57610faa611a09565b5b60200201518a09815250905080600260048110610fcb57610fca611a09565b5b6020020151815f60048110610fe357610fe2611a09565b5b602002015114158061102557508060036004811061100457611003611a09565b5b60200201518160016004811061101d5761101c611a09565b5b602002015114155b611064576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105b90611ff6565b60405180910390fd5b61106c61150b565b858061107b5761107a611d78565b5b825f6004811061108e5761108d611a09565b5b60200201518761109e9190611f11565b836002600481106110b2576110b1611a09565b5b602002015108815f600481106110cb576110ca611a09565b5b60200201818152505085806110e3576110e2611d78565b5b826001600481106110f7576110f6611a09565b5b6020020151876111079190611f11565b8360036004811061111b5761111a611a09565b5b6020020151088160016004811061113557611134611a09565b5b602002018181525050858061114d5761114c611d78565b5b815f600481106111605761115f611a09565b5b6020020151825f6004811061117857611177611a09565b5b6020020151098160026004811061119257611191611a09565b5b60200201818152505085806111aa576111a9611d78565b5b815f600481106111bd576111bc611a09565b5b6020020151826002600481106111d6576111d5611a09565b5b602002015109816003600481106111f0576111ef611a09565b5b6020020181815250505f868061120957611208611d78565b5b8260036004811061121d5761121c611a09565b5b60200201518861122d9190611f11565b888061123c5761123b611d78565b5b846001600481106112505761124f611a09565b5b60200201518560016004811061126957611268611a09565b5b602002015109089050868061128157611280611d78565b5b87806112905761128f611d78565b5b888061129f5761129e611d78565b5b846002600481106112b3576112b2611a09565b5b6020020151865f600481106112cb576112ca611a09565b5b602002015109600209886112df9190611f11565b820890505f87806112f3576112f2611d78565b5b888061130257611301611d78565b5b838a61130e9190611f11565b8a8061131d5761131c611d78565b5b8660026004811061133157611330611a09565b5b6020020151885f6004811061134957611348611a09565b5b602002015109088460016004811061136457611363611a09565b5b6020020151099050878061137b5761137a611d78565b5b888061138a57611389611d78565b5b8460036004811061139e5761139d611a09565b5b6020020151866001600481106113b7576113b6611a09565b5b602002015109896113c89190611f11565b820890505f88806113dc576113db611d78565b5b89806113eb576113ea611d78565b5b8b8f09855f6004811061140157611400611a09565b5b602002015109905082828297509750975050505050505b9750975097945050505050565b5f8083141580156114365750818314155b801561144257505f8214155b611481576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114789061205e565b60405180910390fd5b5f80600190505f8490505f5b5f87146114fe5786826114a09190611ee1565b90508286806114b2576114b1611d78565b5b87806114c1576114c0611d78565b5b858409886114cf9190611f11565b860880945081955050508687826114e6919061207c565b836114f19190611f11565b809850819350505061148d565b8394505050505092915050565b6040518060800160405280600490602082028036833780820191505090505090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6115568261152d565b9050919050565b6115668161154c565b82525050565b5f60208201905061157f5f83018461155d565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6115e08261159a565b810181811067ffffffffffffffff821117156115ff576115fe6115aa565b5b80604052505050565b5f611611611585565b905061161d82826115d7565b919050565b5f67ffffffffffffffff82111561163c5761163b6115aa565b5b602082029050919050565b5f80fd5b5f819050919050565b61165d8161164b565b8114611667575f80fd5b50565b5f8135905061167881611654565b92915050565b5f61169061168b84611622565b611608565b905080602084028301858111156116aa576116a9611647565b5b835b818110156116d357806116bf888261166a565b8452602084019350506020810190506116ac565b5050509392505050565b5f82601f8301126116f1576116f0611596565b5b60026116fe84828561167e565b91505092915050565b5f67ffffffffffffffff821115611721576117206115aa565b5b602082029050919050565b5f61173e61173984611707565b611608565b9050806020840283018581111561175857611757611647565b5b835b81811015611781578061176d888261166a565b84526020840193505060208101905061175a565b5050509392505050565b5f82601f83011261179f5761179e611596565b5b60046117ac84828561172c565b91505092915050565b5f80fd5b5f67ffffffffffffffff8211156117d3576117d26115aa565b5b6117dc8261159a565b9050602081019050919050565b828183375f83830152505050565b5f611809611804846117b9565b611608565b905082815260208101848484011115611825576118246117b5565b5b6118308482856117e9565b509392505050565b5f82601f83011261184c5761184b611596565b5b813561185c8482602086016117f7565b91505092915050565b5f805f60e0848603121561187c5761187b61158e565b5b5f611889868287016116dd565b935050604061189a8682870161178b565b92505060c084013567ffffffffffffffff8111156118bb576118ba611592565b5b6118c786828701611838565b9150509250925092565b5f8115159050919050565b6118e5816118d1565b82525050565b5f6020820190506118fe5f8301846118dc565b92915050565b5f602082840312156119195761191861158e565b5b5f82013567ffffffffffffffff81111561193657611935611592565b5b61194284828501611838565b91505092915050565b5f60049050919050565b5f81905092915050565b5f819050919050565b6119718161164b565b82525050565b5f6119828383611968565b60208301905092915050565b5f602082019050919050565b6119a38161194b565b6119ad8184611955565b92506119b88261195f565b805f5b838110156119e85781516119cf8782611977565b96506119da8361198e565b9250506001810190506119bb565b505050505050565b5f608082019050611a035f83018461199a565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b7f4d616c666f726d6564205652462070726f6f66000000000000000000000000005f82015250565b5f611a7a601383611a36565b9150611a8582611a46565b602082019050919050565b5f6020820190508181035f830152611aa781611a6e565b9050919050565b5f60ff82169050919050565b5f8160f81b9050919050565b5f611ad082611aba565b9050919050565b611ae8611ae382611aae565b611ac6565b82525050565b5f81519050919050565b5f81905092915050565b5f5b83811015611b1f578082015181840152602081019050611b04565b5f8484015250505050565b5f611b3482611aee565b611b3e8185611af8565b9350611b4e818560208601611b02565b80840191505092915050565b5f611b658287611ad7565b600182019150611b758286611ad7565b600182019150611b858285611b2a565b9150611b918284611b2a565b915081905095945050505050565b5f611baa8286611b2a565b9150611bb68285611ad7565b600182019150611bc68284611ad7565b600182019150819050949350505050565b5f611be28284611b2a565b915081905092915050565b5f819050919050565b611bff81611bed565b8114611c09575f80fd5b50565b5f81519050611c1a81611bf6565b92915050565b5f60208284031215611c3557611c3461158e565b5b5f611c4284828501611c0c565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611c8282611aae565b915060ff8203611c9557611c94611c4b565b5b600182019050919050565b7f4e6f2076616c696420706f696e742077617320666f756e6400000000000000005f82015250565b5f611cd4601883611a36565b9150611cdf82611ca0565b602082019050919050565b5f6020820190508181035f830152611d0181611cc8565b9050919050565b5f611d13828a611ad7565b600182019150611d238289611ad7565b600182019150611d338288611b2a565b9150611d3f8287611b2a565b9150611d4b8286611b2a565b9150611d578285611b2a565b9150611d638284611ad7565b60018201915081905098975050505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f611daf8261164b565b9150611dba8361164b565b925082611dca57611dc9611d78565b5b828206905092915050565b5f611ddf8261164b565b9150611dea8361164b565b9250828201905080821115611e0257611e01611c4b565b5b92915050565b5f819050919050565b611e22611e1d8261164b565b611e08565b82525050565b5f611e338285611ad7565b600182019150611e438284611e11565b6020820191508190509392505050565b7f496e76616c696420636f6d7072657373656420454320706f696e7420707265665f8201527f6978000000000000000000000000000000000000000000000000000000000000602082015250565b5f611ead602283611a36565b9150611eb882611e53565b604082019050919050565b5f6020820190508181035f830152611eda81611ea1565b9050919050565b5f611eeb8261164b565b9150611ef68361164b565b925082611f0657611f05611d78565b5b828204905092915050565b5f611f1b8261164b565b9150611f268361164b565b9250828203905081811115611f3e57611f3d611c4b565b5b92915050565b7f4d6f64756c7573206973207a65726f00000000000000000000000000000000005f82015250565b5f611f78600f83611a36565b9150611f8382611f44565b602082019050919050565b5f6020820190508181035f830152611fa581611f6c565b9050919050565b7f557365206a6163446f75626c652066756e6374696f6e20696e737465616400005f82015250565b5f611fe0601e83611a36565b9150611feb82611fac565b602082019050919050565b5f6020820190508181035f83015261200d81611fd4565b9050919050565b7f496e76616c6964206e756d6265720000000000000000000000000000000000005f82015250565b5f612048600e83611a36565b915061205382612014565b602082019050919050565b5f6020820190508181035f8301526120758161203c565b9050919050565b5f6120868261164b565b91506120918361164b565b925082820261209f8161164b565b915082820484148315176120b6576120b5611c4b565b5b509291505056fea2646970667358221220ecf5aea6e0f4790ea5eaa204f106c3445477650ebff033160389751038d645b764736f6c63430008140033",
}

VerifyVRFMetaData contains all meta data concerning the VerifyVRF contract.

Functions

This section is empty.

Types

type VerifyVRF

type VerifyVRF struct {
	VerifyVRFCaller     // Read-only binding to the contract
	VerifyVRFTransactor // Write-only binding to the contract
	VerifyVRFFilterer   // Log filterer for contract events
}

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

func DeployVerifyVRF

func DeployVerifyVRF(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *VerifyVRF, error)

DeployVerifyVRF deploys a new Ethereum contract, binding an instance of VerifyVRF to it.

func NewVerifyVRF

func NewVerifyVRF(address common.Address, backend bind.ContractBackend) (*VerifyVRF, error)

NewVerifyVRF creates a new instance of VerifyVRF, bound to a specific deployed contract.

type VerifyVRFCaller

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

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

func NewVerifyVRFCaller

func NewVerifyVRFCaller(address common.Address, caller bind.ContractCaller) (*VerifyVRFCaller, error)

NewVerifyVRFCaller creates a new read-only instance of VerifyVRF, bound to a specific deployed contract.

func (*VerifyVRFCaller) DecodeProof

func (_VerifyVRF *VerifyVRFCaller) DecodeProof(opts *bind.CallOpts, _proof []byte) ([4]*big.Int, error)

DecodeProof is a free data retrieval call binding the contract method 0xc9d4ef1f.

Solidity: function decodeProof(bytes _proof) pure returns(uint256[4])

func (*VerifyVRFCaller) Owner

func (_VerifyVRF *VerifyVRFCaller) 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)

func (*VerifyVRFCaller) Verify

func (_VerifyVRF *VerifyVRFCaller) Verify(opts *bind.CallOpts, _publicKey [2]*big.Int, _proof [4]*big.Int, _message []byte) (bool, error)

Verify is a free data retrieval call binding the contract method 0xbbe95b4c.

Solidity: function verify(uint256[2] _publicKey, uint256[4] _proof, bytes _message) pure returns(bool)

type VerifyVRFCallerRaw

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

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

func (*VerifyVRFCallerRaw) Call

func (_VerifyVRF *VerifyVRFCallerRaw) 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 VerifyVRFCallerSession

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

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

func (*VerifyVRFCallerSession) DecodeProof

func (_VerifyVRF *VerifyVRFCallerSession) DecodeProof(_proof []byte) ([4]*big.Int, error)

DecodeProof is a free data retrieval call binding the contract method 0xc9d4ef1f.

Solidity: function decodeProof(bytes _proof) pure returns(uint256[4])

func (*VerifyVRFCallerSession) Owner

func (_VerifyVRF *VerifyVRFCallerSession) Owner() (common.Address, error)

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

Solidity: function owner() view returns(address)

func (*VerifyVRFCallerSession) Verify

func (_VerifyVRF *VerifyVRFCallerSession) Verify(_publicKey [2]*big.Int, _proof [4]*big.Int, _message []byte) (bool, error)

Verify is a free data retrieval call binding the contract method 0xbbe95b4c.

Solidity: function verify(uint256[2] _publicKey, uint256[4] _proof, bytes _message) pure returns(bool)

type VerifyVRFFilterer

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

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

func NewVerifyVRFFilterer

func NewVerifyVRFFilterer(address common.Address, filterer bind.ContractFilterer) (*VerifyVRFFilterer, error)

NewVerifyVRFFilterer creates a new log filterer instance of VerifyVRF, bound to a specific deployed contract.

type VerifyVRFRaw

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

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

func (*VerifyVRFRaw) Call

func (_VerifyVRF *VerifyVRFRaw) 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 (*VerifyVRFRaw) Transact

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

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

func (*VerifyVRFRaw) Transfer

func (_VerifyVRF *VerifyVRFRaw) 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 VerifyVRFSession

type VerifyVRFSession struct {
	Contract     *VerifyVRF        // 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
}

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

func (*VerifyVRFSession) DecodeProof

func (_VerifyVRF *VerifyVRFSession) DecodeProof(_proof []byte) ([4]*big.Int, error)

DecodeProof is a free data retrieval call binding the contract method 0xc9d4ef1f.

Solidity: function decodeProof(bytes _proof) pure returns(uint256[4])

func (*VerifyVRFSession) Owner

func (_VerifyVRF *VerifyVRFSession) Owner() (common.Address, error)

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

Solidity: function owner() view returns(address)

func (*VerifyVRFSession) Verify

func (_VerifyVRF *VerifyVRFSession) Verify(_publicKey [2]*big.Int, _proof [4]*big.Int, _message []byte) (bool, error)

Verify is a free data retrieval call binding the contract method 0xbbe95b4c.

Solidity: function verify(uint256[2] _publicKey, uint256[4] _proof, bytes _message) pure returns(bool)

type VerifyVRFTransactor

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

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

func NewVerifyVRFTransactor

func NewVerifyVRFTransactor(address common.Address, transactor bind.ContractTransactor) (*VerifyVRFTransactor, error)

NewVerifyVRFTransactor creates a new write-only instance of VerifyVRF, bound to a specific deployed contract.

type VerifyVRFTransactorRaw

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

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

func (*VerifyVRFTransactorRaw) Transact

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

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

func (*VerifyVRFTransactorRaw) Transfer

func (_VerifyVRF *VerifyVRFTransactorRaw) 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 VerifyVRFTransactorSession

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

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

Jump to

Keyboard shortcuts

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