Skip to main content

Contract Compilation

The smart contract is written in Archetype language. Go to the Smart contract section for a detailed presentation.

In order to generate the javascript, used in the dapp, here is the command:

completium-cli generate javascript ./contract/escrow.arl > ./src/contract.js

you can now use contract as below:

import { code, getStorage } from '../contract';...tezos.wallet.originate({      code: code,      init: getStorage(        seller,                                // seller        account,                               // buyer        taxCollector,                          // taxcollector        (parseInt(price) * 1000000).toString() // price      )    }).send().then(op => {...