vhie
  • Member for 3 years, 6 months
  • Last seen more than 1 year ago
how can we convert variable value into days?
Accepted answer
3 votes

As per the documentation, These suffixes cannot be applied to variables. It should be done like this... uint256 numberOfDays = 5 days; If you want the value to come from a variable you would do it ...

View answer
Set default address in web3?
2 votes

// set the default account web3.eth.defaultAccount = '0xWalletAddress'; Refer to https://web3js.readthedocs.io/en/1.0/web3-eth.html#defaultaccount

View answer
Connection from origin https://remix.ethereum.org rejected
Accepted answer
1 votes

Found that the fault is at the url of the remix-ide. It should only be remixd -s D:\remix-contract --remix-ide https://remix.ethereum.org

View answer
Geth/Remix Error: gas required exceeds allowance or always failing transaction.How to solve this issue?
Accepted answer
1 votes

require(msg.value == 30 ether, "30 ether initial funding required"); Base on the code for the constructor you need to transfer 30 ethers to the contract upon deployment.

View answer
Having issue with Infura mainnet web3 connection and getting info
1 votes

web3.eth.getBalance(address) returns a promise which will only either return an error or the balance once the transaction is mined. function getBalance(){ var balance; web3.eth.getBalance(...

View answer
Catching errors with gas issues
1 votes

Base on my observation and understanding. Might not be the best explanation out there. If I send 0.05 ETH with 21,000 gas or even 21,001 (minimum amount) the error I am getting is: Returned error: ...

View answer
ERC20 token sending | insufficient funds for gas * price + value "web3js 1.0.0-beta.34"
1 votes

I'm using "web3": "^1.0.0-beta.35" and encountered this problem as well. I only changed the gasPrice to a number instead of hex value. I'm not sure if it will solve your problem with the beta.34 ...

View answer
converting "now" to "day"?
1 votes

Base on their documentation http://solidity.readthedocs.io/en/v0.4.24/units-and-global-variables.html Time Units. You can do expiryDate = now + duration * 1 days where the formula (duration * 1 days) ...

View answer
Is my function prone to under/overflow?
Accepted answer
0 votes

Basically will "require" do the job here? Can someone send the request from account with 0 causing underflow somehow or not? thanks! Since the require will prevent msg.sender to withdraw any value ...

View answer
Invalid JSON RPC response: ""
0 votes

Aside from the gasPrice being really low, while I was working with infura I find that if there is something wrong with the way you call your function if will return that error. I'm still new to this ...

View answer
How to find ABI and verify my contract
0 votes

To verify Contracts that accept Constructor arguments, please enter the ABI-encoded Arguments in the last box below. Please note the Note above from when you verify and publish your contract. I ...

View answer
function approveAndCall error
0 votes

What I would suggest is to change the datatype of _extraData to string in the meantime while you are still testing your contract in the remix environment to get a readable data and just change it back ...

View answer
External functions calling other functions in Solidity
-3 votes

Yes you can as long as those functions does not change the state of the contract. Completely for get purposes only.

View answer