Skip to content

smartcontractkit/vrf-direct-funding-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VRF Direct Funding Consumer

I. About

This is a consumer contract that allows end users to pay for VRF calls in LINK. The purpose of this contract is to demonstrate how to use the Chainlink VRF Direct Funding method to allow the end user to pay for the service. This contract is not intended to be used in production. It is intended to be used as a reference for developers who want to implement the Chainlink VRF Direct Funding method in their own contracts.

II. Pre-requisites

1. Clone repo

$ git clone https://github.com/smartcontractkit/vrf-direct-funding-example.git

2. Create etherscan API key

3. Create .env file

# Network RPCs
export RPC_URL=

# Private key for contract deployment
export PRIVATE_KEY=

# Explorer API key used to verify contracts
export EXPLORER_KEY=

4. Install dependencies

# root
$ make install

5. Deploy contract

# root
$ make deploy

6. Test contract

# root
$ make test-contract

⚠️ Disclaimer: "This tutorial represents an educational example to use a Chainlink system, product, or service and is provided to demonstrate how to interact with Chainlink’s systems, products, and services to integrate them into your own. This template is provided “AS IS” and “AS AVAILABLE” without warranties of any kind, it has not been audited, and it may be missing key checks or error handling to make the usage of the system, product or service more clear. Do not use the code in this example in a production environment without completing your own audits and application of best practices. Neither Chainlink Labs, the Chainlink Foundation, nor Chainlink node operators are responsible for unintended outputs that are generated due to errors in code."

About

An example for passing costs to end users using VRF Direct Funding

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published