Giter Club home page Giter Club logo

Comments (4)

ppedziwiatr avatar ppedziwiatr commented on August 19, 2024

Hey @andreespirela .

Can you please explain what is the potential use case?
I'm afraid that using non-standard (maybe even non-public?) plug-ins (that somehow extend the base protocol) could potentially break the contract state evaluation on endpoints, that are un-aware of such add-ons.

from warp.

andreespirela avatar andreespirela commented on August 19, 2024

Hey.

Can you please explain what is the potential use case? I'm afraid that using non-standard (maybe even non-public?) plug-ins (that somehow extend the base protocol) could potentially break the contract state evaluation on endpoints, that are un-aware of such add-ons.

We have a cache API and the idea is to be able to pass some of these functions to do some verifications to the contract. In the future, it might also be useful to create our own execution functions or utilities that users can use inside Verto.

from warp.

ppedziwiatr avatar ppedziwiatr commented on August 19, 2024

Hey.
Can you please explain what is the potential use case? I'm afraid that using non-standard (maybe even non-public?) plug-ins (that somehow extend the base protocol) could potentially break the contract state evaluation on endpoints, that are un-aware of such add-ons.

We have a cache API and the idea is to be able to pass some of these functions to do some verifications to the contract. In the future, it might also be useful to create our own execution functions or utilities that users can use inside Verto.

I see, we will discuss this internally and will let you know soon.

from warp.

ppedziwiatr avatar ppedziwiatr commented on August 19, 2024

@andreespirela , as we're really having some doubts re. this feature (as mentioned previously - using some custom plugins will basically ruin the option to properly evaluate the state by any of the network participants) - one last proposal - have you considered extracting your caching API to a separate class and (with the help of a proper build process) - merge it with the contract's code?

An example of such feature is available here:
https://github.com/redstone-finance/redstone-smartweave-contracts/blob/main/src/common/ContractAdmin.ts
or here
https://github.com/redstone-finance/redstone-smartweave-contracts/blob/main/src/common/ContractInteractions.ts

These classes are then bundled into the resulting contract's source code (using esbuild's iife bundle format - https://github.com/redstone-finance/redstone-smartweave-contracts/blob/main/build.js#L11) and used within contracts like this:
https://github.com/redstone-finance/redstone-smartweave-contracts/blob/main/src/token/token.contract.ts#L139

or:
https://github.com/redstone-finance/redstone-smartweave-contracts/blob/main/src/providers-registry/providers-registry.contract.ts#L45

from warp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.