You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, the autogenerated Noir interfaces take a private or public context on every call as their first parameter. We can take a page out of the refactor that @benesjan did for storage in #1926, and do the same for interfaces.
So instead of doing:
let token = Token::at(address);
token.transfer(&mut context, to, amount);
We'd be doing:
let token = Token::at(address,Context::private(&mut context));
token.transfer(to, amount);
Note that we should wait until #2074 is implemented before moving forward though. Also, note that Context::private(&mut context) can probably be autogenerated by a macro.
The text was updated successfully, but these errors were encountered:
Definitely. I forgot I had split the interfaces into public and private, and each of them takes a public context or private context respectively, so there's no need to use the Context union from #2074.
Today, the autogenerated Noir interfaces take a private or public
context
on every call as their first parameter. We can take a page out of the refactor that @benesjan did for storage in #1926, and do the same for interfaces.So instead of doing:
We'd be doing:
Note that we should wait until #2074 is implemented before moving forward though. Also, note thatContext::private(&mut context)
can probably be autogenerated by a macro.The text was updated successfully, but these errors were encountered: