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
the import! macro located in /crates/zink/abi/abi_macro, is currently written for tests, based on the logic of parsing ABI into rust signatures, we'd introduce the interface of foreign language integration with it
// struct Foo(Address);import!("Foo","../foo.json")// we haven't had this interface yet but let's assume we havestructMyContract{foo:Foo,// this is the address of Foo };implMyContract{fnget_bar(&self) -> i32{// run contract call//// evm::contract_all(// address: foo.address, // method: "bar", // args: []// );self.foo.bar()}}
contracts with this macro would be pretty like the -sys crates in rust, we can simply wrap some ABIs and make them a zink library, for example, we can wrap the whole openzepplin libraries for zink contracts to use, and as a result, for calling these libraries, we can keep our interface, like
use foo_zsys::Foo;structMyContract{foo:Foo,}// ...
which would be the same calling a contract written in zink!
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
the
import!
macro located in/crates/zink/abi/abi_macro
, is currently written for tests, based on the logic of parsingABI
into rust signatures, we'd introduce the interface of foreign language integration with itcontracts with this macro would be pretty like the
-sys
crates in rust, we can simply wrap some ABIs and make them a zink library, for example, we can wrap the whole openzepplin libraries for zink contracts to use, and as a result, for calling these libraries, we can keep our interface, likewhich would be the same calling a contract written in zink!
The text was updated successfully, but these errors were encountered: