New answers tagged

0 votes

Can't call open trading function

did you understand the problem? i am having the same issue
cla's user avatar
  • 1
0 votes

Remix IDE shortcuts?

const {MerkleTree} = require("merkletreejs"); // import merkletreejs const keccak256 = require("keccak256");// import let whitelistAddresses = [ "...
Devesh Singhal's user avatar
0 votes

Calling Uniswap Multihop Function returns Error

found workaround just need to call the add approve tokens as a separate function then call the approve function through the swapExactInputMultihop function // SPDX-License-Identifier: MIT pragma ...
Samuel Aniss's user avatar
2 votes
Accepted

Assembly 'create2' and 'new' with salt not determining the same address

"0x4" is interpreted as a string, so the two salts are different. bytes32("0x4") != 4
0xSanson's user avatar
  • 2,764
0 votes
Accepted

Do dynamic arrays in memory require a pointer to where the length and elements are stored in the memory?

ChatGPT answered my question: Absolutely, your understanding is correct. Solidity's handling of data, especially strings, within calldata and memory follows an optimization strategy to minimize gas ...
Xirexor's user avatar
  • 127
0 votes
Accepted

How can I fetch the current dollar price of BNB in a Solidity smart contract?

Chainlink Data Feeds provide a secure, reliable, and decentralized source of off-chain data to power unique smart contract use cases for DeFi and beyond. Use Chainlink: https://data.chain.link/bsc/...
EthanOK's user avatar
  • 406
0 votes

How do you deal with relative imports in a contract you depend on?

This turned out to be unrelated to the relative imports. The issue was that the first import in my list (openzeppelin) was using the wrong compiler version. I changed this: import "@openzeppelin/...
Code on the Rocks's user avatar
0 votes

Trying to issue ERC 3475 tokens

You need square brackets for the array and for the Transaction struct. See image.
0xSanson's user avatar
  • 2,764
0 votes
Accepted

Why EVM does CALLDATALOAD and MSTORE an array parameter and its elements individually instead of CALLDATACOPY all of it?

Represents pointer. Pointing is absolute not relative to the slot itself. Absolute indexing starts after the first 4 bytes selector. Not sufficient. Arguments will consume their slots as how they are ...
Xirexor's user avatar
  • 127
0 votes

importing other contract in remix gone wrong despite write file name or path

Without the folder and file structures, exact names of the contracts, it is hard to find the issue. Anyway you can try these, Try using absolute file path instead of the relative file path. (Anyway ...
Iresh Madhusankha - DevCresix's user avatar
0 votes

Error happened while trying to execute a function inside a smart contract: Chainlink Functions Contract Deployment

Because the address is the owner itself or not the pending_address to take ownership of the contract. There are 2 steps to transfer the ownership of the contract. Current owner call function ...
Frank Kong's user avatar
1 vote
Accepted

ELI5: Converting an arbitrary gas cost in Remix IDE to USD

It is depended on following factors, Chain you are using Gas price at the time Price of the Native currency of the chain Let's consider you made the transaction on Ethereum chain just now (2023-11-...
Iresh Madhusankha - DevCresix's user avatar
1 vote
Accepted

How to format the code in Remix IDE?

As of 2023 (and possibly earlier), you can format the code by right-clicking and selecting "Format Code". You can also use the shortcut Shift + Option + F.
Code on the Rocks's user avatar
1 vote

How signature verification works?

This is not signing, it is hashing of a message, the hash is then used. "Signed" in function name means addition of "\x19Ethereum Signed Message:\n32" here. I think these methods ...
crystalbit's user avatar
0 votes

require message is not coming?

Using the low-level call function will not revert anything. You can only judge whether the execution is successful based on the result in the return value (result, data).
EthanOK's user avatar
  • 406
0 votes

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Returned error: invalid opcode

You can only test in Goerli or Sepolia. In remix, importing the openzeppelin library requires your compiled version ^0.8.20; while most bsc or other Ethereum compatible chains are not yet compatible ...
EthanOK's user avatar
  • 406
0 votes

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Returned error: invalid opcode

There may be other issues, but the first thing that pops out to me is an array out-of-bounds issue. If you try to access (read or write) to an index in an array that is larger than the arrays length, ...
natewelch_'s user avatar
  • 11.9k

Top 50 recent answers are included