Skip to content

Commit

Permalink
Update legend script deploy script; deploy legend scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincheng96 committed Mar 15, 2024
1 parent 9a47d51 commit 480e772
Show file tree
Hide file tree
Showing 11 changed files with 2,373 additions and 25 deletions.
216 changes: 216 additions & 0 deletions broadcast/DeployLegendScripts.s.sol/11155111/run-1710538175.json

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions broadcast/DeployLegendScripts.s.sol/11155111/run-1710538194.json

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions broadcast/DeployLegendScripts.s.sol/11155111/run-1710538322.json

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions broadcast/DeployLegendScripts.s.sol/11155111/run-latest.json

Large diffs are not rendered by default.

216 changes: 216 additions & 0 deletions broadcast/DeployLegendScripts.s.sol/84532/run-1710538342.json

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions broadcast/DeployLegendScripts.s.sol/84532/run-1710538348.json

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions broadcast/DeployLegendScripts.s.sol/84532/run-1710538465.json

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions broadcast/DeployLegendScripts.s.sol/84532/run-latest.json

Large diffs are not rendered by default.

Binary file added quark-out.release-v2024-03-15+9a47d51.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ import {
// Optional ENV vars:
// ETHERSCAN_KEY

contract DeployTerminalScripts is Script {
contract DeployLegendScripts is Script {
CodeJar codeJar;
CometSupplyActions cometSupplyActions;
CometWithdrawActions cometWithdrawActions;
UniswapSwapActions uniswapSwapActions;
Expand All @@ -43,50 +44,39 @@ contract DeployTerminalScripts is Script {

function run() public {
address deployer = vm.addr(vm.envUint("DEPLOYER_PK"));
QuarkWalletProxyFactory factory = QuarkWalletProxyFactory(vm.envAddress("QUARK_WALLET_FACTORY_ADDRESS"));
CodeJar codeJar = QuarkWallet(payable(factory.walletImplementation())).codeJar();
codeJar = CodeJar(vm.envAddress("CODE_JAR"));
console.log("Code Jar Address: ", address(codeJar));

vm.startBroadcast(deployer);

console.log("=============================================================");
console.log("Deploying Terminal Scripts");

cometSupplyActions = CometSupplyActions(
codeJar.saveCode(vm.getCode(string.concat("out/", "LegendScript.sol/CometSupplyActions.json")))
);
cometSupplyActions =
CometSupplyActions(codeJar.saveCode(abi.encodePacked(type(CometSupplyActions).creationCode)));
console.log("CometSupplyActions Deployed:", address(cometSupplyActions));

cometWithdrawActions = CometWithdrawActions(
codeJar.saveCode(vm.getCode(string.concat("out/", "LegendScript.sol/CometWithdrawActions.json")))
);
cometWithdrawActions =
CometWithdrawActions(codeJar.saveCode(abi.encodePacked(type(CometWithdrawActions).creationCode)));
console.log("CometWithdrawActions Deployed:", address(cometWithdrawActions));

uniswapSwapActions = UniswapSwapActions(
codeJar.saveCode(vm.getCode(string.concat("out/", "LegendScript.sol/UniswapSwapActions.json")))
);
uniswapSwapActions =
UniswapSwapActions(codeJar.saveCode(abi.encodePacked(type(UniswapSwapActions).creationCode)));
console.log("UniswapSwapActions Deployed:", address(uniswapSwapActions));

transferActions = TransferActions(
codeJar.saveCode(vm.getCode(string.concat("out/", "LegendScript.sol/TransferActions.json")))
);
transferActions = TransferActions(codeJar.saveCode(abi.encodePacked(type(TransferActions).creationCode)));
console.log("TransferActions Deployed:", address(transferActions));

cometClaimRewards = CometClaimRewards(
codeJar.saveCode(vm.getCode(string.concat("out/", "LegendScript.sol/CometClaimRewards.json")))
);
cometClaimRewards = CometClaimRewards(codeJar.saveCode(abi.encodePacked(type(CometClaimRewards).creationCode)));
console.log("CometClaimRewards Deployed:", address(cometClaimRewards));

cometSupplyMultipleAssetsAndBorrow = CometSupplyMultipleAssetsAndBorrow(
codeJar.saveCode(
vm.getCode(string.concat("out/", "LegendScript.sol/CometSupplyMultipleAssetsAndBorrow.json"))
)
codeJar.saveCode(abi.encodePacked(type(CometSupplyMultipleAssetsAndBorrow).creationCode))
);
console.log("CometSupplyMultipleAssetsAndBorrow Deployed:", address(cometSupplyMultipleAssetsAndBorrow));

cometRepayAndWithdrawMultipleAssets = CometRepayAndWithdrawMultipleAssets(
codeJar.saveCode(
vm.getCode(string.concat("out/", "LegendScript.sol/CometRepayAndWithdrawMultipleAssets.json"))
)
codeJar.saveCode(abi.encodePacked(type(CometRepayAndWithdrawMultipleAssets).creationCode))
);
console.log("CometRepayAndWithdrawMultipleAssets Deployed:", address(cometRepayAndWithdrawMultipleAssets));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ forge script --via-ir \
$wallet_args \
$etherscan_args \
$@ \
script/DeployTerminalScripts.s.sol:DeployTerminalScripts
script/DeployLegendScripts.s.sol:DeployLegendScripts

repo_root=$(git rev-parse --show-toplevel)
${repo_root}/script/prepare-release.sh

0 comments on commit 480e772

Please sign in to comment.