Skip to content

Create real world asset token backed by Tesla share

Notifications You must be signed in to change notification settings

JhaMohan/Real-world-asset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. Only the owner can mint dTSLA
  2. Anyone can redeem dTSLA for USDC or "the stablecoin" of the choice.
  3. Chainlink functions will kick off a TSLA sell for USDC,and then send it to the contract
  4. Then user will have to then call finishRedeem to get their USDC.
Example Workflow
1. Minting:
    . The owner mints 1,000 dTSLA tokens.
2. Redeeming:
    . A user holding 10 dTSLA tokens initiates a redeem call.
    . Chainlink executes a TSLA sale equivalent to the value of 10 dTSLA tokens and transfers the resulting USDC to the contract.

3. Finalizing Redemption:
    . Once the USDC from the TSLA sale arrives in the contract, the user calls finishRedeem.
    . The contract transfers the equivalent USDC amount to the user’s wallet.

Usage

install

forge install smartcontractkit/[email protected] --no-commit

Build

$ forge build

Test

$ forge test

Format

$ forge fmt

Gas Snapshots

$ forge snapshot

Anvil

$ anvil

Deploy

$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>

Cast

$ cast <subcommand>

Help

$ forge --help
$ anvil --help
$ cast --help

About

Create real world asset token backed by Tesla share

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published