We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
abi()
Solidity permits the instantiation and storage of types which can be called directly. This would be a useful but low priority UX feature for Sway.
use interface::MyExternalContractAbi; use std::constants::ZERO_B256; storage { target: MyExternalContractAbi = // something here } impl MyContract for Contract { #[storage(write)] fn constructor() { storage.target.write(abi(MyExternalContractAbi, ZERO_B256)); } #[storage(read)] fn call() { storage.target.read().call_some_function(); } }
Storage may not be a good idea because of read costs but some may want to switch the instance. Configurables would also be useful.
The text was updated successfully, but these errors were encountered:
This may or may not be a duplicate issue that I would have likely raised some time ago.
Sorry, something went wrong.
No branches or pull requests
Solidity permits the instantiation and storage of types which can be called directly.
This would be a useful but low priority UX feature for Sway.
Storage may not be a good idea because of read costs but some may want to switch the instance.
Configurables would also be useful.
The text was updated successfully, but these errors were encountered: