Daohub-io / cap9

Capability-based security protocol for smart contracts
Apache License 2.0
22 stars 10 forks source link

Storage#Write Capability (Ewasm) #140

Closed Latrasis closed 5 years ago

Latrasis commented 5 years ago

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.
JakeOShannessy commented 5 years ago

0xfoo -> 0xfee, because hex.

JakeOShannessy commented 5 years ago
JakeOShannessy commented 5 years ago

Completed with #171.