ethereum Questions
4
Solved
When looking at sample contracts, sometimes arrays are declared in methods with "memory" and sometimes they aren't. What's the difference?
Bridal asked 21/11, 2015 at 2:48
2
On the ethers documentation, it says that the two most commons signers are:
Wallet, which is a class which knows its private key and can execute any operations with it.
JsonRpcSigner, which is c...
Stanchion asked 5/4, 2022 at 16:49
2
Solved
I'm a newbie in Solidity, and I have a question about multiple inheritances.
So if I have some contracts like:
contract A {
function foo() public virtual {
console.log("A");
}
}
cont...
Grimonia asked 3/4, 2022 at 23:16
4
Solved
Im currently trying to use Infura to run on my machine thru Web3. When I set to run my node index.js file I get the following error:
Unhandled rejection Error: This contract object doesn't have a...
2
I have been trying to send a transaction on the Ethereum testnet Rinkeby for the past few days and keep getting this error no matter how much I increase the gas to.
"Unhandled rejection Error...
Robot asked 15/6, 2018 at 6:23
3
Solved
I am writing an automated test suite that needs to test functions against Uniswap v2 style automated market marker: do swaps and use different order routing. Thus, routers need to be deployed.
Are ...
5
Solved
I tried solidity example like as above in remix, solidity version > 0.5.0
But I am getting this error now.
What is the way to solve this error?
contract MyContract {
string value;
function get(...
Crate asked 6/10, 2019 at 15:39
1
Solved
I'm writing unit tests using Hardhat's mainnet fork, and for a test I want to check the owner account's initial balance of an ERC20 token, in particular DAI. Here's my test so far:
const { ethers }...
9
Solved
I'm trying to start using Ethereum Web3.js with node 6.11.1 on a macosx
I installed web3 with the following command:
npm install web3
Then i launch this - apparently - simple node command:
...
Disfranchise asked 31/7, 2017 at 22:25
1
I came across this answer while researching creating a function for someone to buy an NFT:
https://mcmap.net/q/1254039/-how-to-transfer-a-nft-from-one-account-to-another-using-erc721
The relevant l...
1
Solved
Problem
I am trying to deploy a smart contract via Remix. Unfortunately, it fails with a very unhelpful error message.
Error Message
creation of MyContract errored: Error encoding arguments: Error...
Orlandoorlanta asked 8/2, 2022 at 15:45
2
How can I interact with an already deployed contract on ether(not mine) using Remix without the source code, but I have the ABI.
The reason I want to do it is because some contract has more than 20...
Summons asked 1/9, 2021 at 4:47
3
Solved
According to official docs of ethers.js, this should be the way how to connect to a specific network like Rinkeby-testnet with custom data:
const provider = ethers.getDefaultProvider(network, {
e...
2
I am learning solidity and got to know that interface and abstract are both classes that may contain unused functions.
My doubt is: What is the difference between interface and abstract contract in...
Dodeca asked 6/2, 2022 at 8:43
4
Solved
Using Solidity ^0.5.0,
I'm actually trying to implement an old code working in ^0.4.17, but it throws an error on Remix.
I checked syntax and everything but just can't catch what's wrong.
Any help...
Blatherskite asked 27/11, 2018 at 12:42
4
Solved
I am confused about how I should be executing a contract's method using the web3 1.0 library.
This code works (so long as I manually unlock the account first):
var contract = new web3.eth.Contrac...
Aquinas asked 6/10, 2017 at 17:34
1
I want to test my smart contract but don't know the way to access the public variables after the contact was deployed?
For example:
contract NFT is ERC721, Ownable {
using SafeMath for uint256;
bo...
Frum asked 5/2, 2022 at 4:27
1
Solved
I'm trying to pass the format of array of structs as argument on smart contract write function on etherscan,
This is solidity example:
Info[] public info;
struct Info {
address userAddress;
uint...
Caithness asked 24/1, 2022 at 5:44
9
Solved
I came across quite a common problem that it seems I can't solve elegantly and efficiently in solidity.
I've to pass an arbitrary long array of arbitrary long strings to a solidity contract.
In m...
Drews asked 10/3, 2017 at 11:5
1
I deployed a private network via geth and posted a smart contract there. Accounts are set in the genesis block
I'm creating a python function in which I want to call a smart contract function
impo...
Logician asked 22/1, 2022 at 11:55
2
Solved
I have deployed a ERC-1155 based contract (based on OpenZeppelin) and minted some NFTs on this contract successfully. But when I want to use these NFTs in OpenSea, it always says "Unidentified...
1
using web3 (python3) I am trying to decode InputData of the BSC transaction as seen on BscScan
In some solutions I've found code below is being used:
import web3
from web3.contract import Contract...
Violist asked 11/11, 2021 at 21:32
2
Solved
I've been running a local Rinkeby node (in order to use websocket events) which was working fine for a while, but suddenly I have been getting "Returned error: replacement transaction underpriced"....
1
fallback() external {
console.log(msg.data);
(bool result, ) = address(delegate).delegatecall(msg.data);
if (result) {
console.log("SUCESS");
this;
}
}
returns
TypeError: Member &...
4
I am trying to follow an older tutorial on web3, but am getting errors that I believe are due Solidity being updated. I have the following code shown below
var express = require("express"),
Web3 ...
Revest asked 31/1, 2018 at 16:47
© 2022 - 2024 — McMap. All rights reserved.