Skip to content

ChoiHoldings/frontrow-flow

Repository files navigation

FrontRow Flow Contracts

The Cadence contracts defined in this repository are for use on the FrontRow platform at frontrow.kr

The contracts and tests have been extracted from an Nx monorepo.

Overview

See the Readme in apps/flow-test

Usage

Setup

The Flow CLI must be installed and available globally:

# Mac
brew install flow-cli

# Linux
sh -ci "$(curl -fsSL https://storage.googleapis.com/flow-cli/install.sh)"

Install packages

npm install

Testing

npm run flow-test

When running transactions via the emulator, you can print logs using the log() function and prefixing the output with LOG:, e.g.

transaction() {
  execute {
    log("LOG: HELLO!!!")
  }
}

Deploy

Local (emulator)

npm run flow-dev

Docker (emulator)

docker build --progress=plain --no-cache -t flow-dev -f apps/flow-test/Dockerfile --target=dev .

Testnet

  • Requires flow-testnet.json with accounts/testnet-account
  • Import aliases must be set up correctly

Create FrontRow

flow accounts add-contract FrontRow ./libs/shared/data-access-flow/src/lib/frontrow/contracts/FrontRow.cdc --signer testnet-account -n testnet -f flow.json -f flow-testnet.json

Create FrontRowStorefront

flow accounts add-contract FrontRowStorefront ./libs/shared/data-access-flow/src/lib/frontrow/contracts/FrontRowStorefront.cdc --signer testnet-account -n testnet -f flow.json -f flow-testnet.json

Update

Use the above commands, but replace add-contract with update-contract

Organization

  • apps/flow-test
    • An Nx app containing all the unit tests for the FrontRow contracts
    • npm run flow-test runs the tests
    • npm run flow-dev starts the emulator with a basic dev environment
      • FrontRow and FrontrowStorefront contracts deployed, with some Flow and FUSD minted to the emulator-account
  • libs/shared/data-access-flow
  • libs/shared/util-flow
    • Flow related utility library with no local sub-dependencies
  • libs/shared/util-flow-crypto
    • Library for signing Flow transactions with a private key
    • Only used in development and testing
  • libs/shared/util-core
    • Low level utilities shared between Flow/frontend/backend

About

Flow smart contracts for the FrontRow NFT platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •