• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    Solidity
  • License
    GNU Affero Genera...
  • Created over 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Smart contracts for Tinlake, the on-chain securitization protocol for real-world assets

Tinlake Contracts

Open source implementation of Tinlake in Solidity. This repository contains the core contracts of Tinlake.

Tinlake is a set of smart contracts that allows companies and individuals to use tokenized non-fungible real-world assets as collateral to obtain liquidity.

For learning more about how Tinlake works, you can visit the Tinlake documentation.

Getting started

Tinlake uses foundry for development. Please install the foundry client. Then, run the following command to install the dependencies:

forge update

Testing

The tests for Tinlake are written in Solidity

Run all tests

forge test

Run specific tests

A regular expression can be used to only run specific tests.

forge test -m <REGEX>
forge test -m testName
forge test -m ':ContractName\.'

Deployment

To deploy Tinlake, you need to set up a .env file with the deployment parameters. A sample file can be found in .env.example.

To confirm that the .env file is set up correctly, run:

./bin/env-check.sh

Once you've double checked all the environment variables, the deployment can be started:

forge script script/deploy.s.sol:DeployScript --rpc-url $RPC_URL  --private-key $PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_KEY -vvvv

When the deployment is complete, you can print the list of deployed contracts:

ROOT_CONTRACT=0x0 forge script script/print_contracts.s.sol:PrintContractsScript --rpc-url $RPC_URL -vvvv

And you can also run the set of RPC tests against the newly deployed pool:

ROOT_CONTRACT=0x0 MAKER_RPC_TESTS=false forge script script/run-rpc-tests.s.sol:RunRPCTests --rpc-url $RPC_URL

Community

Join our public Discord: Centrifuge Discord.

More Repositories

1

go-substrate-rpc-client

Substrate RPC client for go aka GSRPC
Go
202
star
2

centrifuge-chain

Centrifuge Chain: the layer-1 blockchain for real-world assets, built on Substrate.
Rust
182
star
3

pod

Go implementation of Centrifuge POD (Private Off-chain Data) node
Go
77
star
4

precise-proofs

A library to generate merkle proofs for complex data structures
Go
63
star
5

privacy-enabled-erc721

A base implementation of a user-mintable, privacy-enabled ERC-721 NFT
Solidity
37
star
6

zk-nft-demo-contract

Solidity
35
star
7

apps

Monorepo for Centrifuge frontends, including Centrifuge App, onboarding api, and Fabric design system.
TypeScript
27
star
8

fudge

FUlly Decoupled Generic Environment for Substrate-chains
Rust
22
star
9

liquidity-pools

Liquidity Pools enable seamless deployment of Centrifuge pools on any EVM-compatible blockchain
Solidity
19
star
10

documentation

Documentation for Centrifuge
JavaScript
15
star
11

clp-wasm

CLP Linear Programming solver ported to WebAssembly
C++
11
star
12

tinlake-subgraph

TypeScript
11
star
13

substrate-pallet-multi-account

A pallet/runtime module for Substrate with multisig functionality with a static `AccountId` and a dynamic `threshold` and set of `signatories`.
Rust
11
star
14

centrifuge-ethereum-contracts

The main Centrifuge Ethereum contracts
JavaScript
10
star
15

tinlake-maker-lib

Solidity
10
star
16

tinlake-ui

Tinlake Smart Contracts dApp
TypeScript
9
star
17

paper-privacy-enabled-nfts

Privacy-Enabled NFTs: Self-Mintable Non-Fungible Tokens With Private Off-Chain Data
TeX
8
star
18

website

centrifuge.io
JavaScript
8
star
19

react-dapp-requirements

JavaScript
7
star
20

cps

Centrifuge Proposals (CPs): Documenting and Improving Centrifuge Governance and Protocol
7
star
21

axis

Single source of truth used to build user interfaces for Centrifuge
TypeScript
5
star
22

tinlake-math

Math used in the Tinlake system, based on the Dai Savings Rate
Solidity
3
star
23

twamm

Time Weighted Automated Market Maker for Substrate blockchains
3
star
24

tinlake-deploy

Shell
3
star
25

protocol

TeX
3
star
26

tinlake-pools-mainnet

Tinlake pool metadata (Mainnet)
JavaScript
3
star
27

tinlake-title

Track ownership and give permissions on contracts with an NFT
Solidity
2
star
28

axelar-cgp-substrate

Rust
2
star
29

tinlake-pool-config

JavaScript
2
star
30

tinlake-erc20

Minimal ERC20 token for use in Tinlake. Copied from dai.sol
Solidity
2
star
31

tinlake.js

Tinlake Smart Contracts API Client
TypeScript
2
star
32

tinlake-auth

Solidity authorization pattern, based on the MakerDAO dss ward pattern
Solidity
2
star
33

centrifuge-cli

Centrifuge CLI
TypeScript
1
star
34

centrifuge-chain-functional-test

Functional testing client for the Centrifuge Chain
TypeScript
1
star
35

mainnet-conf-time-capsule

NFT Time Capsule Project for the 2022 Ethereum Mainnet Conference in New York
TypeScript
1
star
36

cfg-reward-rate

Solidity
1
star
37

substrate-builder

Base image for building substrate
Dockerfile
1
star
38

precise-proofs-js

JavaScript
1
star
39

tinlake-solver-ui

JavaScript
1
star
40

security

Security bounty & audit overview of Centrifuge
1
star
41

tinlake-spells-kovan

Solidity
1
star
42

centrifuge-protobufs

Protobuf files & go bindings for Centrifuge Documents
Go
1
star
43

commander

Centrifuge ecosystem at your fingertips
TypeScript
1
star
44

tinlake-proxy

proxy actions for tinlake contracts
Solidity
1
star
45

docker-dapptools-base

Dockerfile
1
star
46

pools-subql

Subquery for Pools on Centrifuge
TypeScript
1
star
47

substrate-authn-faucet-backend

JavaScript
1
star
48

tinlake-spells-mainnet

Solidity
1
star
49

tinlake.info

JavaScript
1
star