Smart contracts for levered farms.
Open in Gitpod or
- Docker
- Poetry
- Pytezos dependencies of your OS.
- Python packages
poetry install
Tests from tests folder, start blockchain sandbox:
./scripts/jakartabox.sh
Then:
pytest tests -v
Gitpod environment provides:
- the Tezos client,
- SmartPy CLI,
- the Ligo compiler,
- the Ligo, Archetype and Michelson IDE plugins and syntax extensions,
- a Michelson debugger.
Could be installed by dockerfile:
- the Archetype compiler and the completium-cli CLI
We will originate 5 contracts: three are custom LB, one is dummy oracle and one is xtz/tzbtc levered farm.
Setup tezos-client to work with testnet (list of alternative nodes):
tezos-client --endpoint https://rpc.jakartanet.teztnets.xyz config update
Import key from Temple wallet (or use faucet).
Go to Settings -> Reveal private key.
Substitute key and run tezos-client import secret key alice unencrypted:<key>
Example:
tezos-client import secret key alice unencrypted:<key> --force
List known keys and check balance
tezos-client list known contracts
tezos-client get balance for alice
You should have more than 10000 xtz on balance.
Replace <key> with private key used above.
Run command:
scripts/deploy_to_testnet.sh > log.txt
- "tzBTC" token tzkt.io, BCD interact
- LB token tzkt.io, BCD interact
- LB CPMM tzkt.io, BCD interact
- Dummy Oracle tzkt.io, BCD interact
- XTZ Levered Farm contract tzkt.io, BCD interact
- BTC Levered Farm contract tzkt.io, BCD interact
-
Set secret key for transactions in
scripts/deploy_to_mainnet.sh. Change initial storage parameters, e.g. administrator. -
Run script:
scripts/deploy_to_mainnet.sh
-
Contract should be displayed or look for originator address at https://tzkt.io.
- XTZ Levered Farm contract tzkt.io, BCD interact
- BTC Levered Farm contract tzkt.io, BCD interact