cadence icon indicating copy to clipboard operation
cadence copied to clipboard

PoC: Add built-in CCF contract with encode function

Open turbolent opened this issue 4 months ago • 1 comments

Work towards #3637

Description

Add a new built-in contract CCF, which allows encoding an exportable value to .

The parameter of encode is a reference, so it can accept both structs and resources, and supports move-semantics of resources (i.e. does not consume the passed resource-kinded value)

For now this is a PoC showing how this could be done.

### TODO
- [ ] Determine interest and use-cases
- [ ] Add more tests
- [ ] Decode function?

  • [x] Targeted PR against master branch
  • [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • [x] Code follows the standards mentioned here
  • [x] Updated relevant documentation
  • [x] Re-reviewed Files changed in the Github PR explorer
  • [x] Added appropriate labels

turbolent avatar Oct 22 '24 18:10 turbolent