Most Popular
1500 questions
9
votes
5 answers
insufficient funds for intrinsic transaction cost
i've codded a script using js to trigger a buy on uniswap.
the way i achieved this is through importing uniswaps smart contracts using this line of code:
const router = new ethers.Contract(addresses.router,['function getAmountsOut(uint amountIn,…
Aaron Klich
- 345
- 1
- 4
- 11
9
votes
3 answers
ProviderError: max code size exceeded
I am trying to deploy an upgradeable smart contract on bsc testnet using hardhat. But after running npx hardhat run --network testnet scripts/deploy.js it gives me the following error.
ProviderError: max code size exceeded
at…
mzaidi
- 992
- 2
- 13
- 36
9
votes
2 answers
How to pass struct mappings to solidity functions?
I have two mappings (uint => customStruct) called listA and listB. I want to run both through a single function to perform operations on the contents.
How do I pass this type into a function so that I can call someFunction(listA) and…
slothbag
- 433
- 3
- 10
9
votes
4 answers
Truffle Migrate Rinkeby - Error: PollingBlockTracker - encountered an error while attempting to update latest block: Error: ETIMEDOUT
I am facing this error when on running truffle migrate on Rinkeby network with my infura
Sahil Kharya
- 141
- 1
- 1
- 6
9
votes
3 answers
Convert an eth key to a geth key
I need to convert my eth key to a geth key.
eth put the key in %appdata%\roaming\Web3\keys, and I see it as a .json file. If I move that to the %appdata%\roaming\Ethereum\keystore directory, geth still doesn't recognize it. If I try to do geth…
feebel
- 93
- 1
- 4
9
votes
3 answers
Why does ERC721 have transferFrom and safeTransferFrom?
ERC721 has both safeTransferFrom and transferFrom, where safeTransferFrom throws if the receiving contract's onERC721Received method doesn't return a specific magic number. This is to ensure a receiving contract is capable of receiving the token, so…
BlakeMScurr
- 115
- 1
- 1
- 4
9
votes
3 answers
Is there a point to hide Ethereum nodes with TOR?
From a privacy perspective, is there any point in trying to torify ethereum nodes?
I know there's a script to do that in bitcoin, although doing so may ironically made the bitcoin node more vulnerable to attacks.
Follow up question: has anyone…
shiso
- 1,036
- 1
- 10
- 12
9
votes
4 answers
Deployment Failed : "Migrations" -- only replay-protected (EIP-155) transactions allowed over RPC
I am trying to migrate the code which is already tested in mainnet to ropsten network. I wonder why it is throwing the below strange error. We as a team unable to find a solution for this for past 2 days.
Any assistance in this regard will be very…
iappmaker
- 813
- 2
- 11
- 26
9
votes
2 answers
Get Uniswap Exchange Rate of any Token with Web3
I need to get the exchange rate for every token on Uniswap with Web3 like Uniswap itself which they then display on their web interface on app.uniswap.org like this:
So when I enter to swap the amount of tokens I want to to give (1 ETH in this…
Paulus
- 410
- 1
- 6
- 21
9
votes
1 answer
RPC error "invalid or missing value for params" when calling contract constant void functions
My contract has a function defined like this:
{"constant":true,"inputs":[],"name":"queryNumEscrows","outputs":
[{"name":"","type":"uint256"}],"payable":false,"type":"function"}
Having no inputs. Its Solidity source code is pretty simple:
function…
Juan Ignacio Pérez Sacristán
- 3,550
- 9
- 43
- 73
9
votes
2 answers
Float not allowed in solidity vs decimal places asked for token contract
We know that solidity doesn't support the float values. But here (https://www.ethereum.org/token#understanding-the-code) they accept one input parameter 'decimal places' for calculation purpose. How this action has been executed when this token is…
Aniket
- 3,545
- 2
- 20
- 42
9
votes
2 answers
How to estimate the cost to call a Smart Contract method?
After succesfully deployed this Smart Contract on Ethereum testnet
https://testnet.etherscan.io/address/0x27c042342C9ba937214117e11A4970A6145034cB
is it possible to calculate how much gas is going to take to invoke a given method of the Smart…
Juan Ignacio Pérez Sacristán
- 3,550
- 9
- 43
- 73
9
votes
1 answer
No signer to authorize the transaction with
When trying to make a transaction on a boundContract with geth-api through the library of @karalabe. I am missing a way to get the signer. I only see the interface for signer in the aar but no way to get a implementation of…
ligi
- 1,183
- 9
- 28
9
votes
3 answers
Ethers.js filters events (Only new events)
I have an event set up in the Contract.
Contact Packages
emit Spend(msg.sender, msg);
function sendPackage(msg) external payable returns(bool) {
require(
msg.value == price,
'Please send the correct amount of ETH to make…
GN.
- 643
- 2
- 8
- 20
9
votes
1 answer
Ethereum wallet keeps redownloading entire blockchain
I'm having serious problems with my wallet. I was running fine up until a couple of weeks ago, then when opening the wallet I was asked to update. I did, and ever since I've had nothing but trouble.
So firstly, I'm on Windows 10. I have 10mb…
Gary Stanton
- 191
- 1
- 3