ethereum Questions
1
I have created a private blockchain using geth. I also have a contract in which there is a function which call another function it third contract to set an address. I can call this function on Loca...
Ilene asked 13/7, 2018 at 22:25
1
Solved
If I am given an input like this
0x18cbafe5000000000000000000000000000000000000000000000001885c663d0035bce200000000000000000000000000000000000000000000000000f5666f7fdaa62600000000000000000000000000...
Scavenge asked 17/9, 2021 at 1:24
4
Solved
I have tried to deploy a SmartContract from web3.js node library, I am getting a transaction hash from it but how would I get the contract address after It's been mined by a miner?
Haberdashery asked 10/10, 2018 at 11:5
4
Solved
I'm looking for a way to get a list of transactions for a given address. If there are too many transactions I'd expect to be able to page the results.
It would be better if I can give the latest pr...
Mandell asked 29/3, 2016 at 17:28
8
I'm listening to events of my deployed contract. Whenever a transaction gets completed and event is fired receiving the response causes following error:
Uncaught Error: Returned values aren't va...
3
I am using HardHat to deploy contracts on Polygon (Matic), it works most of the time when deploying or minting.. but then it usually breaks when I switch from testnet to mainnet.
For example: I swi...
2
Solved
Is there any guide or code that can serve as an example to implement the functionality where a smart contract receives and sends USDT to other addresses.
I appreciate your help
2
Solved
The problem is what allowance and approve are really doing?
And what is _spender and what is it doing?
Is there anybody who can explain it to me?
contract Token {
uint256 public totalSupply;
func...
Moulin asked 7/2, 2018 at 13:4
3
Solved
I am following along the documentation here: https://docs.alchemyapi.io/alchemy/tutorials/how-to-create-an-nft/how-to-mint-a-nft. And have a smart contract of form:
pragma solidity ^0.8.0;
import &...
1
I want to deploy my own ERC-20 token on different blockchains, so is there any possibility to deploy the same token contract on different blockchains. If we do that we can't give the same name and ...
Ashton asked 16/8, 2021 at 12:19
2
Solved
I generated a new mnemonic using bip39 package: bip39.generateMnemonic(). There is the next step where I need to convert it into 64 characters of hex-string. I can make it using SHA-256 but it look...
2
Solved
I am building an application that would create a wallet for a user. One option is the web3.personal API in web3.py, which has a newAccount('passphrase') method. The method only returns the address ...
5
I have written one simple smart contract in solidity and trying to migrate it with truffle.
$ truffle migrate
Compiling .\contracts\Election.sol...
Compiling .\contracts\Migrations.sol...
/D/ethe...
Duck asked 30/12, 2018 at 7:58
1
Solved
function splitAmount(uint256 amount) private {
a1.transfer(amount.div(2));
a2.transfer(amount.div(2));
}
I've seen other threads on this but I feel like over complicate things. With this code ...
2
Im trying to integrate web3js with Trezor in a truffle dev network or using ropsten test network.
The idea is to sign the transactions using the hardware wallet and then send a raw transaction us...
1
In my PHP code (or Javascript) I would like to read erc20 (Ethereum) token price from Uniswap - it is trading there. I cannot find any API call to return me the price.
I am looking to get price for...
Ferromagnesian asked 5/11, 2020 at 18:38
1
Solved
I am trying to transfer an erc20 token from contract address to an ETH address using this code:
var _from = "from Address";
var contAddress = "contract address";
var _to = "...
Bobinette asked 3/7, 2021 at 12:58
1
Solved
I'm trying to call a payable function on a smart contract that only accepts one argument.
How would I send an eth value to this function in ethers.js along with the function call? The docs don't se...
1
When running tests and scripts, all functions are called by the first address provided by Hardhat.
I'd like to know if there's a way to change the calling address within the same test or script.
Th...
Enclave asked 25/6, 2021 at 6:19
2
I have something like this:
mapping (address => mapping(string => uint)) m_Map;
It can be accessed as
m_Map[strCampaignName][addrRecipient], campaign can have multiple recipients...
Now at s...
2
Solved
I have a contract deployed on Ethereum test network which has some functions in it and they all happen to work while using the Remix interface. When trying to call those functions using web3.py in ...
Canonical asked 20/8, 2019 at 19:53
1
Im trying to approve and later on swap my tokens on uniswap via web3py code. I am also using infura, not my own node. However, on both the swap and the approve I run into solidityErrors. The proble...
2
I am trying to use uniswap contract method to simply swap eth for token, using eth from metamask wallet. Uniswap contract method is:
function swapExactETHForTokens(uint amountOutMin, address[] call...
Quad asked 25/10, 2020 at 17:52
3
Solved
I am new at ethereum development and I am working on a simple script to execute swaps using Pancakeswap. Everything seems to be working well up to the point where I am building my transaction and c...
Mediator asked 30/4, 2021 at 22:20
0
I'm using web3-react@^5.0.5 to interact with web3 from my react app. I can connect to metamask just fine.
I set the library to ethers.js and connected to metmask. Connecting worked fine, but almost...
Elate asked 7/6, 2021 at 0:29
© 2022 - 2024 — McMap. All rights reserved.