TradeFlows
  • TradeFlows
    • What is the Core Protocol?
    • Benefits of using TradeFlows
    • Innovations
    • Flows - Programmed Liquidity
    • Dharma - Collaborative Ratings
    • Smart Contracts
  • Guides
    • Getting Started
      • Assets
        • Minting
        • Agreeing
        • Composing
      • Payment Streams
        • Create
        • Pause
      • Escrows
        • Increase Collateral
        • Decrease Collateral
      • Ratings
      • Withdraw Funds
  • Use Cases
    • Web3
      • DAO Management
    • Web2
      • Building & Construction
      • Gig Economy
      • Small Business
  • Links
    • Website
    • Twitter
    • Discord
Powered by GitBook
On this page
  • Goerli Testnet
  • Infrastructure Alpha on Goerli Testnet
  • Flows Alpha on Goerli Testnet
  1. TradeFlows

Smart Contracts

Testing environment on StarkNet Goerli

The protocol is based on three infrastructure Smart Contracts that are used to power the entire infrastructure:

  • DAO: Custom ERC20 contract that represents the ownership of the DAO. This contract is also the treasury to which all Trade Init / Minting fees go to.

  • txAsset: Custom ERC721 contract that stores the terms of the asset as a minted NFT. This contract also contains the functionality that allows the buyer to agree to the asset and the NFT is also the receiver of the programmed payment stream.

  • txEscrow: Custom ERC1155 contract that wraps around the ownership of an escrow account.

  • txDharma: Custom ERC20 contract that is non-transferable and mintable. Community members that are in an active trade are able to mint these tokens to their counterpart's wallets or burn them when attributing a negative score.

Additionally, we have a set of ERC20 wrapper contracts that enable all custom streaming and escrow functionality:

  • txFlow: Custom ERC20 contract that wraps around the target token, eg. USDC, and contains the streaming and self-custody functionality. This contract is also extended to attribute a balance to any ERC721 contract.

We have deployed a set of contracts to the StarkNet Goerli testnet in order to test all of the functionality in this document. More on this below.

Goerli Testnet

During this alpha phase, we are deploying a set of test contracts to the Goerli Starknet testnet. The production contract will be deployed at a later date on to mainnet.

⚠️ WARNING! ⚠️ All of the contract addresses below will change as we iterate rapidly during these initial phases. Please keep a look out for changes in these addresses.

Infrastructure Alpha on Goerli Testnet

Contract
Address

DAO

txTrade

txDharma

Flows Alpha on Goerli Testnet

Contract
Address

ERC20 Test

ERC20 Test xFlow

PreviousDharma - Collaborative RatingsNextGetting Started

Last updated 2 years ago

0x0351172e2bb614d3354c8c5aba22d777f6faeba2b66744f7116e96b79358dac0
0x04f7ce277a2d81fb20466f07017037e1a9762c308cc86a95f9534c61f3412714
0x07d00d72858504a84a1a09a06e60800811c2b8d720474ca420f2fa7bc1b1104a
0x039bded9481f5fc7d46185c44655206362a647bb046dd97efcd2524a10bf7ab2
0x002a63a6069e8209ad6bcab1d11d75cead44003aaaccbfad069954e32e533f35