Skip to main content
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
Results tagged with
Search options not deleted user 693

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.

74 votes
5 answers
29k views

Why does uint8 cost more gas than uint256?

contract A { uint8 a = 0; } costs 20150 + 2000 gas during creation. as compared to contract A { uint a = 0; // or uint256 } costing 5050 + 2000 gas during creation It is odd that a variab …
uzyn's user avatar
  • 1,100
4 votes

How do I manage unlocking accounts in a test in Truffle

You cannot unlock accounts from your code. It would be an issue if a code can unlock your accounts. It seems like you are writing unit tests. Instead of running geth, you might want to try using test …
uzyn's user avatar
  • 1,100
3 votes
Accepted

If I try to send to send ether to the standard token contract, the tx is rejected. Even if f...

If you are using Solidity >= 0.4, you will need to add payable to the function for it to accept Ether. function() payable { amount += msg.value; } …
uzyn's user avatar
  • 1,100