sway icon indicating copy to clipboard operation
sway copied to clipboard

ICE: Verification failed: Type mismatch found for call to 'insert_0': () is not a { b256 }

Open Braqzen opened this issue 1 year ago • 1 comments

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);
    }
}

Braqzen avatar Feb 23 '24 17:02 Braqzen

Yes ı do

yunusibili27 avatar Feb 25 '24 21:02 yunusibili27