This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@chainlink/contracts/src/v0.8/ChainlinkClient.sol"; | |
/** | |
* @notice DO NOT USE THIS CODE IN PRODUCTION. This is an example contract. | |
* | |
* The job spec for this node is located here: | |
* https://gist.github.com/PatrickAlphaC/53848768b3ca6c747cf1166ccb2f65ec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@chainlink/contracts/src/v0.8/ChainlinkClient.sol"; | |
/** | |
* @notice DO NOT USE THIS CODE IN PRODUCTION. This is an example contract. | |
*/ | |
contract GenericBigWord is ChainlinkClient { | |
using Chainlink for Chainlink.Request; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "multi-word", | |
"initiators": [ | |
{ | |
"id": 139, | |
"jobSpecId": "bcf76dc2-7fd4-484f-ab68-1d3f239cd2c3", | |
"type": "runlog", | |
"params": { | |
"address": "0x7eb318734142a6375787379de2fa202e4058d03f" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.6.0; | |
import "github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/ChainlinkClient.sol"; | |
// MyContract inherits the ChainlinkClient contract to gain the | |
// functionality of creating Chainlink requests | |
contract ChainlinkExample is ChainlinkClient { | |
// Stores the answer from the Chainlink oracle | |
uint256 public currentPrice; | |
address public owner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity 0.6.6; | |
import "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol"; | |
import "@chainlink/contracts/src/v0.6/Owned.sol"; | |
/** | |
* @notice A Chainlink VRF consumer which uses randomness to mimic the rolling | |
* of a 20 sided die | |
* @dev This is only an example implementation and not necessarily suitable for mainnet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** This example code is designed to quickly deploy an example contract using Remix. | |
* If you have never used Remix, try our example walkthrough: https://docs.chain.link/docs/example-walkthrough | |
* You will need testnet ETH and LINK. | |
* - Kovan ETH faucet: https://faucet.kovan.network/ | |
* - Kovan LINK faucet: https://kovan.chain.link/ | |
*/ | |
pragma solidity 0.6.6; | |
import "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This example code is designed to quickly deploy an example contract using Remix. | |
pragma solidity ^0.6.0; | |
import "https://raw.githubusercontent.com/smartcontractkit/chainlink/master/evm-contracts/src/v0.6/ChainlinkClient.sol"; | |
contract APIConsumer is ChainlinkClient { | |
uint256 public volume; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.6.6; | |
import "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol"; | |
/** | |
* THIS IS AN EXAMPLE CONTRACT WHICH USES HARDCODED VALUES FOR CLARITY. | |
* PLEASE DO NOT USE THIS CODE IN PRODUCTION. | |
*/ | |
contract RandomNumberConsumer is VRFConsumerBase { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** This example code is designed to quickly deploy an example contract using Remix. | |
* If you have never used Remix, try our example walkthrough: https://docs.chain.link/docs/example-walkthrough | |
* You will need testnet ETH and LINK. | |
* - Kovan ETH faucet: https://faucet.kovan.network/ | |
* - Kovan LINK faucet: https://kovan.chain.link/ | |
*/ | |
// VRF Coordinator 0xdD3782915140c8f3b190B5D67eAc6dc5760C46E9 | |
// Key Hash 0x6c3699283bda56ad74f6b855546325b68d482e983852a7a82979cc4807b641 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract A { | |
uint public num; | |
address public sender; | |
uint public value; | |
function setVars(uint _num) public payable { |