Most Popular

1500 questions
10
votes
4 answers

Geth RPC connections securely

I have read everywhere that exposing personal over rpc is dangerous and is vulnerable. The question is HOW? Is it possible for anyone to send transactions to my geth console, if my ipaddress and port on which geth is listening is compromised?…
Prashant Prabhakar Singh
  • 8,026
  • 5
  • 40
  • 79
10
votes
4 answers

ethers formatEther(wei) with max 4 decimal places

I want to display a human readable balance with less decimal places like metamask does it. The function formatEther(wei) returns a string, so for proper rounding I need to parse it etc. And I wanted to ask if there is an easier method or best…
CodingYourLife
  • 729
  • 1
  • 6
  • 18
10
votes
2 answers

is there a way to get the result of web3's encodeFunctionCall with ethers?

I'm using web3 to get the RLP encoded data for a function call like so const safeTransferFrom: any = tokenERC1155Abi.find((f) => f.name === 'safeTransferFrom'); const params: Array = [identity, minterAddr, 1, amount,…
Micha Roon
  • 2,203
  • 21
  • 36
10
votes
3 answers

How interact with Ethereum without (gas) ether?

Ethereum is not a currency but use ether (gas) to pay the fees, therefore someone will need an Ether account to pay and build the application. But how can someone get an account for each activity previously mentioned (to buy/sell ether and build the…
nelruk
  • 555
  • 1
  • 7
  • 11
10
votes
1 answer

What are the two arguments to a RETURN opcode?

The RETURN opcode in the EVM takes 2 arguments(ie, consumes two elements from the stack), but what do they represent? I tried to understand the yellow paper describing them, but I don't understand the notation used. For reference this is the…
Earlz
  • 471
  • 4
  • 16
10
votes
1 answer

How can I get a private key from a mnemonic phrase?

I want to convert a 24 words length seed phrase into a private key using web3.
viarnes
  • 268
  • 1
  • 2
  • 10
10
votes
4 answers

How can I get the current user account selected in MetaMask with Web3 js?

I'm using the next function to get the first account from user's MetaMask: var account = web3.eth.getAccounts((error,result) => { if (error) { console.log(error); } else { return result[0]; } …
Veilkrand
  • 203
  • 1
  • 2
  • 6
10
votes
1 answer

What is the utilisation level on the Ethereum blockchain?

How many transactions are currently executed on the Ethereum blockchain and how does this compare to other blockchains?
zanzu
  • 5,360
  • 4
  • 25
  • 43
10
votes
3 answers

Passing constructor arguments to the CREATE assembly instruction in solidity

I have a contract which deploys other contracts by bytecode: contract DeployContract { function deploy(bytes calldata _bytecode) external returns(address addr) { bytes memory bytecode = abi.encode(_bytecode, msg.sender); …
Bobface
  • 385
  • 2
  • 12
10
votes
1 answer

What mean "Deep froze chain segment"?

I have question My geth show me like that "Deep froze chain segment" repeatedly What mean??
josep
  • 105
  • 2
  • 5
10
votes
3 answers

Can I call mapping as arguments of function?

I'd like to call mapping as arguments of function. I've tried the following code, but it returned the error. Could I call mapping as arguments as a function? mapping ( uint256 => mapping (bytes32 => bytes32)) public users; function add( uint256 id,…
Toshi
  • 2,357
  • 8
  • 23
  • 34
10
votes
1 answer

Is there a DAO to vote on Ethereum Foundation development decisions / direction?

I'd like to know if the Ethereum Foundation itself has been decentralized yet. Is there a DAO with which is used to make decentralized decisions? Is it open to public viewing? Closed?
linagee
  • 6,138
  • 27
  • 32
10
votes
1 answer

What's a fallback function when using address.send(...)?

This code is in my contract: contract A { address x = 0x1234...; x.send(10); } What would fallback function in the contract at address 0x1234... look like? contract B { ... } I can't find any info on these fallback functions…
manidos
  • 4,298
  • 3
  • 31
  • 55
10
votes
1 answer

TypeError: Indexed expression has to be a type, mapping or array (is function (address) view external returns (string memory,string memory...)

I have 2 contracts first one is sub second one is main . First i deploy main and create a new subtoken. Then I want to access my maincontract in subToken contract but I cant :( When I compile this contract I saw this error at getName2 function…
Furkan Demirel
  • 139
  • 1
  • 2
  • 8
10
votes
1 answer

Explicit type conversion not allowed from "bytes1" to "uint256"

Just tried to convert byte to uint using Solidity 0.5.x: uint length = uint(arr[i]); and got: MyCode.sol:88:29: TypeError: Explicit type conversion not allowed from "bytes1" to "uint256". uint length = uint(arr[i]); …
k06a
  • 3,016
  • 2
  • 21
  • 35