After minting tokens with MyToken::mint(..) when trying to access balances from Erc20Burnable methods instead of actual value the call returns 0. It looks like it can not access right storage. Contract code is called correctly (I checked with throwing errors inside the Erc20 methods) but storage is not accessed in proper way.
simplified code (I'm using ether-rs but full test will take a lot of lines)
// balance taken with Erc20 balance_of method
let alice_balance = token.balance_of_burn(alice_address).call().await.unwrap();
// balance taken with call to Erc20Burnable method
let alice_balance_burn = token.balance_of_burn(alice_address).call().await.unwrap();
// balance taken from MyToken method calling Erc20Burnable method
let alice_balance_of_burn_erc = token.balance_of_burn_erc(alice_address).call().await.unwrap();
// balance taken from MyToken method directly reading Erc20 blances mapping
let alice_balance_of_direct = token.balance_of_direct(alice_address).call().await.unwrap();
All methods being called on Erc20Burnable (value of alice_balance_burn, alice_balance_of_burn_erc) are returning 0
Stylus version:
0.4.2
Contract structure
I have 3 contracts:
Erc20
is standard erc20 impl, I will omit the methods implementation, just mention the ones used test cases:Erc20Burnable
is standard Erc20 extension link to solidity impl hereMyToken
is the concreate contract impl that extends Erc20 and Erc20BurnableIssue
After minting tokens with MyToken::mint(..) when trying to access balances from Erc20Burnable methods instead of actual value the call returns 0. It looks like it can not access right storage. Contract code is called correctly (I checked with throwing errors inside the Erc20 methods) but storage is not accessed in proper way.
simplified code (I'm using ether-rs but full test will take a lot of lines)
All methods being called on
Erc20Burnable
(value ofalice_balance_burn, alice_balance_of_burn_erc
) are returning 0