github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/docs/reference/wasm.md (about)

     1  # WASM Contracts
     2  
     3  Burrow supports experimental [ewasm](https://github.com/ewasm/design) contracts.
     4  Any contract which can be compiled using [Solang](https://github.com/hyperledger-labs/solang)
     5  can run on Burrow.
     6  
     7  ## How to use
     8  
     9  Write a simple solidity contract which is supported by solang. For example:
    10  
    11  ```solidity
    12  contract foobar {
    13      uint64 foo;
    14  
    15      function setFoo(uint64 n) public {
    16          foo = n;
    17      }
    18  
    19      function getFoo() public returns (uint64) {
    20          return foo;
    21      }
    22  }
    23  ```
    24  
    25  And a deploy yaml:
    26  
    27  ```yaml
    28  jobs:
    29  
    30  - name: deployFoobar
    31    deploy:
    32      contract: foobar.sol
    33  
    34  - name: setFoo
    35    call:
    36      destination: $deployFoobar
    37      function: setFoo
    38      data: [ 102 ]
    39  
    40  - name: getFoo
    41    call:
    42      destination: $deployFoobar
    43      function: getFoo
    44  ```
    45  
    46  Now run this script using:
    47  
    48  ```
    49  burrow deploy --wasm -a Participant_0 deploy.yaml
    50  ```