New answers tagged remix
0
votes
0
votes
Remix IDE shortcuts?
const {MerkleTree} = require("merkletreejs"); // import merkletreejs
const keccak256 = require("keccak256");// import
let whitelistAddresses = [
"...
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 ...
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
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 ...
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/...
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/...
0
votes
Trying to issue ERC 3475 tokens
You need square brackets for the array and for the Transaction struct. See image.
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 ...
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 ...
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 ...
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-...
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.
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 ...
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).
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 ...
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, ...
Top 50 recent answers are included
Related Tags
remix × 3245solidity × 2443
contract-development × 489
go-ethereum × 206
web3js × 196
contract-design × 191
blockchain × 188
contract-deployment × 165
erc-20 × 154
metamask × 151
tokens × 145
ether × 124
gas × 104
contract-debugging × 99
truffle × 86
error × 78
solidity-0.8.x × 72
etherscan × 71
transactions × 60
arrays × 60
mapping × 57
contract-invocation × 55
ganache × 55
smart-contract-wallets × 50
dapps × 49