NEWTON
Asked
4 months ago
50
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
4 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
4 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
I am already running a full Ethereum node on my server. Can I set the PATHFINDER_ETHEREUM_API_URL parameter to my node's endpoint for pathfinder?
Cairo Error: Unexpected token Token('LPAR', '('). Expected: identifier.
Another vanilla Cairo question, what are the sorts of references
How to get the contract ABI using Starknet.Py?
Does Account Abstraction (StarkNet) support bundling multiple operations at once?
What can I do if I've sent transactions from StarkNet to Ethereum L2 -> L1 on mainnet and transaction got stacked?
How will work an account abstaction wallet with the key?