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 24976

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.

0 votes
2 answers
852 views

How can I implement rational operations in Solidity? [duplicate]

First, I know that fixed point integers are coming...but I really need to know how to accomplish a simple operation who return a rational number. For example, get 2% of 350 is easy implementing: 350 …
Jorge's user avatar
  • 309
1 vote
2 answers
4k views

smart contract token & 18 decimals

When I'm working with 18 decimals. I have to convert the token inside of a function, for instance, one user want to transfer 20 token... I must operate that amount inside transfer function: amount*10^ …
Jorge's user avatar
  • 309
0 votes
1 answer
832 views

How put address (from ganache-cli client) as a parameters in constructor

Always, when I try to send parameters for the constructor function I use a migration file and where I´m trying to deploy the contract, add the parameters...Something like that: var OVXET = artifacts. …
Jorge's user avatar
  • 309
3 votes
2 answers
2k views

instance.balanceOf(...).call is not a function

I have ERC20 standard token functions in my code...I´m trying to test the function balanceOf(address _owner) with a javascript test on truffle but I have the following problem: TypeError: ovxet.bal …
Jorge's user avatar
  • 309
5 votes
3 answers
14k views

TypeError: Expression has to be an lvalue. But before the code was working perfectly!

I have changed a few things inside the function but the logic is the same still. Now, give an error in the compiler. I am USING TRUFFLE with VSC. Former function: function remove(uint ind) internal …
Jorge's user avatar
  • 309
1 vote
2 answers
1k views

How to represent the complete big number (all e)

When I convert a variable using the functions toNumber() or toString() I obtain this result: x.toNumber() 1e+27 But I want to see the entire number with all the figures. Because If I don´t convert …
Jorge's user avatar
  • 309
3 votes
4 answers
4k views

Return a struct from a mapping in test truffle

I want the information stored in each struct inside the mapping. This is my struct: struct BurnApply { address applicant; uint amount; string btcAddress; uint8 flag; uint passw …
Jorge's user avatar
  • 309