Hi everyone. Does anyone have experience with web3.py? I am trying to invoke a call using a contract function that takes a bool input - however using web3.py the bool input to the contract call always comes out as false...
Eg: contract.functions.calcTax(token, pointOneEth, True).call(txParams) actually results in a result that would be calculated it the third input is False, not True.

Oct 19, 2021, 5:05 AM
I do, but I cannot recall this knowledge. Can you replace True with 1?
Oct 19, 2021, 5:20 AM
Yea tried that, gives an error :(
I can get around it with using uint8 and 1 and 0 literal tests, but that's hella ugly
Can't find anything in wev3.py docs :(
Oct 19, 2021, 5:35 AM
Anyway I remember one codebase using uint8 instead of bool and surprisingly it spends less gas.
Oct 19, 2021, 6:26 AM
Unit are better than enums
So use uint to representative states instead of enums
Oct 19, 2021, 6:28 AM
Will do! Thanks
Oct 19, 2021, 6:35 AM
reflect finance code has 0 documentation
Oct 19, 2021, 6:36 AM
Also copywrited
Oct 19, 2021, 6:36 AM
Try finding a better code for that or i think there is a medium post about it
Roger wu has one but it is for reflection in ethereum
But the code is 100 % documented
Oct 19, 2021, 6:37 AM
I think forking safemoon would work
It will reveal the tokenomics before deployment or launch
I need to remove LP from the code
Just want reflections
Having unusual code of no use
It kinda decrease the brand value in market
Yeah but keeping tax fee low
Make it stable
With fixed supply
Well my project is domestic
People here don't care about price all they care about rewards
Oct 19, 2021, 7:54 AM

© 2024 Draquery.com All rights reserved.