How can I send a uint parameter value to the contract in truffle?
i have a function that has two uint parameter and I wrote test that function but I guess the uint parameters cannt be sent as a correctly. Also I cannot see in mapping too the boolean value result of the uint parameter. (the HashList is mapping )
I'm putting log messages in truffle :
it('should be mint the token only owner', async()=>{
const _hash = await actions.generateHash.call(50, '123');
const inList = await actions.HashList(_hash);
console.log('is there in list? '+ inList);
console.log('hash: '+_hash);
console.log('all info: '+accounts[3], 50, '123', _hash);
const res = await actions.create(accounts[3], 50, '123', _hash{from: accounts[0]});
assert.isTrue(res, 'could not create. Please check contract or test code.' );
});
My test outputs in here :
is there in list?false
hash: 38391047091755091013202618179480389830368877342597680687864504738175347992246
all info : 0x916666dBb04c97ea3D92647dF5b0De5Be5cD038B 50 123 BN {
negative: 0,
words: [
51521206, 11804147,
59004577, 116902,
25125010, 60098687,
16719740, 18977897,
526954, 1390628,
<1 empty item>
],
length: 10,
red: null
} BN {
negative: 0,
words: [
51521206, 11804147,
59004577, 116902,
25125010, 60098687,
16719740, 18977897,
526954, 1390628,
<1 empty item>
],
length: 10,
red: null
}
what is BN in all info output? why the Uint parameters shown as BN ?
thank you,
_hash
possible yield two different printouts???res
!console.log
statements for_hash
, and each one of them results with a different printout. Does that make any sense to you?