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.19; | |
import {FunctionsClient} from "@chainlink/contracts/src/v0.8/functions/v1_0_0/FunctionsClient.sol"; | |
import {FunctionsRequest} from "@chainlink/contracts/src/v0.8/functions/v1_0_0/libraries/FunctionsRequest.sol"; | |
import {ERC721} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.5/contracts/token/ERC721/ERC721.sol"; | |
import {ERC721URIStorage} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.5/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
/** | |
* THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED VALUES FOR CLARITY. |
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
cronTriggerInterval: 60 | |
dataFeedsCacheContractAddress: 0xb79288ce6a58b7af2230a77f296f6a13b78a0292 | |
feedId: 0x029BFA81517000400000000000000000 | |
endpointTimeoutMilliseconds: 5000 | |
chainWriterCapabilityLabel: [email protected] |
This file has been truncated, but you can view the full file.
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
y///PykFAsoOAADrJQ+JFN7+GFMEQLBxAADwd394H+Mf4ob/aZbFeSB1SSDdRdZ5NpqNZLvB9AAAUO3nAVBVVVVV3z7AWAS2yc4sf/t8C/88/3wLiii2oIhiC4ootqCIYguKKLagiGILiii2oIhiC4ootqCIYguKKLagiGILiii2oIhiC4ootqCIYguKKLY96lVY1aMjDHsawsp6FO6J0tDxmHoNu7fcp34d5wn16STDvlMIK+tpuC9KQ8cz6jfs/vKABnUWz9aAzmE4cC7CynoePBCloeP5GjTswfKQhnUBL9SQLmI4dDHCynoJPBSloeOlGjbs4fKIRnUZL9eIrmA4ciXCynoVPBKloePVGjXs0fKYxnUNr9WYrmM4dj3CynoDPBaloeONGjfs8fKEJnUTb9aEbmE4cSvCynobPBGloePtmjTsyfKUpnUH79SU7mI4dTfCynoPPBWloeO9mjbs6fKMZnUf79eMHmA48yDCyvoQPBOloePDmjXs2fKc5vUIH9WcHmM49zjCyvoEPBeloeOTmjfs+fKCFvUUn9aCnmG48CzCyvocvBCloePzWjTsxfKSlvUCX9SSXmK49DLCyvoKvBSloeOrWjbs5fKKVvUaX9eK3mC48ibCyvoWvBKloePbWjXs1fKa1vUO39Wa3mO49j7CyvoBvBaloeOHWjfs9fKGNvURP9aGPmG48SnCyvoZvBGloePn2jTszfKWtvUFv9SWvmK49TXCyvoNvBWloeO32jbs7fKOdvUdv9eOfmC48yPCyvoTvBOloePP2jXs3fKe9vULf9WefmO49zvCyvoHvBeloeOf2jfs/fKBDvUX/9aB/mF48C/CyvoffBCloeP/OjTsw/KPBQQAjtmydMAIMNAggw0x1DDDjTDSKKONMdY4400w0SSTTTHVNNPNMNMss80x1zzzLbDQIostsdQyy62w0iqrrbHWOuttsNEmm22x1Tbb7bDTLrvtsdc++x1w0CGHHXHUMcedcNIpp51x1jnOdZ7zXeBC |
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
cronTriggerInterval: 60 | |
dataFeedsCacheContractAddress: 0xb79288ce6a58b7af2230a77f296f6a13b78a0292 | |
feedId: 0x029BFA81517000400000000000000000 | |
endpointTimeoutMilliseconds: 5000 | |
chainWriterCapabilityLabel: [email protected] |
This file has been truncated, but you can view the full file.
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
y///PykFAsoOAADrJQ+JFN7+GFMEQLBxAADwd394H+Mf4ob/aZbFeSB1SSDdRdZ5NpqNZLvB9AAAUO3nAVBVVVVV3z7AWAS2yc4sf/t8C/88/3wLiii2oIhiC4ootqCIYguKKLagiGILiii2oIhiC4ootqCIYguKKLagiGILiii2oIhiC4ootqCIYguKKLY96lVY1aMjDHsawsp6FO6J0tDxmHoNu7fcp34d5wn16STDvlMIK+tpuC9KQ8cz6jfs/vKABnUWz9aAzmE4cC7CynoePBCloeP5GjTswfKQhnUBL9SQLmI4dDHCynoJPBSloeOlGjbs4fKIRnUZL9eIrmA4ciXCynoVPBKloePVGjXs0fKYxnUNr9WYrmM4dj3CynoDPBaloeONGjfs8fKEJnUTb9aEbmE4cSvCynobPBGloePtmjTsyfKUpnUH79SU7mI4dTfCynoPPBWloeO9mjbs6fKMZnUf79eMHmA48yDCyvoQPBOloePDmjXs2fKc5vUIH9WcHmM49zjCyvoEPBeloeOTmjfs+fKCFvUUn9aCnmG48CzCyvocvBCloePzWjTsxfKSlvUCX9SSXmK49DLCyvoKvBSloeOrWjbs5fKKVvUaX9eK3mC48ibCyvoWvBKloePbWjXs1fKa1vUO39Wa3mO49j7CyvoBvBaloeOHWjfs9fKGNvURP9aGPmG48SnCyvoZvBGloePn2jTszfKWtvUFv9SWvmK49TXCyvoNvBWloeO32jbs7fKOdvUdv9eOfmC48yPCyvoTvBOloePP2jXs3fKe9vULf9WefmO49zvCyvoHvBeloeOf2jfs/fKBDvUX/9aB/mF48C/CyvoffBCloeP/OjTsw/KPBQQAjtmydMAIMNAggw0x1DDDjTDSKKONMdY4400w0SSTTTHVNNPNMNMss80x1zzzLbDQIostsdQyy62w0iqrrbHWOuttsNEmm22x1Tbb7bDTLrvtsdc++x1w0CGHHXHUMcedcNIpp51x1jnOdZ7zXeBC |
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
cronTriggerInterval: 60 | |
dataFeedsCacheContractAddress: 0xb79288ce6a58b7af2230a77f296f6a13b78a0292 | |
feedId: 0x029BFA81517000400000000000000000 | |
endpointTimeoutMilliseconds: 5000 | |
chainWriterCapabilityLabel: [email protected] |
This file has been truncated, but you can view the full file.
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
y///PykFAsoOAADrJQ+JFN7+GFMEQLBxAADwd394H+Mf4ob/aZbFeSB1SSDdRdZ5NpqNZLvB9AAAUO3nAVBVVVVV3z7AWAS2yc4sf/t8C/88/3wLiii2oIhiC4ootqCIYguKKLagiGILiii2oIhiC4ootqCIYguKKLagiGILiii2oIhiC4ootqCIYguKKLY96lVY1aMjDHsawsp6FO6J0tDxmHoNu7fcp34d5wn16STDvlMIK+tpuC9KQ8cz6jfs/vKABnUWz9aAzmE4cC7CynoePBCloeP5GjTswfKQhnUBL9SQLmI4dDHCynoJPBSloeOlGjbs4fKIRnUZL9eIrmA4ciXCynoVPBKloePVGjXs0fKYxnUNr9WYrmM4dj3CynoDPBaloeONGjfs8fKEJnUTb9aEbmE4cSvCynobPBGloePtmjTsyfKUpnUH79SU7mI4dTfCynoPPBWloeO9mjbs6fKMZnUf79eMHmA48yDCyvoQPBOloePDmjXs2fKc5vUIH9WcHmM49zjCyvoEPBeloeOTmjfs+fKCFvUUn9aCnmG48CzCyvocvBCloePzWjTsxfKSlvUCX9SSXmK49DLCyvoKvBSloeOrWjbs5fKKVvUaX9eK3mC48ibCyvoWvBKloePbWjXs1fKa1vUO39Wa3mO49j7CyvoBvBaloeOHWjfs9fKGNvURP9aGPmG48SnCyvoZvBGloePn2jTszfKWtvUFv9SWvmK49TXCyvoNvBWloeO32jbs7fKOdvUdv9eOfmC48yPCyvoTvBOloePP2jXs3fKe9vULf9WefmO49zvCyvoHvBeloeOf2jfs/fKBDvUX/9aB/mF48C/CyvoffBCloeP/OjTsw/KPBQQAjtmydMAIMNAggw0x1DDDjTDSKKONMdY4400w0SSTTTHVNNPNMNMss80x1zzzLbDQIostsdQyy62w0iqrrbHWOuttsNEmm22x1Tbb7bDTLrvtsdc++x1w0CGHHXHUMcedcNIpp51x1jnOdZ7zXeBC |
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
[ | |
{ | |
"constant": true, | |
"inputs": [], | |
"name": "name", | |
"outputs": [ | |
{ | |
"name": "", | |
"type": "string" | |
} |
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
const gptPrompt = args[0]; | |
const postData = { | |
model: "gpt-3.5-turbo", | |
messages: [{ role: "user", content: gptPrompt }], | |
temperature: 0, | |
}; | |
const openAIResponse = await Functions.makeHttpRequest({ | |
url: "https://api.openai.com/v1/chat/completions", |
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.19; | |
import {FunctionsClient} from "@chainlink/contracts/src/v0.8/functions/dev/v1_0_0/FunctionsClient.sol"; | |
import {ConfirmedOwner} from "@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwner.sol"; | |
import {FunctionsRequest} from "@chainlink/contracts/src/v0.8/functions/dev/v1_0_0/libraries/FunctionsRequest.sol"; | |
/** | |
* @title Chainlink Functions example on-demand consumer contract example | |
*/ |
NewerOlder