neo-one icon indicating copy to clipboard operation
neo-one copied to clipboard

Fix how our contracts are called

Open spencercorwin opened this issue 3 years ago • 5 comments

  • Need to make sure we’re calling contracts correctly in our client ScriptBuilder
  • If sticking with current hack-y version:
    • All method offsets are set to zero (improper)
    • Every method should now accept two args: 1 byte string for method, and one array for actual args
    • Made edits in smartContract for.ts and linkedSmartContract for.ts
  • If changing to how it should be done
    • Remove jump table. Method lookup is by manifest offset
    • Method offsets should be where the method actually starts and not jump table location
    • Every method needs to start with INITSLO

spencercorwin avatar Jun 17 '21 06:06 spencercorwin

Change line 250 in createSmartContract.ts Screen Shot 2021-08-19 at 5 19 42 PM

and line 216-218: Screen Shot 2021-08-19 at 5 19 42 PM

spencercorwin avatar Aug 20 '21 00:08 spencercorwin

And in line 227 in LocalUserAccountProvider.ts Screen Shot 2021-08-19 at 6 40 51 PM

spencercorwin avatar Aug 20 '21 01:08 spencercorwin

And line 403 (and probably others) in common.ts: Screen Shot 2021-08-24 at 2 19 23 PM

spencercorwin avatar Aug 24 '21 21:08 spencercorwin

And here in common.ts and ManifestSmartContractProcessor.ts

Screen Shot 2021-08-25 at 12 33 11 PM Screen Shot 2021-08-25 at 12 33 29 PM

spencercorwin avatar Aug 25 '21 19:08 spencercorwin

Also revert #2544

spencercorwin avatar Sep 13 '21 19:09 spencercorwin