Most Popular

1500 questions
13
votes
1 answer

How to decode input data in ethersjs

I am using ethersjs. I use the following code to get data of transaction var init = function () { var wss = new ethers.providers.WebSocketProvider(url); wss.getTransaction(tx).then(function (transaction) { wss.on("pending", (tx) =>…
Jay Williams
  • 159
  • 1
  • 1
  • 8
13
votes
4 answers

Can there only be one instance of a contract?

Say we have: contract TestFooContract{ //bunch of stuff and state } Does this mean that there is only 1 "TestFooContract"? Or can I instantiate 10 of them? What if I want multiple of these contracts? In OOP terms, is a contract thought of as a…
zunior
  • 1,312
  • 13
  • 18
13
votes
1 answer

How do Casper's validators compare to Dash's masternodes?

Both of these networks are going to have a smaller subset of "privileged" nodes with similar properties (like storing large amounts of currency, receiving part of block rewards). Are there further similarities? For example, could Dash's "transaction…
comodoro
  • 1,202
  • 1
  • 12
  • 16
13
votes
1 answer

Is an Account in MetaMask the same as an Ethereum Account (EOA)?

First, my setup: I use the Azure Ethereum Consortium Template, which creates one transaction node and two mining nodes in my configuration. I use MetaMask Chrome plugin to accept transactions, which I initiate via Solidity…
Kai Wähner
  • 363
  • 2
  • 11
13
votes
1 answer

Is it possible and sensible to deploy a contract to the same address on Mainnet and Ropsten?

Traditionally when people have deployed contracts for public use they have tended to publish separate contract addresses for Testnet and Mainnet. Often this then requires them to include code to check which network the contract is on, as we see in…
Edmund Edgar
  • 16,897
  • 1
  • 29
  • 58
13
votes
3 answers

How to run geth at 512Mb RAM Digital Ocean droplet?

When geth process consumes too much memory it gets killed (not at all gracefully) by Digital Ocean. Partly solved the problem by implementing swap - Setting up geth Ethereum node to run automatically on Ubuntu. But still recieved one kill within 2…
takeshi
  • 1,760
  • 1
  • 13
  • 33
13
votes
2 answers

What does Parity logs means?

Usually, Parity logs looks like: 2016-12-04 20:56:28 Syncing #2346672 6eb0…3382 2 blk/s 25 tx/s 0 Mgas/s 13529+ 0 Qed #2360201 0/ 8/25 peers 10 MiB db 6 MiB chain 50 MiB queue 2 MiB sync 2016-12-04 20:56:33 Syncing…
Sergey Potekhin
  • 1,360
  • 2
  • 13
  • 28
13
votes
4 answers

Is it possible to make the Parity software sync faster?

I start Parity software like so: parity -j It takes a really long time to sync. Is there any way to make it sync faster?
Vesa
  • 1,322
  • 2
  • 16
  • 30
13
votes
3 answers

Is there any efficient way to compute the exponentiation of a fraction and an integer?

Mind the following JavaScript operation: function exp(n){ return Math.floor(Math.pow(1.01, n)); } Where r is a fraction (such as 1.01) and n is an integer. Is there any efficient way to emulate that operation efficiently on Ethereum? That is, a…
MaiaVictor
  • 3,177
  • 2
  • 17
  • 37
13
votes
1 answer

How to generate a vanity address for a smart contract to be deployed on?

I am aware of the possibility to generate vanity addresses for normal accounts. However, how is possible to generate vanity addresses for external owned accounts (which host smart contracts)? I'm asking because the Ethereum Name Service (ENS) was…
q9f
  • 32,913
  • 47
  • 156
  • 395
12
votes
1 answer

What does "Enable optimization" mean in Remix, and what does it do?

When writing big contracts, I am asked to either reduce the size or use the optimization. What is it ? What is the numerical value for ? What happens if I set the optimization to 0, would I still be able to use the contract ? How do I know which…
Damir Olejar
  • 828
  • 3
  • 11
  • 25
12
votes
3 answers

Find address of a contract before deployment in Hardhat and Ethers.js

I have 2 contracts which take each other's addresses as constructor arguments. Here's the pseudocode, constructor A(address B) constructor B(address A) I am deploying contracts using const Contract = await…
secretshardul
  • 465
  • 4
  • 15
12
votes
3 answers

Is it possible to send transaction in Binance Smart Chain using web3 and ethereumjs-tx?

I want to send transaction in Binance Smart Chain and I got an error: new Error("Chain with name " + chain + " not supported"); const Tx = require('ethereumjs-tx').Transaction; const Web3 = require('web3'); const web3 = new…
AVorobev
  • 123
  • 1
  • 1
  • 4
12
votes
3 answers

Return value of low-level calls not used

I'm attempting to use the function send() in Solidity I've got this error when i try to compile my contract with truffle : Warning: Return value of low-level calls not used. any idea about it? thank you
12
votes
2 answers

Good iptables rulesets for IPv4 and IPv6 in Geth Ethereum Node

Currently I'm using the following iptables rules for my remote (server) geth node: V4 *filter # Allow all loopback (lo0) traffic and reject traffic # to localhost that does not originate from lo0. -A INPUT -i lo -j ACCEPT -A INPUT ! -i lo -s…
wacax
  • 1,388
  • 2
  • 13
  • 29