-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FatePrefixError
when trying to decode callData
for Tokaen.org transactions
#277
Comments
@davidyuk can you help here getting more lib specific reproduction steps? |
Sure! import { BytecodeContractCallEncoder } from './src/main.js';
const response = await fetch(`https://testnet.aeternity.io/v3/contracts/ct_7NTLakadL7cQ4X3EcXYmec5p3QYgAEA6DDqYBMwH5ZZ2U2k5L/code`);
const { bytecode } = await response.json();
const bytecodeContractCallEncoder = new BytecodeContractCallEncoder(bytecode);
const value = bytecodeContractCallEncoder.decodeCall('cb_KxEV1igBG2+IDeC2s6dj/8DKjvSn'); // copied from SW confirmation window
console.log(value); 0b10001111 introduced in aeternity/aebytecode#94 |
More concrete reproduction import { BytecodeContractCallEncoder } from './src/main.js';
const bytecodeContractCallEncoder = new BytecodeContractCallEncoder(
'cb_+NBGA6D+x/gUE1YYLmvMJDIzJK2ZFJyOM5sXubwJy+9TVt/ib8C4n7iE/kTWRB8ANwA3ABoOgj8BAz/+m66dXgA3AQdHAgwBAAwDAAwDNwEHDAOPbxX4U0YDoJg7mklGIIWH49uiZBksC7yUEVO88y4D7lTd8+T4TMK2wKOS/kTWRB8ANwEHNwAaBoIAAQM/jC8BEUTWRB8RaW5pdIIvAIk4LjAuMC1yYzEAowAAlS8CEUTWRB8RaW5pdBGbrp1eDW5ld4IvAIk4LjAuMC1yYzEAaSb5ng==',
);
console.log(bytecodeContractCallEncoder._internalEncoder._typeResolver._bytecode)
|
Thanks @davidyuk |
I will draft a PR today/tomorrow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When trying to decode
callData
for Tokaen.org transaction I'm getting aFatePrefixError: Invalid FATE prefix: 0b10001111
error.The error happens at this line in the Superhero Wallet when trying to execute
buy
hereThe text was updated successfully, but these errors were encountered: