_FuelError: Log type with logId '12590297951544648000' doesn't exist in the ABI.
at Interface.decodeLog (/Users/master/abi-checker/node_modules/@fuel-ts/abi-coder/src/Interface.ts:66:13)
logId ‘12590297951544648000’ is indeed not in contract abi, but there is a logid 12590297951544646752 and we can see it in explorer
@PaulZhemanov, it seems the issue is due to using the latest contract ABI with an older deployed contract.
I encountered the same error you’re experiencing when executing the deposit function:
FuelError: Invalid u64 byte data size.
After analyzing the logged data, which is the DepositEvent struct, I noticed that the last modifications to this struct were made in this commit: ba9f781.
I built an earlier version of the Spark Market contract, prior to these changes, and used its ABI to connect to the deployed contract you’re working with. This allowed me to successfully execute the deposit call and decode its logs. Here’s the decoded data:
{
amount: <BN: 0x2710>,
asset: {
bits: '0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07'
},
user: { Address: [Object] },
liquid_base: <BN: 0x7596>, // from the old `DepositEvent` version
liquid_quote: <BN: 0x0> // from the old `DepositEvent` version
}
The fields liquid_base and liquid_quote indicate that this struct belongs to the previous DepositEvent version. Which was modified to this
To resolve the issue, you need to redeploy the latest version of the Spark Market contract.
@PaulZhemanov I’ve created a repository that demonstrates the issue. It’s straightforward to set up and run the tests to verify that calling deposit with the old JSON ABI functions correctly.
The repository includes three tests:
Old JSON ABI Test: Connects to the contract using the old JSON ABI and validates that the call works as expected, with the log being properly decoded.
New JSON ABI Test: Connects to the contract using the new JSON ABI and verifies that the call fails with the error: FuelError: Invalid u64 byte data size.
ABI Comparison Test: Fetches the most recent JSON ABI from the Spark Mark contract, compares it with the new JSON ABI used in Test 2, and confirms they are identical.
I am using the same contract ID as the one shown in the receipt you provided here, which is informed at the field id.