-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start of Deploy Scripts for Treasury Contracts
- Loading branch information
root
authored and
root
committed
Oct 29, 2024
1 parent
65e8c4c
commit 1065a42
Showing
6 changed files
with
102 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
import {Oracle} from "src/Treasury/Oracle.sol"; | ||
|
||
contract DeployGenesisPriceOracle is Script { | ||
GenesisPriceOracle public genesisPriceOracle; | ||
|
||
function run() external { | ||
address fyre = 0xFYREAddressHere; // Replace with actual FYRE address | ||
address manaERC20 = 0xMANAERC20AddressHere; // Replace with actual MANA ERC20 address | ||
address labContrib = 0xLABCONTRIBAddress; // Replace with actual LAB_CONTRIB address | ||
address finContrib = 0xFINCONTRIBAddress; // Replace with actual FIN_CONTRIB address | ||
address shld = 0xSHLDAddress; // Replace with actual SHLD address | ||
|
||
uint256 fyrePrice = 100; // Replace with actual price for FYRE | ||
uint256 manaERC20Price = 200; // Replace with actual price for MANA ERC20 | ||
uint256 labContribPrice = 300; // Replace with actual price for LAB_CONTRIB | ||
uint256 finContribPrice = 400; // Replace with actual price for FIN_CONTRIB | ||
uint256 shldPrice = 500; // Replace with actual price for SHLD | ||
|
||
vm.startBroadcast(); | ||
genesisPriceOracle = new GenesisPriceOracle( | ||
fyre, | ||
manaERC20, | ||
labContrib, | ||
finContrib, | ||
shld, | ||
fyrePrice, | ||
manaERC20Price, | ||
labContribPrice, | ||
finContribPrice, | ||
shldPrice | ||
); | ||
vm.stopBroadcast(); | ||
|
||
console.log("GenesisPriceOracle deployed at:", address(genesisPriceOracle)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// deploy_ManaBalanceVerifier.sol | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
import {ManaBalanceVerifier} from "src/Treasury/ManaBalanceVerifier.sol"; | ||
|
||
contract DeployManaBalanceVerifier is Script { | ||
ManaBalanceVerifier public manaBalanceVerifier; | ||
|
||
function run() external { | ||
address signer = 0xYourSignerAddressHere; // Replace with the actual signer address | ||
|
||
vm.startBroadcast(); | ||
manaBalanceVerifier = new ManaBalanceVerifier(signer); | ||
vm.stopBroadcast(); | ||
|
||
console.log("ManaBalanceVerifier deployed at:", address(manaBalanceVerifier)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
import {PurchaseFYRE} from "src/Treasury/PurchaseFYRE.sol"; | ||
import {FYREToken} from "src/Tokens/FYREToken.sol"; | ||
import {IERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; | ||
|
||
contract DeployPurchaseFYRE is Script { | ||
PurchaseFYRE public purchaseFYRE; | ||
|
||
function run() external { | ||
// Replace with deployed token addresses | ||
FyreToken fyreToken = FyreToken(0xFYRETokenAddressHere); // FYRE token address | ||
IERC20 usdcToken = IERC20(0xUSDCTokenAddressHere); // USDC token address | ||
IERC20 tbtcToken = IERC20(0xTBTCAddressHere); // tBTC token address | ||
|
||
uint256 usdcToFyreRate = 100; // Initial FYRE per USDC rate | ||
uint256 ethToFyreRate = 200; // Initial FYRE per ETH rate | ||
uint256 tbtcToFyreRate = 150; // Initial FYRE per tBTC rate | ||
|
||
address treasury = 0xTreasuryAddressHere; // Replace with the actual treasury address | ||
|
||
vm.startBroadcast(); | ||
purchaseFYRE = new PurchaseFYRE( | ||
fyreToken, | ||
usdcToken, | ||
tbtcToken, | ||
usdcToFyreRate, | ||
ethToFyreRate, | ||
tbtcToFyreRate, | ||
treasury | ||
); | ||
vm.stopBroadcast(); | ||
|
||
console.log("PurchaseFYRE deployed at:", address(purchaseFYRE)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters