Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement attribute macro for trait interface generating boilerplate specific for cw1-whitelist #495

Closed
2 of 5 tasks
Tracked by #493
hashedone opened this issue Oct 18, 2021 · 3 comments
Closed
2 of 5 tasks
Tracked by #493
Assignees
Labels
ng contracts New contract framework

Comments

@hashedone
Copy link
Contributor

hashedone commented Oct 18, 2021

Part of #493, follow up of #494

  • Generate ExecMsg from contract trait
  • Generate QueryMsg from contract trait
  • Generate dispatch function for dispatching exec msg
  • Generate dispatch function for dispatching query msg
  • If entry points turns out being tricky - generate them, or provide tool for making them clear
@egasimus
Copy link

egasimus commented Dec 3, 2021

Yo, these past few months we've been up to more or less the same thing. (Contract traits too - though ours are in a private repo that we'll make public once it passes audits etc.) Good to see the design of the platform has been guiding everyone in the same direction :)

We've implemented ours on top of Secret Network's fork of CW 0.10, but word has it 0.16 is coming to SN soon. Wanna share the workload?

@hashedone hashedone self-assigned this Dec 6, 2021
@hashedone
Copy link
Contributor Author

hashedone commented Dec 6, 2021

@egasimus First of all I am more than happy that someone besides me figured out the same idea. You are the second one who pointed me something similar after looking for my proposal (the other one was not CW-specific), which basically means there is a need for such solution.

I actually already started my implementation of contract generation. I have no problem with sharing workload, but we would need to decide what exactly shape are we modeling. What I lack in your approach is... documentation, so it is hard for me to what exact contract are you expecting to generate, and how do you want to handle next things. We started with creating "generated" version of contract created by hand (and actually even before it - I sketched a brief proposal about that: #391). Possibly you have something similar, but you didn't link it and I cannot find it quickly - if there is something then please link so maybe we can influence this.

But if we are able to find some common sense of where are we going with that I think that sharing the workload would be very nice.

One think you should know about our solution is that for now it seems that it seems to be more gas costly than traditional contracts, at least for trivial contracts (it is hard to tell for now if its overhead is constant and would diminish for real life contracts or not). However we don't have a way to profile them correctly and I personally cannot figure out what is actually slowing down so much (see #567). If it is not a problem for you then it is ok, but if you have some idea how to improve the gas usage then it can be very helpful.

@ethanfrey ethanfrey added the ng contracts New contract framework label Dec 14, 2021
@ethanfrey ethanfrey added this to the v0.12.0 milestone Dec 14, 2021
@ethanfrey ethanfrey removed this from the v0.12.0 milestone Aug 15, 2022
@uint
Copy link
Contributor

uint commented Oct 17, 2022

This is part of Sylvia now. Closing!

@uint uint closed this as completed Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ng contracts New contract framework
Projects
None yet
Development

No branches or pull requests

4 participants