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

Questions regarding the implementation and use of the Truffle development and testing environment.

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
6 votes
2 answers
4k views

Return a mapping in Truffle test

So, I´m trying to call directly from the myTest.js (truffle) but return me an error: TypeError: Cannot read property 'call' of undefined at Context.it (test/ovxet2.js:13:50) at <anonymous> at process … So, can truffle returns mappings? Or I have to create my own getter function in the contract (for testing purposes) and then call that function from the test? …
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.balanceOf …
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 am USING TRUFFLE with VSC. …
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

How I have to call to the mapping in truffle? Because I´ve tried several ways in order to achieve that but without success. This is urgent... …
Jorge's user avatar
  • 309