Skip to main content

New answers tagged

0 votes

How to store IPFS hash using bytes32?

You can use keccak256 which is bytes32. You pre-calculate the hash of your content (like metadata json) and store it in the contract. Then, you can use it to construct an IPFS CIDv0 or CIDv1 on the ...
tikonoff's user avatar
  • 330
1 vote

How to load the first 4 bytes from a bytes calldata var?

There's an even faster way to get the first 4 bytes of calldata: accessing the global variable msg.sig will return the first 4 bytes of calldata and give you access to the function selector. This is ...
Morningstar's user avatar
0 votes

How do I call the contract function using ethers.js with bytes parameter, encryptedSecretsUrl? Using Chainlink Functions, sendRequest function

I just found out that I forgot to add my contract as chainlink subscription consumer which was the mistake. Sending encryptedSecretsUrl as a string to call the function worked perfectly fine. Thank ...
Pyakhurel Pasas's user avatar

Top 50 recent answers are included