Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Solidity is a contract-oriented, high-level language whose syntax is similar to that of JavaScript and it is designed for writing smart contracts in Ethereum to run on the EVM. Solidity is statically typed, supports inheritance, libraries and complex user-defined types among other features.
1
vote
1
answer
122
views
Confusion about usage of throw in Solidity by Example docs
It seems like the usual way of handling a failed send in the Solidity docs is to use throw. …
5
votes
3
answers
8k
views
What is the "zero-account" as described by the solidity docs?
I was reading the solidity docs and I don't quite understand what the zero-account is. …
10
votes
2
answers
4k
views
Solidity: Timestamp dependency, is it possible to do safely?
My contract depends on checking to see if an expiration period has expired before sending the contracts balance. I was looking at the ConsenSys best practices here and it says:
Timestamp Dependence
B …
9
votes
2
answers
977
views
Solidity: Understanding the security risk of sending back money with send
I'm looking at the auction example here https://solidity.readthedocs.io/en/develop/solidity-by-example.html
I'm confused by this code
if (highestBidder ! …
4
votes
2
answers
856
views
Are the transaction parameters recorded on the blockchain?
I reviewed the solidity docs and didnt see any mention of parameter values though, see here. …
5
votes
4
answers
4k
views
How can I mock the time for solidity tests?
My contract has an expiration date that I'd like to unit test but I don't know how to go about doing that. If I could mock the time of the contract that would be dope. Google search provided no inform …
2
votes
0
answers
402
views
Truffle/Web3: myContract.method.estimateGas causes BigNumber error
/formatters.js:40:38)
at SolidityTypeUInt.SolidityType.encode (/Users/danielyakobian/.nvm/versions/node/v7.5.0/lib/node_modules/truffle/node_modules/web3/lib/solidity/type.js:188:17)
at /Users/ … danielyakobian/.nvm/versions/node/v7.5.0/lib/node_modules/truffle/node_modules/web3/lib/solidity/coder.js:91:29
at Array.map (native) name: 'BigNumber Error' }
I've narrowed the cause to estimateGas …
2
votes
2
answers
329
views
Is struct data returned from web3 guaranteed to be in the correct order?
I have this solidity struct
struct Prices {
uint sell_price; // wei
uint target_price; // primary
uint penalty_price; // wei
}
Prices public prices
In truffle when I do contract.prices …
105
votes
5
answers
44k
views
Difference between require and assert and the difference between revert and throw
I was looking at the docs and I'm looking for clarification on the difference between require and assert and throw and revert.
assert(bool condition): abort execution and revert state changes if
cond …