Coder Social home page Coder Social logo

Comments (4)

tzaffi avatar tzaffi commented on July 24, 2024

Hi @zejoeh. I'm glad you are finding graviton useful in your PyTEAL development work.

Integration with PyTeal has been steadily improving. In particular, the soon to be merged feature/abi branch has the class PyTealDryRunExecutor which sounds like it has some overlap with your @SubroutineRunner decorator. I recommend you have a look at the existing code and see if it could be integrated or leveraged in some way. It may also be the case that the functionality that you are proposing is an obvious improvement. We welcome pull requests. We can also continue the discussion via this issue.

from graviton.

zejoeh avatar zejoeh commented on July 24, 2024

Hi @tzaffi, yes this indeed looks already like a step in the same direction I was going. I wrote this decorator based on the code in the current master branch, so didn't see you already had a similar thing in the feature branch. I will hopefully find some time in the next days to have a closer look at the feature/abi branch and see if I can contribute anything there.

Probably the only "improvement" from my version is that it returns an instance of a container dataclass for the list of DryRunInspectors on sequences, which also stores the inputs in a format consistent with the output and lets you skip writing out list comprehensions each time you want to retrieve the same attribute for many dryruns. I found it pretty nice for writing out many short tests where you only care about evaluating some output quickly and just want to iterate over the inputs and outputs in pairs, but you could of course achieve exactly the same with a range loop or enumerating over one of the input lists and accessing the elements directly.

from graviton.

tzaffi avatar tzaffi commented on July 24, 2024

Thanks for looking at feature/abi. Keep me posted!

from graviton.

zejoeh avatar zejoeh commented on July 24, 2024

Hi @tzaffi, I added a draft pull request on the PyTeal repository. Happy to receive feedback, but still adding improvements as they come up in my own project. I think it can be improved significantly by making use of all the work put into the ABI typing, but I have not had the time yet to dig into it.

from graviton.

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.