Ha ĐANG
  • Member for 3 years, 5 months
  • Last seen this week
Clarification on "password" argument for web3.eth.personal.sign
0 votes

it is the password that you pass when calling function to create new account https://web3js.readthedocs.io/en/1.0/web3-eth-personal.html#newaccount

View answer
ZepplinOS: Where to set owner of the contract?
Accepted answer
2 votes

I think it'd better to explicit the owner via input param like below, instead of using msg.sender since msg.sender might be not what we intend to set because zos use contract proxy to make it ...

View answer
Given a RAW Transaction - how to get senders address
1 votes

we can use go to pick out the senders' address from raw tx as below sample code if msg, err := tx.AsMessage(types.NewEIP155Signer(big.NewInt(1))); err == nil { fmt.Println(msg....

View answer
Solidity can't modify block.timestamp due to lvalue xpression
0 votes

No, you cannot modify it. It the time that block was sealed by the miner

View answer
How to convert a uint to 64 byte hex string using Node.js?
2 votes

Sir, If my uint is 10,how to convert 10 to '0x000000000000000000000000000000000000000000000000000000000000000a' by using Node.js? You can use web3.toHex(number) to convert decimal number to hex ...

View answer
Mocking msg.sender during unit test
1 votes

You can use real address as msg.sender, you don't need any mocking here. Please refer to Open Zeppelin unit-test code for further information https://github.com/OpenZeppelin/openzeppelin-solidity/...

View answer
Ethereum Sidechains can run it own smart contracts
Accepted answer
0 votes

Basically side chain will have it own smart contract

View answer
how to include transations in genesis block
Accepted answer
1 votes

base on the current source code of ethereum, you cannot include tnx in the genesis block type Genesis struct { Config *params.ChainConfig `json:"config"` Nonce uint64 `...

View answer
Can I have someone submit my transaction to the network, so I don't have to pay the gas fee (in ether)?
2 votes

As Shawn Tabrizi answer, we cannot do it without gas fee. For 3rd party account I can put an addition as below. I wonder, is it possible to have someone (3rd party account) submit my transaction ...

View answer
Read state from smart contract deployed to azure proof of authority ethereum network
0 votes

I think you make a mistake on your code, the data should have correct property of nonce and data as below. Your code are missing the two properties, you only have value for it. var rawTx = { ...

View answer
Run solidity bytecode with ethereumj
Accepted answer
0 votes

you can use attach JavaScript VM on the remix site is much easier I think https://remix.ethereum.org

View answer
Javascirpt 18 decimal number for parameter?
0 votes

web3.js using this big number library by default https://github.com/MikeMcl/bignumber.js/ then you can also use this lib in the node.js project to support the big number

View answer
Two Ethereum Node (connected to private net) on Single PC: Node data write error .Synchronisation failed
0 votes

You can do this with separate --datadir and difference --port on the same PC

View answer
how to deploy dapps into production (mainnetwork)
2 votes

There's no big differences. You only need to connect to a mainnet endpoint to deploy your smart contract instead of testnet endpoint and of course you need to have ETH balance in your account to pay ...

View answer
Is there a plan / EIP for native multi-signature transactions?
4 votes

AFAIK, there's no plan for it. When we met Vitalik in Hanoi, we also asking about the multisig and threshold signature then he answered that there's no clear reason to support it native so if you have ...

View answer
How to get the POW-Hash of a specific block?
Accepted answer
1 votes

On the go-ethereum source code, you can see that the pow-hash is the hash of the block header // SealHash returns the hash of a block prior to it being sealed. func (ethash *Ethash) SealHash(header *...

View answer
C# how to compute Keccak256 to match Solidity?
0 votes

I found that this C# lib implement keccak256 https://github.com/multiformats/cs-multihash

View answer
Estimate Gas Price (not Gas) using Web3
2 votes

I think that we can just simply use web3.eth.gasPrice to get the suggest gas price.

View answer
Geth VerifySeal function
Accepted answer
3 votes

Q1: I have a question regarding VerifySeal function in Geth source code. If I understood correctly, it verifies if block has valid seal regarding the PoW algorithm. The arguments that function ...

View answer
Trouble with ecrecover()
0 votes

Can you try this to make sure that the msg.sender when calling smart contract function is expected change: let validSig = await contractAuth.methods.verifyMultipleInputs(price, contractAddr, sig....

View answer
How are double mappings indexed?
1 votes

You're using wrong position for the keys of the mapping. It should be as below to matching with you declaration uint _TotalPaid = PaymentDetails[_Wallet][_TokenIndex].TotalPaid; Further, you'd ...

View answer
geth 1.8.15 flag provided but not defined: --fast
Accepted answer
10 votes

you can use flag --syncmode fast instead they already update the wiki document https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options DEPRECATED OPTIONS: --fast Enable fast ...

View answer
How does truffle know which address to send a contract being migrated, and which account to charge gas to?
1 votes

Truffle dont need to know this. This is setting of gancahe testrpc chain as taking the first account as default one.

View answer
What is a replacement for Metamask in React App?
Accepted answer
0 votes

You can allow user to input private key into your app (only use the private key in client side for secure purpose) or for more secure you can support user using cold wallet like trezor or ledger nano ...

View answer
Using Constructor in Solidity
1 votes

You can refer to OpenZeppelin sample code to understand more about constructor of smart contract https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/examples/SampleCrowdsale....

View answer
How to access ethereum smart contract functions from server side api calls using ExpressJS?
0 votes

I think you can use web3j for Android because it’s java library

View answer
How does token exchange buy and sell ERC20 tokens technically?
0 votes

To understand about which functions must be include in the ERC20 token contract, you can refer to EIP repository https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md

View answer
Setting time requirements in Solidity
Accepted answer
3 votes

You're totally right! The way you do has no problem. You can make a test with small time like require (block.timestamp >= today + 60 seconds);

View answer
How does knowing the root hash of a past world state help me to revert to this world state?
Accepted answer
2 votes

Root hash cannot help you to reconstruct the state; it used only for other nodes can validate the state at the block number. To reset state, you can sync your chain to the block number that you want. ...

View answer
Smart Contract in website framework?
Accepted answer
2 votes

Web3js is a native js library to interact with block chain and smart contract then you can freely choose any to build your frontend

View answer