Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat deploy prod version for TrustWallet #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"coverage": "FOUNDRY_PROFILE=dev forge coverage --report lcov && yarn lcov:clean && yarn lcov:generate-html",
"compile": "forge build",
"compile:dev": "FOUNDRY_PROFILE=dev forge build",
"deploy": "forge script --skip test --broadcast --verify --slow -vvvv --rpc-url mainnet scripts/DeployMockAgEUR.s.sol",
"deploy:fork": "source .env && forge script --skip test --slow --fork-url fork --broadcast scripts/DeployMockAgEUR.s.sol -vvvv",
"deploy": "forge script --skip test --broadcast --verify --slow -vvvv --rpc-url",
"deploy:fork": "forge script --skip test --slow --fork-url fork --broadcast -vvvv",
"gas": "yarn test --gas-report",
"fork": "bash helpers/fork.sh",
"run": "docker run -it --rm -v $(pwd):/app -w /app ghcr.io/foundry-rs/foundry sh",
"script:fork": "source .env && forge script --skip test --fork-url fork --broadcast -vvvv",
"script:fork": "forge script --skip test --fork-url fork --broadcast -vvvv",
"test:unit": "forge test -vvv --gas-report --match-path \"test/unit/**/*.sol\"",
"test:invariant": "forge test -vvv --gas-report --match-path \"test/invariant/**/*.sol\"",
"test:fuzz": "forge test -vvv --gas-report --match-path \"test/fuzz/**/*.sol\"",
Expand Down Expand Up @@ -40,4 +40,4 @@
"solhint-plugin-prettier": "^0.0.5"
},
"dependencies": {}
}
}
18 changes: 10 additions & 8 deletions scripts/DeployER4626Strategy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,28 @@ import "forge-std/Script.sol";
contract DeployERC4626Strategy is Script, CommonUtils {
function run() external {
uint256 chainId = CHAIN_SOURCE;
uint256 deployerPrivateKey = vm.deriveKey(vm.envString("MNEMONIC_MAINNET"), "m/44'/60'/0'/0/", 0);

uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);

address deployer = vm.addr(deployerPrivateKey);
console.log("Deployer address: ", deployer);

/** TODO complete */
address asset = _chainToContract(chainId, ContractType.AgUSD);
address strategyAsset = _chainToContract(chainId, ContractType.StUSD);
// address strategyAsset = _chainToContract(chainId, ContractType.StUSD);
address strategyAsset = 0x125D41A6e5dbf455cD9Df8F80BCC6fd172D52Cc6;

address integrator = _chainToContract(chainId, ContractType.GuardianMultisig);
address integrator = 0xcccc68b4aCf30A020A25D25Bc2Cc0ab96C80c9FC;
address developer = _chainToContract(chainId, ContractType.GuardianMultisig);
address keeper = 0xa9bbbDDe822789F123667044443dc7001fb43C01;

uint32 performanceFee = 1_000; // 10%
uint32 developerFee = 2_000; // 20%
uint32 performanceFee = 1_500; // 15%
uint32 developerFee = 0; // 0%
uint64 vestingPeriod = 0 weeks; // no vesting on stUSD as not playable

string memory name = "stUSD Strategy";
string memory symbol = "stUSDStrat";
string memory name = "USDA Morpho Gauntlet Strategy Trust Wallet";
string memory symbol = "USDA-MG-TW";
/** END complete */

ERC4626Strategy strategy = new ERC4626Strategy(
Expand All @@ -42,7 +44,7 @@ contract DeployERC4626Strategy is Script, CommonUtils {
integrator,
ONEINCH_ROUTER,
ONEINCH_ROUTER,
1 weeks,
vestingPeriod,
name,
symbol,
asset,
Expand Down
Loading