sway
sway copied to clipboard
ICE: Verification failed: Type mismatch found for call to 'insert_0': () is not a { b256 }
Forc: 0.51.1
contract;
use std::hash::Hash;
abi Token {
#[storage(write)]
fn update(amount: u64);
}
storage {
balances: StorageMap<Address, u64> = StorageMap {}
}
impl Token for Contract {
#[storage(write)]
fn update(amount: u64) {
// Sender does not exist which throws the ICE
storage.balances.insert(sender, amount);
}
}
Yes ı do