Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 847 Bytes

wasm.md

File metadata and controls

50 lines (37 loc) · 847 Bytes

WASM Contracts

Burrow supports experimental ewasm contracts. Any contract which can be compiled using Solang can run on Burrow.

How to use

Write a simple solidity contract which is supported by solang. For example:

contract foobar {
    uint64 foo;

    function setFoo(uint64 n) public {
        foo = n;
    }

    function getFoo() public returns (uint64) {
        return foo;
    }
}

And a deploy yaml:

jobs:

- name: deployFoobar
  deploy:
    contract: foobar.sol

- name: setFoo
  call:
    destination: $deployFoobar
    function: setFoo
    data: [ 102 ]

- name: getFoo
  call:
    destination: $deployFoobar
    function: getFoo

Now run this script using:

burrow deploy --wasm -a Participant_0 deploy.yaml