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.
Tinlake uses foundry for development. Please install the foundry client. Then, run the following command to install the dependencies:
forge update
The tests for Tinlake are written in Solidity
forge test
A regular expression can be used to only run specific tests.
forge test -m <REGEX>
forge test -m testName
forge test -m ':ContractName\.'
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
Join our public Discord: Centrifuge Discord.