Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

ErrorBeforeFeeLoanRepaid #15

Open
plymth opened this issue Sep 4, 2022 · 0 comments
Open

ErrorBeforeFeeLoanRepaid #15

plymth opened this issue Sep 4, 2022 · 0 comments

Comments

@plymth
Copy link

plymth commented Sep 4, 2022

When trying to publish a package using the following:

  async publishPackage() {
    const response = await fetch('./package.wasm');
    const wasm = new Uint8Array(await response.arrayBuffer());
    
    const manifest = new ManifestBuilder()
    .publishPackage(wasm)
    .build()
    .toString();
    
    const receipt = await signTransaction(manifest);
    console.log(receipt);
},

I am presented with the following status:

REJECTION: RejectResult { error: ErrorBeforeFeeLoanRepaid(ApplicationError(TransactionProcessorError(InvalidPackage(InvalidType { expected: Some(16), actual: 0 })))) }

I though this might be related to the transaction fee and added the following:

  async publishPackage() {
    const response = await fetch('./package.wasm');
    const wasm = new Uint8Array(await response.arrayBuffer());
    
    const manifest = new ManifestBuilder()
    .callMethod(this.accountAddress, 'lock_fee', [`Decimal("10")`])
    .callMethodWithAllResources(this.accountAddress, 'deposit_batch')
    .publishPackage(wasm)
    .build()
    .toString();
    
    const receipt = await signTransaction(manifest);
    console.log(receipt);
},

Then I get the following:

COMMIT_FAILURE: ApplicationError(TransactionProcessorError(InvalidPackage(InvalidType { expected: Some(16), actual: 0 })))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant