smartcontractkit / functions-hardhat-starter-kit Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
this line is not generic enough. Each time that a new network is supported, the line will have to be modified. I'd propose something like this:
I'm using netowrk localFunctionsTestnet
and when trying to run a local functions-request
the following is happening:
➜ npx hardhat functions-request --network localFunctionsTestnet --contract 0xef9fDC41236486FD497b0811FA197F8195bb1cB4 --subid 1 --simulate true
secp256k1 unavailable, reverting to browser version
Response returned by script during local simulation: 3
Local simulation of source code completed...
If the request's callback uses all 100,000 gas, this request will charge the subscription an estimated 0.37846 LINK
Continue? Enter (y) Yes / (n) No
y
⣾ Functions request has been initiated in transaction 0xc46e62b3018891d6e9ac902be6b079c54cd24b246bf35526011a3b06b5a42eb4 with request ID 0x80bd3df61d97ffc35adf369dce738a86027f69df4ef61b1bcca8c042247f4698. Note the request ID may change if a re-org occurs, but the transaction hash will remain constant.
Waiting for fulfillment from the Decentralized Oracle Network...
^C⏎
That keeps waiting, but never finishes. Although, when I check the on-chain resposne, it did happen and update the value in the contract:
➜ npx hardhat functions-read --network localFunctionsTestnet --contract 0xef9fDC41236486FD497b0811FA197F8195bb1cB4 05/24/24 - 10:11
secp256k1 unavailable, reverting to browser version
Reading data from Functions consumer contract 0xef9fDC41236486FD497b0811FA197F8195bb1cB4 on network localFunctionsTestnet
On-chain response represented as a hex string: 0x0000000000000000000000000000000000000000000000000000000000000003
3
It is possible to reproduce this problem with the steps in the readme In this folder repo's "fork" of this starter kit:
https://github.com/propytech-dao/chainlink-hackaton/tree/main/functions-hardhat-starter-kit#readme
Hey @justinkaseman
I get this error TypeError: spinner.error is not a function
when the UserCallbackError
event is fired.
My npx hardhat functions-simulate
is failing due to the length of the response. If I remove ",Twitch Contrulla" from the below decoded string, the fulfillRequest function is successful. Is it something we should make even more obvious in the console logs for devs to understand whether it comes from gaslimit or response bytes limitation? @KuphJr
`Output from sandboxed source code
Output represented as a hex string: 0x53686173746120372c547769746368204a764d616669612c5477697463682057696c6c727a2c50575220776f727468756b2c54776974636820436f6e7472756c6c61
Decoded as a string: Shasta 7,Twitch JvMafia,Twitch Willrz,PWR worthuk,Twitch Contrulla
Error encountered when calling fulfillRequest in client contract.
Ensure the fulfillRequest function in the client contract is correct and the --gaslimit is sufficent.
Estimated transmission cost: 0.083559307848617261 LINK (This will vary based on gas price)
Base fee: 0.0 LINK
Total estimated cost: 0.083559307848617261 LINK`
Hello @justinkaseman
Getting this error ReferenceError: idKey is not defined
Fixed if I replace idKey
with this.idKey
I found an error using DON-hosted method but the User-hosted method is working for me while doing the request.
This is my error for the DON-hosted method:
{"jsonrpc":"2.0","id":"89015367","error":{"code":-32600,"message":"sender has insufficient balance: juels"}}
My EOA, the Contract Address and the Subscription, each everyone of them were funded more than 3 Links.
npm install yields
16 vulnerabilities (7 moderate, 5 high, 4 critical)
forcing a patch introduces breaking changes and more vulnerabilities in the audit tree
Is there an existing feature branch getting these to 0?
-Brett-
I create a sub from account 1 than created a transfer request and than changed private key in env to account 2 and tried the command but got the following error :
Error: This command requires a second wallet's private key to be made available in networks.js
at SimpleTaskDefinition.action (/home/viraj/Documents/Blockchain/functions-hardhat-starter-kit/tasks/Functions-billing/accept.js:10:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Environment._runTaskDefinition (/home/viraj/Documents/Blockchain/functions-hardhat-starter-kit/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
at Environment.run (/home/viraj/Documents/Blockchain/functions-hardhat-starter-kit/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
at main (/home/viraj/Documents/Blockchain/functions-hardhat-starter-kit/node_modules/hardhat/src/internal/cli/cli.ts:280:7)```
Hello @justinkaseman,
I noticed that when testing the feat/remove-inline-secrets branch, a new folder named .chainlink_functions appears. Shouldn't we add this folder to the .gitignore file?
Untracked files:
(use "git add <file>..." to include in what will be committed)
.chainlink_functions/
Description:
Hello, and thank you for providing this excellent boilerplate for working with Chainlink Functions.
I am currently developing a Smart Contract and utilizing your provided localFunctionsTestnet
for testing. However, I've encountered an issue related to testing environments. Specifically, the need to manually run localFunctionsTestnet
prevents me from taking full advantage of Hardhat's loadFixture
utility, which is instrumental for snapshotting test states.
Problem:
The localFunctionsTestnet
, as part of the functions-toolkit, uses Ganache under the hood. This setup conflicts with Hardhat's default behavior, particularly with the loadFixture
utility, which relies on Hardhat's in-memory network for snapshotting and reverting state between tests. The result is an inability to efficiently manage test state, leading to more complex and time-consuming test setups.
Expected Behavior:
Ideally, I would like to seamlessly integrate the localFunctionsTestnet
with Hardhat's testing environment, enabling me to use loadFixture
for efficient test state management. This integration would greatly enhance the development workflow and testing efficiency.
Steps to Reproduce:
loadFixture
utility while localFunctionsTestnet
is running.Possible Solutions:
I'm unsure of the best way to resolve this issue but have considered a few options:
localFunctionsTestnet
for Compatibility: Modify localFunctionsTestnet
to work seamlessly with Hardhat's in-memory network, allowing us to use loadFixture
effectively.localFunctionsTestnet
alongside Hardhat.localFunctionsTestnet
Setup in Hardhat: Develop a script to configure Hardhat's test environment similar to localFunctionsTestnet
, ensuring consistency across testing platforms.Thank you for your attention to this issue. Any guidance or updates to improve this integration would be greatly appreciated!
If you verify before polygonscan/etherscan has a chance to process the transaction, you'll run into an error where it can't verify the code.
These lines need to have a wait
command for 3 number of blocks (I've found 6 to be pretty good. 4 is probably fine too. 2 is too low. )
I used a mix of docs, readme and the following VDO (https://youtu.be/nKRZ1R2BC4Q?t=587) to familiarize myself with Chainlink functions.
While doing so I came across the following behavior, which appears to deviate from the behavior outlined in the docs/tutorial videos. I hope I am not wrong about this ;) :
EXPECTED BEHAVIOR:
npx hardhat functions-request --network polygonMumbai --contract [contractid] --subid [subid]
OBSERVED BEHAVIOR (see screenshot below):
npx hardhat functions-request --network polygonMumbai --contract [contractid] --subid [subid]
Other than that, its a great example, and a wonderful 'getting started' experience.
We need implement this function
FunctionsModule.encode(["uint256", "string", "int256"], [1, "test", -1]);
Because many production app needs multiple value response. it able to decode multiple value like this
function fulfillRequest(bytes32 requestId, bytes memory response, bytes memory err) internal override {
abi.decode(response, (uint256, string, int256));
}
Some API responses & function computations are larger than 32 bytes so the entire response can't be saved in latestResponse
. Most notably ChatGPT due to the way it generates tokens (which I assume a lot of people will be trying out).
In those cases it will throw this error: Error message returned to client contract: "returned Buffer >256 bytes"
hi,
I am trying to run
npx hardhat function-simulate
on an unchanged repo
and I am getting:
Duplicate definition of Transfer (Transfer(address,address,uint256,bytes), Transfer(address,address,uint256))
Error: Transaction reverted: function call to a non-contract account
at FunctionsBillingRegistry.getFeedData (contracts/dev/functions/FunctionsBillingRegistry.sol:517)
at FunctionsBillingRegistry.estimateCost (contracts/dev/functions/FunctionsBillingRegistry.sol:289)
at FunctionsBillingRegistry.startBilling (contracts/dev/functions/FunctionsBillingRegistry.sol:334)
at FunctionsOracle.sendRequest (contracts/dev/functions/FunctionsOracle.sol:172)
at FunctionsConsumer.sendRequest (contracts/dev/functions/FunctionsClient.sol:63)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at HardhatNode._mineBlockWithPendingTxs (/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:1802:23)
at HardhatNode.mineBlock (/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:491:16)
at EthModule._sendTransactionAndReturnHash (/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/hardhat/src/internal/hardhat-network/provider/modules/eth.ts:1522:18)
at HardhatNetworkProvider.request (/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:118:18)
at EthersProviderWrapper.send (/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)
tested on:
I could deploy a contract to sepolia
let me know if I am just dumb or I am just missing something
It is not clear what a basic implementation of a deployed contract looks like in the docs. The current docs require using Hardhat to setup. This goes against the standard in complementary documentation for subscriptions and VRF, things that will be frequently used with this service.
While Hardhat has its advantages in testing, having different styles of documentation makes it harder for developers to understand the macro picture of the underlying workings. It would be very nice to see a folder with compiled examples at the very least!
Problem :
Chainlink Functions is currently in a closed testing phase.
For access sign up here:
https://functions.chain.link
I'm following step by step : https://docs.chain.link/chainlink-functions/getting-started
How to get subscription with ID ?
I have not been able to verify a contract since the process has changed and it is optional.
I tried using: --verify true
or updated deploy.js
to true
by default or running npx hardhat verify
All contract creation transaction are pending (example)
Probably related to this PR @aelmanaa
Could come from the process.env.ETHERSCAN_API_KEY || process.env.POLYGONSCAN_API_KEY
section
In the documentation, it says that developers can require built-in crypto module. Does this crypto module refer to the encryptSecrets script in the sandbox folder? If not, does this module include keccak256 hash function? If it does, how can we import this hash function?
Subscription details are:
Subscription 23 owner: 0x208AA722Aca42399eaC5192EE778e4D42f4E5De3
Balance: 0.000000091 LINK
1 authorized consumer contract:
[ '0x4CA9b22A38dC98Af6195E595FE8200aEBf833A0C' ]
My contract address is verified.
When I try and run yhh functions-sub-cancel --network mumbai --subid 23
it works all the way to line 50 of cancel.js
where we console out the number of confirmations we are waiting for.
And then it fails with the following output in console (and here is the polygonscan tx hash data).
I've seen CALL_EXCEPTION
before where my address wasn't whitelisted, but that's not the case as I've run other commands. All the other commands work except for this.
Waiting 2 blocks for transaction 0x8ba5c009dc40d4f51b5347c7b844deb74be7ed8f622d9ee0fb9942b107a95649 to be confirmed...
An unexpected error occurred:
Error: transaction failed [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (transactionHash="0x8ba5c009dc40d4f51b5347c7b844deb74be7ed8f622d9ee0fb9942b107a95649", transaction={"hash":"0x8ba5c009dc40d4f51b5347c7b844deb74be7ed8f622d9ee0fb9942b107a95649","type":2,"accessList":[],"blockHash":null,"blockNumber":null,"transactionIndex":null,"confirmations":0,"from":"0x208AA722Aca42399eaC5192EE778e4D42f4E5De3","gasPrice":{"type":"BigNumber","hex":"0x59682f12"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x59682f00"},"maxFeePerGas":{"type":"BigNumber","hex":"0x59682f12"},"gasLimit":{"type":"BigNumber","hex":"0x1eddd8"},"to":"0xE7e4882E6cc98b4c20A5155ca83A18C85aaBfCe6","value":{"type":"BigNumber","hex":"0x00"},"nonce":59,"data":"0xd7ae1d300000000000000000000000000000000000000000000000000000000000000017000000000000000000000000208aa722aca42399eac5192ee778e4d42f4e5de3","r":"0xd58d55d4519718a39c48e5fc03251bd16968e99e786c294dd271a5f10ae63ac1","s":"0x3178dd6ed593ab840b293b98c967d05c63a16dc95fa0fe90c1f381f07e9983cf","v":0,"creates":null,"chainId":80001}, receipt={"to":"0xE7e4882E6cc98b4c20A5155ca83A18C85aaBfCe6","from":"0x208AA722Aca42399eaC5192EE778e4D42f4E5De3","contractAddress":null,"transactionIndex":2,"gasUsed":{"type":"BigNumber","hex":"0xa813"},"logsBloom":"0x00000000000000000000000000000000000000080000000000000010000000000000000000000020000000008000000000008000000000000000000000000000000000000000000000000000000000800000000002000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000001000000000000000000000000000000000000000000000000000000000000000100000","blockHash":"0xafd003259728121c69a1d5bc12f7bb8b60659cbf88de4bb6c3f8bcf3640780fb","transactionHash":"0x8ba5c009dc40d4f51b5347c7b844deb74be7ed8f622d9ee0fb9942b107a95649","logs":[{"transactionIndex":2,"blockNumber":31009926,"transactionHash":"0x8ba5c009dc40d4f51b5347c7b844deb74be7ed8f622d9ee0fb9942b107a95649","address":"0x0000000000000000000000000000000000001010","topics":["0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63","0x0000000000000000000000000000000000000000000000000000000000001010","0x000000000000000000000000208aa722aca42399eac5192ee778e4d42f4e5de3","0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99"],"data":"0x00000000000000000000000000000000000000000000000000003ab301937d0000000000000000000000000000000000000000000000000002420d11f14a39e80000000000000000000000000000000000000000000009d98d2832e49b77de620000000000000000000000000000000000000000000000000241d25eefb6bce80000000000000000000000000000000000000000000009d98d286d979d0b5b62","logIndex":6,"blockHash":"0xafd003259728121c69a1d5bc12f7bb8b60659cbf88de4bb6c3f8bcf3640780fb"}],"blockNumber":31009926,"confirmations":3,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x05e7d8"},"effectiveGasPrice":{"type":"BigNumber","hex":"0x59682f0f"},"status":0,"type":2,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.7.2)
at Logger.makeError (/Users/zubinpratap/Documents/code/ocr-on-demand/demor2-billing-tooling/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
at Logger.throwError (/Users/zubinpratap/Documents/code/ocr-on-demand/demor2-billing-tooling/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
at EthersProviderWrapper.<anonymous> (/Users/zubinpratap/Documents/code/ocr-on-demand/demor2-billing-tooling/node_modules/@ethersproject/providers/src.ts/base-provider.ts:1549:24)
at step (/Users/zubinpratap/Documents/code/ocr-on-demand/demor2-billing-tooling/node_modules/@ethersproject/providers/lib/base-provider.js:48:23)
at Object.next (/Users/zubinpratap/Documents/code/ocr-on-demand/demor2-billing-tooling/node_modules/@ethersproject/providers/lib/base-provider.js:29:53)
at fulfilled (/Users/zubinpratap/Documents/code/ocr-on-demand/demor2-billing-tooling/node_modules/@ethersproject/providers/lib/base-provider.js:20:58) {
reason: 'transaction failed',
code: 'CALL_EXCEPTION',
transactionHash: '0x8ba5c009dc40d4f51b5347c7b844deb74be7ed8f622d9ee0fb9942b107a95649',
transaction: {
hash: '0x8ba5c009dc40d4f51b5347c7b844deb74be7ed8f622d9ee0fb9942b107a95649',
type: 2,
accessList: [],
blockHash: null,
blockNumber: null,
transactionIndex: null,
confirmations: 0,
from: '0x208AA722Aca42399eaC5192EE778e4D42f4E5De3',
gasPrice: BigNumber { value: "1500000018" },
maxPriorityFeePerGas: BigNumber { value: "1500000000" },
maxFeePerGas: BigNumber { value: "1500000018" },
gasLimit: BigNumber { value: "2022872" },
to: '0xE7e4882E6cc98b4c20A5155ca83A18C85aaBfCe6',
value: BigNumber { value: "0" },
nonce: 59,
data: '0xd7ae1d300000000000000000000000000000000000000000000000000000000000000017000000000000000000000000208aa722aca42399eac5192ee778e4d42f4e5de3',
r: '0xd58d55d4519718a39c48e5fc03251bd16968e99e786c294dd271a5f10ae63ac1',
s: '0x3178dd6ed593ab840b293b98c967d05c63a16dc95fa0fe90c1f381f07e9983cf',
v: 0,
creates: null,
chainId: 80001,
wait: [Function (anonymous)]
},
receipt: {
to: '0xE7e4882E6cc98b4c20A5155ca83A18C85aaBfCe6',
from: '0x208AA722Aca42399eaC5192EE778e4D42f4E5De3',
contractAddress: null,
transactionIndex: 2,
gasUsed: BigNumber { value: "43027" },
logsBloom: '0x00000000000000000000000000000000000000080000000000000010000000000000000000000020000000008000000000008000000000000000000000000000000000000000000000000000000000800000000002000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000001000000000000000000000000000000000000000000000000000000000000000100000',
blockHash: '0xafd003259728121c69a1d5bc12f7bb8b60659cbf88de4bb6c3f8bcf3640780fb',
transactionHash: '0x8ba5c009dc40d4f51b5347c7b844deb74be7ed8f622d9ee0fb9942b107a95649',
logs: [ [Object] ],
blockNumber: 31009926,
confirmations: 3,
cumulativeGasUsed: BigNumber { value: "387032" },
effectiveGasPrice: BigNumber { value: "1500000015" },
status: 0,
type: 2,
byzantium: true
}
}
error Command failed with exit code 1.
Trying to add a newly deployed contract to an existing billing subid account the same wallet (deployer) owns.
I assume that this function has been disabled by default and the .ignore file has to be updated
Error:
Found & ignored ./build/artifacts ; is listed in .gitignore
Found & ignored ./build/cache ; is listed in .gitignore
hi,
I can deploy a contract, and I created a subcription easliy, but when I try to run:
npx hardhat functions-request --network sepolia --contract 0x1Ae7F4caf34BbBaa13CFc7Ec5f835506fc807f0b --subid 57
then I get:
❯ npx hardhat functions-request --network sepolia --contract 0x1Ae7F4caf34BbBaa13CFc7Ec5f835506fc807f0b --subid 57
secp256k1 unavailable, reverting to browser version
Simulating Functions request locally...
__Console log messages from sandboxed code__
__Output from sandboxed source code__
Output represented as a hex string: 0x00000000000000000000000000000000000000000000000000000000000f50ed
Decoded as a uint256: 1003757
If all 100000 callback gas is used, this request is estimated to cost 0.426465500634489687 LINK
Continue? (y) Yes / (n) No
y
Requesting new data for FunctionsConsumer contract 0x1Ae7F4caf34BbBaa13CFc7Ec5f835506fc807f0b on network sepolia
Waiting 2 blocks for transaction 0x84f976729da85d554547dcc51222d672beba615cb95e1110e5112ab84e785307 to be confirmed...
/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/@ethersproject/logger/src.ts/index.ts:269
const error: any = new Error(message);
^
Error: transaction failed [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (transactionHash="0x84f976729da85d554547dcc51222d672beba615cb95e1110e5112ab84e785307", transaction={"hash":"0x84f976729da85d554547dcc51222d672beba615cb95e1110e5112ab84e785307","type":0,"accessList":null,"blockHash":null,"blockNumber":null,"transactionIndex":null,"confirmations":0,"from":"0x4618B0c5A1d6957F0b9620A4504b08Ed31b22736","gasPrice":{"type":"BigNumber","hex":"0x0b44dd6400"},"gasLimit":{"type":"BigNumber","hex":"0x16e360"},"to":"0x1Ae7F4caf34BbBaa13CFc7Ec5f835506fc807f0b","value":{"type":"BigNumber","hex":"0x00"},"nonce":8,"data":"0xd22b224a00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006a0000000000000000000000000000000000000000000000000000000000000003900000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000004622f2f2054686973206578616d706c652073686f777320686f7720746f2063616c63756c617465206120636f6e74696e756f75736c7920636f6d706f756e64696e6720696e746572657374656420726174652e0a2f2f20546869732063616c63756c6174696f6e20776f756c642072657175697265207369676e69666963616e74206f6e2d636861696e206761732c20627574206973206561737920666f72206120646563656e7472616c697a6564206f7261636c65206e6574776f726b2e0a0a2f2f20417267756d656e74732063616e2062652070726f7669646564207768656e2061207265717565737420697320696e697461746564206f6e2d636861696e20616e64207573656420696e20746865207265717565737420736f7572636520636f64652061732073686f776e2062656c6f770a636f6e7374207072696e636970616c416d6f756e74203d207061727365496e7428617267735b345d290a636f6e73742041505954696d6573313030203d207061727365496e7428617267735b355d290a636f6e7374204150594173446563696d616c50657263656e74616765203d2041505954696d6573313030202f20313030202f203130300a0a636f6e73742074696d65496e5965617273203d2031202f203132202f2f20726570726573656e74732031206d6f6e74680a636f6e73742065756c6572734e756d626572203d20322e373138330a0a2f2f20436f6e74696e756f75736c792d636f6d706f756e64696e6720696e74657265737420666f726d756c613a2041203d2050655e287274290a636f6e737420746f74616c416d6f756e744166746572496e746572657374203d207072696e636970616c416d6f756e74202a2065756c6572734e756d626572202a2a20284150594173446563696d616c50657263656e74616765202a2074696d65496e5965617273290a0a2f2f2054686520736f7572636520636f6465204d5553542072657475726e206120427566666572206f722074686520726571756573742077696c6c2072657475726e20616e206572726f72206d6573736167650a2f2f20557365206f6e65206f662074686520666f6c6c6f77696e672066756e6374696f6e7320746f20636f6e7665727420746f20612042756666657220726570726573656e74696e672074686520726573706f6e73652062797465732074686174206172652072657475726e656420746f2074686520636c69656e7420736d61727420636f6e74726163743a0a2f2f202d2046756e6374696f6e732e656e636f646555696e743235360a2f2f202d2046756e6374696f6e732e656e636f6465496e743235360a2f2f202d2046756e6374696f6e732e656e636f6465537472696e670a2f2f204f722072657475726e206120637573746f6d2042756666657220666f72206120637573746f6d206279746520656e636f64696e670a72657475726e2046756e6374696f6e732e656e636f646555696e74323536284d6174682e726f756e6428746f74616c416d6f756e744166746572496e74657265737429290a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111432a9d448855c59279131ec8bbcf842e02b16a4e5c4c2ceaa034cf952623f76ebc3bf93fc03c53fc857b68c21a93dee6f5782e21bf8823081fe0316db94dc0eadadfddcf41178016d930bd93fad5052bd8753b20f7e0876d5bc02968affd6f2f5780989ebf66a84bd4d3a46a88892400576b1583b406e914d2be8af662dbe34447bd9e899bd98538070c8191afd76aeae4c3d48b411274397347a3d44a7af76e8c1a42b7f07a916ed073bc9e652af68222b4565d474cb43eb7bc13d8ddd9c2c565bc23169ca87be875c6ede1fc331243cb49644a6c0551c5deb3415540b49fd4650d52c35547545d746c0859904f9bf67af6bcfbeee4279c28a38afa013065d27c31853cb3418d8659eb778eb414778e2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000131000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007626974636f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b6274632d626974636f696e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000362746300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007313030303030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033435300000000000000000000000000000000000000000000000000000000000","r":"0xb2c49b4ec653151dbc272b02a8158076bca45c8f1efa37631bf65a4f6c83706c","s":"0x22689e70531ee85988f198026af642709553831a1366a9f44f155149626f5c9c","v":22310258,"creates":null,"chainId":11155111}, receipt={"to":"0x1Ae7F4caf34BbBaa13CFc7Ec5f835506fc807f0b","from":"0x4618B0c5A1d6957F0b9620A4504b08Ed31b22736","contractAddress":null,"transactionIndex":1,"gasUsed":{"type":"BigNumber","hex":"0x029fde"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0x597ac7823dccb6b69c7fb18482b12b048fc6d3c43c930f36500d31e80d8060c0","transactionHash":"0x84f976729da85d554547dcc51222d672beba615cb95e1110e5112ab84e785307","logs":[],"blockNumber":3024050,"confirmations":2,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x02f9e6"},"effectiveGasPrice":{"type":"BigNumber","hex":"0x0b44dd6400"},"status":0,"type":0,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.7.2)
at Logger.makeError (/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
at Logger.throwError (/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
at EthersProviderWrapper.<anonymous> (/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/@ethersproject/providers/src.ts/base-provider.ts:1549:24)
at step (/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/@ethersproject/providers/lib/base-provider.js:48:23)
at Object.next (/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/@ethersproject/providers/lib/base-provider.js:29:53)
at fulfilled (/Users/benvass/Projects/functions-hardhat-starter-kit/node_modules/@ethersproject/providers/lib/base-provider.js:20:58)
Hey @justinkaseman
Should add the new
keyword
Running into this issue:
TypeError: Class constructor RequestStore cannot be invoked without 'new'
I want to report an edge case with the tooling. Test the following for an AutomatedFunctionsConsumer contract. Make sure that your config file uses secrets:
In your editor, open the store of your contract. It should be in ./chainlink_functions/80001-polygonMumbai/automatedConsumer/<your-contract-address>.json
You can scroll down to the secretsURLs key. You should see a gist (Example: https://gist.github.com/aelmanaa/c679709234e213dfa2ca74097d0b42a3/raw
)
Run npx hardhat functions-set-auto-request
to update the request object. At this point, the tooling generates a new gist and tries to delete previous gists.
Successfully created encrypted secrets Gist: https://gist.github.com/aelmanaa/358e6987764e254b0a5689910dce7b7b
Be sure to delete the Gist https://gist.github.com/aelmanaa/358e6987764e254b0a5689910dce7b7b once encrypted secrets are no longer in use!
Setting Functions request
Waiting 2 block for transaction 0xa72356e0d816774f0597bffcffb8296e8cea74c4725e603d3771d116381cb889 to be confirmed...
Attempting to clean up previous GitHub Gist secrets
In my case, a new gist https://gist.github.com/aelmanaa/358e6987764e254b0a5689910dce7b7b
, has been created. However, the old one, https://gist.github.com/aelmanaa/c679709234e213dfa2ca74097d0b42a3/raw
has not been deleted. (I had to delete it manually).
IMO, there are 2 UX issues:
Attempting to clean up previous GitHub Gist secrets
If you are not going to remove the gist secretsA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.