Daohub-io/cap9

Storage#Write Capability (Ewasm)

Latrasis opened this issue · 3 comments

Test Procedure in cap9-std/examples/writer_test.rs should use #proc_storage_write in the internal cap9-std crate.

We need to include tests in tests/syscalls/write.ts for a procedure that:

  1. Is given 1 storage write capability type 0x7 , that allows it to write an arbitrary, 32-byte value in address 0xdeadbeef. This capability must be stored at write cap index 0.
  2. Creates a 32 byte memory buffer, and invokes the write capability to write the value 0xfee using #storageStore to address 0xdeadbeef.

0xfoo -> 0xfee, because hex.

  • Implement syscall.
  • Implement capability checking.

Completed with #171.