Open Thykof opened 3 months ago
here https://github.com/massalabs/massa-web3/blob/3bdb27acab89105e6511a95ec5402a97acc1b415/packages/massa-web3/src/web3/SmartContractsClient.ts#L153 we check if the caller has enough funds to call the smart contract but we check the final balance of the caller. It prevents from calling the smart contract whereas the call it actually possible and will succeed.
It should check the candidate balance
cc @AurelienFT @Ben-Rey WDYT?
Can you give an example?
In anyway I think it's better to rely on the candidate balance in a more general case. I see no reason to enforce a final balance for a call sc, even more in massa-web3 lib.
Ok thanks, I agree
here https://github.com/massalabs/massa-web3/blob/3bdb27acab89105e6511a95ec5402a97acc1b415/packages/massa-web3/src/web3/SmartContractsClient.ts#L153 we check if the caller has enough funds to call the smart contract but we check the final balance of the caller. It prevents from calling the smart contract whereas the call it actually possible and will succeed.
It should check the candidate balance
cc @AurelienFT @Ben-Rey WDYT?