All Questions

Filter by
Sorted by
Tagged with
1
vote
1answer
15 views

How to check nonce include pending transactions?

I want to count nonce include pending transactions as following. Tx1 nonce=0 succeed Tx2 nonce=1 pending Tx3 nonce=2 pending Tx3 nonce=3 pending I am using api provided by etherscan, but it just ...
1
vote
1answer
17 views

Does nonce increase when the transaction fail?

DOes nonce increase when the transaction fail? TX1 nonce=0 succeed TX2 nonce=1 failed TX3 nonce=? What value of nonce will TX3 have? It will be appreciated if you explain the reason why.
0
votes
0answers
29 views

How to fix CompilerError: Stack too deep, try using fewer variables? [duplicate]

When attempting to compile the following contract I am receiving the following error: InternalCompilerError: Stack too deep, try using fewer variables. How can I fix this?I want the getPerson function ...
1
vote
2answers
91 views

Can a contract be deployed through a node which is not owned by the contract owner?

I want to create a private network, and allow anyone to deploy a contract via an RPC call. Is it possible to allow someone to deploy a contract via a node that they do not own?
0
votes
0answers
26 views

Testing of 2 Smart Contracts using Truffle

I'm writing 2 smart contracts: one is a satellite of the other. That is contract A is calling contract B. When I migrate in truffle all is OK, but when I try to run the tests it is not working. Is ...
1
vote
1answer
191 views

MetaMask verification screen doesn't show amount or token when I use 'approveAndCall' to transfer tokens to a contract

When I use 'approveAndCall' to transfer tokens to a contract, the MetaMask verification screen doesn't show the amount, or the token name. let contract = new web3.eth.Contract(gsERC20abi, '...
2
votes
2answers
41 views

If a transaction ends up in an orphaned/forked block, what happens to subsequent transactions?

Suppose I sign and send several transactions using the following function: async function send(web3, account, transaction) { const options = { to : transaction._parent._address, ...
0
votes
0answers
46 views

Smart contract works on remix and ganache but not on private chain developed by geth

The smart contract works well on the ganache and remix but not work on the private chain, even though i use the --testnet geth --identity "EDU" --rpccorsdomain "*" --rpc --rpcport "8545" --...
0
votes
0answers
22 views

How to connect to Etherscan Ropsten API using python

I want to connect to the etherscan Ropsten test-net with python: URL = 'https://api-ropsten.etherscan.io/api?module=contract&action=getsourcecode&address=...
1
vote
0answers
26 views

advantages and disadvantages of domain registrars on a blockchain [closed]

The idea of having a domain registrar on a blockchain goes back to Aaron Swartz (I think). Lately, there is a tweet by Udi Wertheimer in which he suggests that it might be a bad idea. It makes me ...
1
vote
2answers
36 views

The method eth_sendTransaction does not exist/is not available, when using Ropsten Network

My following code previously works perfectly at Ganache, but when i switched it to Ropsten Network, it give captioned error. Here is Code: async function finalSettersFunctions(){ var myFunc; ...
2
votes
1answer
22 views

Solidity assembly: why is the length of _bytes added to _bytes before mload()?

For example in BytesLib: https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol#L348 (Edit: Note that the same pattern is used for lengths: 1, 2, 4, 8, 16, and 32) ...
0
votes
1answer
26 views

Contract function involving transfer to another contract constantly fails

Tx example: https://rinkeby.etherscan.io/tx/0xbc6ce7fc2aba22bb1b1141d3223369472e55618037f53c0cb25eff526edd88a1 (note Rinkeby network) Function code: function withdrawBalance() external { ...
6
votes
1answer
36 views

Is the ABI required to call a contract with ethers.js?

From the docs: // The Contract interface let abi = [ ... ]; // Connect to the network let provider = ethers.getDefaultProvider(); // The address from the above deployment example let ...
0
votes
1answer
46 views

UnhandledPromiseRejectionWarning: Error: Returned error: nonce too low

I am trying to deploy some contracts on Ropsten network. Here is my code async function finalDeploy(r){ for(i=0; i<constructorParams.length; i++) { const options = { data: '0x' + ...
0
votes
1answer
35 views

Ropsten Blockchain Size on Disk December 2019?

Hello what is the size of the Ropsten Blockchain, on disk, using Parity with full trace on? (Info required to provision a VPS).
1
vote
2answers
35 views

How could I convert uint type to bytes type in solidity?

I want to convert uint type data to bytes type in solidity. I've found a answer about this which is like below. function toBytes(uint256 x) public pure returns (bytes memory b) { b = new bytes(32)...
0
votes
1answer
19 views

Could not deploy on Ropsten network using Truffle

I have following truffle-config.js file const fs = require('fs'); const HDWalletProvider = require("truffle-hdwallet-provider"); const secrets = JSON.parse( fs.readFileSync("abc.txt").toString()....
1
vote
0answers
9 views

Geth's golang contract bindings need “RPC subscription features that are still under review” to process event logs. What are those features?

The documentation for Geth's golang contract bindings start out with Please note, events are not yet implemented as they need some RPC subscription features that are still under review. What ...
1
vote
1answer
21 views

How can i store a Aces High Pin on the Ethereum blockchain? [closed]

I have a few Aces High Pin's laying around and wanted to know how i can store them on the Eth blockchain.
3
votes
1answer
35 views

How to distinguish between ETH & ETC Node

I'm using the go-ethereum code (mainly discover (discv4) and rlpx) to write a node discovery tool. The Programm is using discv4 to discover nodes on the internet and putting the discovered nodes into ...
0
votes
1answer
21 views

Any issues for web3 on digital ocean?

My dapp which is currently testing on ropsten works perfectly when i run the frontend from local but dosent return addresses when i run on a digital ocean server. it is successfully connected to ...
0
votes
2answers
67 views

Correct ABI payload packaging to call another Contract's address

Let's suppose I have the two following contracts, Dest and Proxy: pragma solidity ^0.5.0; contract Dest { function foo(string memory name, string memory symbol, uint256 decimals, uint256 ...
0
votes
1answer
36 views

gasCost of opcode “STATICCALL” in Geth VM Trace

{ "pc": 4765, "op": "STATICCALL", "gas": 222711, "gasCost": 219243, "depth": 1, ... } As above, Geth VM Trace (https://etherscan.io/vmtrace?txhash=...
0
votes
1answer
24 views

TypeError: balance.toNumber is not a function

I need check that token has no balance when selfDestruct was called, but shows an error that balance.toNumber is not a function in the test file. DappTokenSale.sol function endSale() public { //...
0
votes
1answer
13 views

How to invoke functions or get data in/of a contract from another contract?

I have a contract that creates instances of a contract and now I have to get the data of the newly created contract. Is there a way to do that? This is my contract that creates new contracts: pragma ...
2
votes
0answers
17 views

4.3.1. Transaction Receipt-Yellow Paper

I am trying to understand the following function which appears in section 4.3.1 of the Ethereum Yellow Paper: The function description state it "prepares" a transaction receipt, does it mean that the ...
1
vote
2answers
54 views

How to insert multiple transactions into One Block in Ganache GUI

Is it possible to enable Ganache GUI to put multiple transactions into ONE block ?. The details about Why i need this thing, is given below; I am going to test Transaction Order Dependence (TOD) ...
0
votes
1answer
11 views

arrays and structs for function arguments

A lot of contracts and libraries with functions that use arrays and structs for arguments. Structs can themselves include arrays, structs and mappings. For example: function doSomething(MyStruct ...
1
vote
2answers
56 views

Install Old Solc Compiler Versions

I would like to compile older versions of solc contract source code using a solc compiler on my local machine. Is there a website from which to download old solc compilers? Google revealed a GitHub ...
0
votes
0answers
9 views

What is the wallet path for Ledger Nano & Ledger Nano S in ethersjs?

I tried using ethersjs for the first time just to experience some basic things. In ethersjs you need to specify the wallet derivation path which are some weird characters. The derivation path for ...
0
votes
1answer
8 views

Can you have an array of mappings? The mappings have an address key and a struct value

Can you have an array of mappings? I want to have mappings with addresses as keys and structs as the value. I want to store these addresses in an array and iterate through them. so far it looks like ...
0
votes
0answers
18 views

Do Ethereum tokens have symbol name?

I am not familiar with Ethereum contract development. I wonder if Ethereum tokens ( like ERC20, ERC1155 or ERC721) have symbol name or not. On EOSIO the asset is a structure composed of amount and ...
-1
votes
1answer
15 views

Transacting with a verified contract (code+ABI); yet, no function displayed in the tx input data

Looking at the transaction overview in etherscan, the "Input Data:" field is only a big Hex value; I was expecting to see the function I was calling...
0
votes
1answer
17 views

dApp storage (growth) concern

My dApp allows user to save their URL when purchasing each NFT token. The obvious design would define -- struct NFT { ... string url; } However, URLs can be long. To save gas for users, I ...
0
votes
1answer
21 views

In web3, how can I fetch a range of block timestamps most efficiently?

Given a range of block numbers, how can I most efficiently fetch the timestamps for those blocks? I couldn't find a simple call to fetch the timestamp at a certain height other than fetching the full ...
0
votes
1answer
31 views

How to create account using mnemonic words or private key in web3js and call contracts using that account

I have a simple React Project with web3@1.2.4 installed and I want to call a contract's method like this: await maincontract.methods.CurrentMethod("arguments").send({ from: accounts[0]/*my account ...
0
votes
0answers
51 views

Mocha timeout when running truffle test. Works fine on ganache, not on public networks

This is the error I get when running truffle test --network kovan: 1) "before all" hook: prepare suite Error: Timeout of 120000ms exceeded. For async tests and hooks, ensure "done()" is called; if ...
1
vote
1answer
16 views

private key vs seed

I made an extra account in Metamask for my GF, I kept Account 1 for myself and I gave only the private key of Account 2 to my GF. I kept the seed words only to myself. Since then, she has dumped me ...
1
vote
1answer
24 views

AZTEC validateProof and validateProofByHash sender / signer addresses

The AZTEC Crypto Engine lets you validate proofs and cache them for future re-use, since they are fairly expensive (around 800,000 gas for a 4-note join-split proof before Istanbul, and now about 200,...
0
votes
0answers
11 views

How do you recover in web3.js 1.2 a message signed with web3 0.2? [duplicate]

MetaMask injects 0.20 and you can't switch it off or mix web3 versions (not easily anyway). I am forced to use this method for signing: web3.personal.sign(web3.fromUtf8(nonce), web3.eth.coinbase) It ...
1
vote
1answer
24 views

Is it considered secure at all to use passwords and private keys in the code of smart contract?

Basically something like: function transfer(address to, string privkey) { if(privkey == "cd33434343...") { msg.sender.transfer(this.balance); } } The above is obviously flawed since the privkey is ...
3
votes
1answer
45 views

How to deploy Ethereum Smart Contract through Brownie to the Private Network

I have a geth node that is connected to a private network on my computer that uses port: 8545. Hence, I have a smart contract that is tested using Brownie on the ganache-cli network. Brownie is a ...
0
votes
0answers
17 views

my dapp works perfect on local but when i upload to server the address returns null using web3

I have a project which I've been working on and so far it works perfectly on local. But when I uploaded the project to the server it is unable to get address using web3. const network = await web3....
0
votes
1answer
26 views

General practice on updating contracts on a blockchain?

I have been searching around a lot but couldn't find the answer to this. My understanding is that one a Ethereum blockchain, there should be one/multiple types contracts. Once live, those contract ...
1
vote
0answers
24 views

geth sync stuck at 2,700,000 [duplicate]

It all ran well before 2,700,000 but when comes above 2,700,000 hellish... INFO [12-21|00:08:43.253] Imported new chain segment blocks=2 txs= 5 mgas=0.356 elapsed=30.309s mgasps=0....
1
vote
1answer
27 views

How to tell if an address is a multisig?

I'm looking at an address owned by an investor on etherscan and am wondering if it's a multisig. Usually multisigs are contracts and you can tell if an address is a contract on etherscan, but are ...
1
vote
0answers
29 views

Architecture of crypto exchange webiste [closed]

I am working on a project and I am unable to figure out the architecture of a crypto exchange wallet in which I want to convert fiat currency to my own cryptocurrency which has same value i.e, 1 INR =...
1
vote
1answer
22 views

ipfs files ls not showing all the files uploaded to it

When I am using ipfs files ls, it is not showing all the files which are being added. But when I am searching the files in ipfs explorer through the hash I am getting the file.
0
votes
0answers
26 views

miner.start() returns null but no transactions take place

I have created a genesis block and initialized it in the private network. Account creation is also successful. As soon as I hit miner.start() [or miner.start(1)], the following appears: INFO [12-...

15 30 50 per page