Skip to content

Commit

Permalink
contract building
Browse files Browse the repository at this point in the history
  • Loading branch information
panditdhamdhere committed Jul 16, 2024
1 parent 398023c commit 9d27a03
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 50 deletions.
5 changes: 5 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std


[submodule "lib/chainlink-brownie-contracts"]
path = lib/chainlink-brownie-contracts
url = https://github.com/smartcontractkit/chainlink-brownie-contracts
3 changes: 3 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
src = "src"
out = "out"
libs = ["lib"]
remappings = [
'@chainlink/contracts/=lib/chainlink-brownie-contracts/contracts',
]

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
1 change: 1 addition & 0 deletions lib/chainlink-brownie-contracts
12 changes: 0 additions & 12 deletions script/Counter.s.sol

This file was deleted.

14 changes: 0 additions & 14 deletions src/Counter.sol

This file was deleted.

33 changes: 33 additions & 0 deletions src/dTSLA.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

import {ConfirmedOwner} from "@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwner.sol";

/**
* @title dTSLA
* @author Pandit Dhamdhere
* @notice
*/

contract dTSLA {
/// Send an HTTP request to:
// 1. How much TSLA is bought
// 2. If enough TSLA is in the alpaca account,
// mint dTSLA

// Transaction function
function sendMintRequest(uint256 amount) external onlyOwner {}

function _mintFulFillRequest() internal {}

/// @notice USER sends a request to sell TSLA for USDC or (Redemption token )
// This , have the chainlink function call our alpaca(bank)
/// and do the following:
// 1. Sell TSLA on the brokerage
// 2. Buy USDC on the brokerage
// 3. Send USDC to this contract for the user to withdraw

function sendRedeemRequest() external {}

function _redeemFulFillRequest() internal {}
}
24 changes: 0 additions & 24 deletions test/Counter.t.sol

This file was deleted.

0 comments on commit 9d27a03

Please sign in to comment.