Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flow-credit-markets — Flow Credit Markets (FCM), Enshrined Lending on Flow

Getting started

Clone the repository and install dependencies:

flow deps install

Run lint & tests:

make lint
make test

Project Layout

  • cadence/transactions/ and cadence/scripts/ — production transactions and scripts only
  • cadence/tests/transactions/ and cadence/tests/scripts/ — test-only helpers, not for production use

Writing tests

Tests live in cadence/tests/ as *_test.cdc files.

Use the snapshot pattern to reset blockchain state between tests without redeploying contracts:

import Test
import BlockchainHelpers

access(all) var snapshot: UInt64 = 0

access(all) fun beforeEach() {
    if snapshot != getCurrentBlockHeight() {
        Test.reset(to: snapshot)
    }
}

access(all) fun setup() {
    // deploy contracts
    // setup code every test case needs
    snapshot = getCurrentBlockHeight()
}

About Flow

This repo is part of the Flow network, a Layer 1 blockchain built for consumer applications, AI agents, and DeFi at scale.

About

Flow Credit Markets (FCM), the enshrined lending protocol for consumer DeFi on the Flow network. Automated rebalancing, zero-liquidation design.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages