For the complete documentation index, see llms.txt. This page is also available as Markdown.

Compiling Contracts

Zeus supports compiling EOSIO and EVM compatible contracts.

Let's first create a contract

zeus create contract compiler

This places an EOSIO contract in /contracts/eosNow let's compile it.

zeus compile compiler # if using an old cdt --legacy-cdt

If you want to use docker add --docker=true. EOSIO (now leap) and eosio.cdt (now cdt) only supports Ubuntu 18, 22, 24, so Docker must be used for the latest versions

If you wanted to compile all contracts within the./contracts directory, you can run

zeus compile
zeus compile [contract]

compile contracts

Options:
  --version       Show version number                                  [boolean]
  --storage-path  path for persistent storage    [default: "/home/ubuntu/.zeus"]
  --rc-file       use rc file to load options from
                                     [default: "/home/ubuntu/.zeus/zeusrc.json"]
  --rc-ignore     ignore rc file                                [default: false]
  --verbose, -v                                                 [default: false]
  -h, --help      Show help                                            [boolean]
  --all           compile all contracts                          [default: true]
  --chain         chain to work on                              [default: "eos"]
  --sidechain     sidechain name to use for liquidx                [default: ""]
  --phase         select compile option [dapp-services-eos, eos]   [default: ""]
  --docker        enable to use docker                          [default: false]
  --legacy-cdt    unbox cmake files using cdt version < 3.0.0   [default: false]

Examples:
  zeus compile --all
  zeus compile helloworld

To compile an ETH contract run:

zeus compile link --phase eth
# to compile all
zeus compile --phase eth
npx truffle compile
# run any truffle command

If you wish to add your own ethereum contract, you can place it in the ./contracts/eth directory.

If you want to change the compiler version, or any truffle settings, see the ./truffle-config.js file.

Last updated

Was this helpful?