No, smart contracts cannot interact with the world outside of the blockchain on which they live. For example, a smart contract cannot act as a REST endpoint or data source. Smart contracts can interact with other contracts in the same environment, or with compatible external libraries. When creating an external library to interact with a Casper smart contract, consider the following:
- Wasm is expressed as
little-endian
by default. Check for endianness compatibility. - As
wasm32-unknown-unknown
is a 32-bit platform, it cannot support 64-bit external code. Your library needs to be compatible with 32-bit code. - Consider a library that supports
no_std
. - Try to avoid native operating system calls. If the library uses the filesystem, sockets, or other native OS functionality, then it may not work with a Casper smart contract.
If you have any concerns, questions, or issues, please submit a request to our support team here:
Comments
0 comments
Please sign in to leave a comment.