Skip to content

Commit

Permalink
Add an example address query script
Browse files Browse the repository at this point in the history
  • Loading branch information
zmanian committed Aug 27, 2024
1 parent 0250544 commit 6dcb758
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions script/Arbitrum/peggyjv_production/QueryTestCellarAddress.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.21;

import { Deployer } from "src/Deployer.sol";
import { ArbitrumAddresses } from "test/resources/Arbitrum/ArbitrumAddressesPeggyJV.sol";
import "forge-std/Script.sol";
import { CellarWithOracleWithBalancerFlashLoansWithMultiAssetDeposit } from "src/base/permutations/advanced/CellarWithOracleWithBalancerFlashLoansWithMultiAssetDeposit.sol";
import { ContractDeploymentNames } from "resources/PeggyJVContractDeploymentNames.sol";

/**
* @dev Run
* source .env && forge script script/Arbitrum/peggyjv_production/QueryTestCellarAddress.s.sol:QueryRYUSDAddress --evm-version london --with-gas-price 100000000 --slow --broadcast --etherscan-api-key $ARBISCAN_KEY --verify --private-key $PRIVATE_KEY
* @dev Optionally can change `--with-gas-price` to something more reasonable
*/

contract QueryRYUSDAddress is Script, ArbitrumAddresses, ContractDeploymentNames {
uint256 public privateKey;

Deployer public deployer = Deployer(deployerAddress);
address public ryusd_address = address(0);

CellarWithOracleWithBalancerFlashLoansWithMultiAssetDeposit public RYUSD;

function setUp() external {
privateKey = vm.envUint("PRIVATE_KEY");
vm.createSelectFork("arbitrum");
ryusd_address = deployer.getAddress(realYieldUsdName);
}

function run() external {
vm.startBroadcast();
console.log("RYUSD address: %s", ryusd_address);
vm.stopBroadcast();
}
}

0 comments on commit 6dcb758

Please sign in to comment.