uuosio / ascdk

MIT License
12 stars 9 forks source link

ActionWrapper.fromString builds but fails when executing #41

Closed jafri closed 2 years ago

jafri commented 2 years ago

I've been chasing down this bug, but not sure what it is coming from

For some reason ActionWrapper.fromString("setglobals") breaks when running, but new ActionWrapper(Name.fromString("setglobals")) works fine

It only breaks when running the wasm, not when building

Any ideas @learnforpractice?

Definition of ActionWrapper

export class ActionWrapper {
    constructor(
        public action: Name = new Name()
    ){}

    static fromString(s: string): ActionWrapper {
        return new ActionWrapper(Name.fromString(s))
    }
learnforpractice commented 2 years ago

Can not replicate this issue. Can you write a minimal test?

jafri commented 2 years ago

@learnforpractice I was able to resolve the issue

The issue is more related to #30,

The preprocessor is not picking up files unless you include a decorator like @packer in the file

Without pre-processor, check was being called at instantiation where memory was not available and throwing an error