Skip to content

ruquant/kordfismartcontracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Levered Farm Smart Contracts

Smart contracts for levered farms.

Getting started

Open in Gitpod or

Install dependencies locally

  1. Docker
  2. Poetry
  3. Pytezos dependencies of your OS.
  4. Python packages poetry install

Run tests

Tests from tests folder, start blockchain sandbox:

./scripts/jakartabox.sh

Then:

pytest tests -v

Gitpod

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:

Deploy contract to testnet

We will originate 5 contracts: three are custom LB, one is dummy oracle and one is xtz/tzbtc levered farm.

Prepare tezos client.

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.

Deploy contracts.

Replace <key> with private key used above. Run command:

scripts/deploy_to_testnet.sh > log.txt

Deployed examples

Deploy to mainnet

  1. Set secret key for transactions in scripts/deploy_to_mainnet.sh. Change initial storage parameters, e.g. administrator.

  2. Run script:

    scripts/deploy_to_mainnet.sh

  3. Contract should be displayed or look for originator address at https://tzkt.io.

Deployed contracts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published