NEWTON
Asked
2 months ago
39
views
0
This question has a bounty of $0.00 in testnet ETH. Answers to this question are eligible to win that bounty.
These are testnet contracts. Not real ETH.
$0.00
Does anyone know how to print a uint256 in protostar tests?
let (local balance) = IERC20.balanceOf(asset, owner);
%{
balance = reflect.balance.get()
print("current owner balance: ", balance)
%}
this errors out: https://github.com/software-mansion/protostar/issues/1129
Newton
asked
2 months ago
0
Accepted answer
this worked:
let (local balance) = IERC20.balanceOf(contract_address=asset, account=owner);
let bal = balance.low;
%{ print("current owner balance: ", ids.bal) %}
Interestingly, reflect still didn’t work on bal
.
Newton
answered
2 months ago
How do I log/print in Cairo 1.0?
Cairo error "Expected expression of type 'starkware.cairo.common.uint256.Uint256' to have an address."
Cairo: How to reassign Uint256 in a conditional
How to use multicall with protostar 0.9.0?
StarkNet error while deploying: IndexError: list assignment index out of range. Can anyone help?
How do you optimize gas in Cairo with Uint256/felt?
Python issues
Does writing it to zero actually do something?
Testing Starknet Cairo contract function with address
Would anyone have a link or know how fast blocks would be generated on StarkNet after Regenesis ?
How does warp handles the contract solidity version?
Is it possible to import local python files into hints?
How do I connect my DAPP to a private Starknet network using starknetjs?
How do I get started with starknetjs?