Before running any example you must run yarn
in the examples
folder
Invokes the File System plugin; which creates, reads and deletes a file
$ yarn run:fs
Invokes the HTTP plugin, doing GET and POST requests
$ yarn run:http
Invoke the IPFS Client wrap; adds file to a local IPFS node, and then retrieves it. Before running this example, you must instantiate a local IPFS node by running the following command:
NOTE: This command requires Docker to be installed on your machine.
$ npx polywrap infra up --modules=eth-ens-ipfs
And now you can run the example:
$ yarn run:ipfs
Invokes the logger wrap, which interacts with the logger plugin. It shows a console.log message from WASM world
$ yarn run:logger
Invoke the Ethers core & util wraps, and uses the Ethereum Wallet plugin. It gets the balance of the Staking contract and then parses it from Wei to Eth. Also, it executes the sign typed data method
$ yarn run:ethereum
Invoke the ENS wrap, it gets the resolver & content hash of vitalik.eth
$ yarn run:ens