Auto-generate a ContractInterface struct (in Noir) for a Noir Contract #1237
Labels
T-feature-request
Type: Adding a brand new feature (not to be confused with improving an existing feature).
Milestone
The current syntax for making an external function call is clunky.
We should update the syntax to feel more like Solidity: import a ContractInterface, create an instance of the contract at an address, then make a call to a named method of the contract.
Basically this:
I've written an example
ContractInterface
for some contract B (contract B itself is not shown here), which I believe could be auto-generated as its ownb-contract-interface.nr
file. @spalladino has written some code already to auto-generate a contract interface which can be consumed by typescript code. This issue seeks something similar, but a contract interface which can be consumed by other noir contracts.TODO:
Ask @vezenovm to implement a 'string to bytes' method :) (because the below example only works with a hack to Noir)We won't need this if generating the contract interface programmatically. We can hard-code the function selectors into the auto-generated interface.Test how to make Noir keccak equal to Typescript Noir keccak (what I mean by this is: ensure the function selectors match in Noir and TS worlds).We won't need this if generating the contract interface programmatically. We can hard-code the function selectors into the auto-generated interface.E.g.
let my_array = [0; const1 + const2];
ContractInterface
struct.The text was updated successfully, but these errors were encountered: