keep-starknet-strange/piltover

[feat] Contract Bindings

drspacemn opened this issue · 17 comments

Generate Contract bindings with Cainome.

References

https://github.com/cartridge-gg/cainome

i'd like to work on this

i'd like to work on this

Awesome! Thank you for considering contributing. If you have any question let us know.

https://github.com/cartridge-gg/cainome

hi @glihm could you perhaps provide more resources/references, for more insight as to how you what this issue handled? technical insight from you would go a long way as well. Thanks

Hey @Akinbola247 for sure, thanks for considering contributing.

The idea of cainome is that it is able to generate the rust bindings from a contract ABI.
So, this would be the worflow:

  1. Create a rust project (library) inside the repo (can be at the root of the repo for now).
  2. In this library, you will want to use a generated Sierra file to parse the ABI using abigen! macro from cainome: example here.
  3. This can be a first step. And then we will see how to structure the rust code to be imported as a library by other project to easily interact with the piltover contracts.

Does it make more sense? If it's too blurry, I'll attempt to create a first version of the rust bindings (or @drspacemn or @b-j-roberts), and then you can take over.

okay! i'll give this a shot. i'll revert if i have anymore questions, perhaps we can maintain TG as a means of communication.

@Akinbola247 are you still working on this one or we can re-assign?

Hey there, can I be assigned for this task. Would love to take it up!

@glihm yes I am. Although, I don’t mind working together on it with @KeneePatel .

Thanks @Akinbola247. Would be awesome to collab. @glihm feel free to assign me as well.

Hey @glihm, which Sierra file are we supposed to parse using abigen! macro from cainome in our case?

Hey @glihm, which Sierra file are we supposed to parse using abigen! macro from cainome in our case?

Hum, when you mean which, you mean which "contract" right?
In out case here it should be the app chain contract, that should contain all the exposes methods in the ABI that we want to call.

Do we have a TG group for means of communicating?

We do, join us here

Thanks sire. Just joined it.

Hello ser @drspacemn,

Is this issue complete or should there be more development needed on this. If yes, I would be happy to contribute towards it.

Completed by #28.