Objects #631
Stebalien
started this conversation in
Filecoin Virtual Machine
Objects
#631
Replies: 1 comment 1 reply
-
I think |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Iteratively working with large datastructures is somewhat painful. We currently have two options:
A third option would be "objects". I.e., the ability to pass a code CID and a state CID to the FVM and have the FVM instantiate an "object" that lives inside the current invocation container.
For example, let's say that contract A wants to list all NFTs in contract B.
IterateNFT()
on contract B.(code_cid, nft_root_cid)
.code_cid
is the CID of a wasm module conforming to the wasm component model.A
calls the syscallobject::load(code_cid, nft_cid)
, getting back an object "handle".A
can then call methods (component model methods) on this object directly.A
can call someobject::close(handle)
method to free the object's resources.Important notes:
flush
method on the object which would return the new root CID.Eventually, it would be nice to be able to model actors as "objects" owned by the system actor.
Beta Was this translation helpful? Give feedback.
All reactions