Skip to content

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

License

Notifications You must be signed in to change notification settings

centrifuge/tinlake

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks