Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m11s
CI/CD Pipeline / Security Scanning (push) Has been cancelled
CI/CD Pipeline / Lint and Format (push) Has been cancelled
CI/CD Pipeline / Terraform Validation (push) Has been cancelled
CI/CD Pipeline / Kubernetes Validation (push) Has been cancelled
Validation / validate-genesis (push) Has been cancelled
Validation / validate-terraform (push) Has been cancelled
Validation / validate-kubernetes (push) Has been cancelled
Validation / validate-smart-contracts (push) Has been cancelled
Validation / validate-security (push) Has been cancelled
Validation / validate-documentation (push) Has been cancelled
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 1m4s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 31s
OMNL reconcile anchor / Run omnl:reconcile and upload artifacts (push) Failing after 29s
Verify Deployment / Verify Deployment (push) Failing after 57s
Relay router, reserve system, oracle publisher, token-aggregation compliance middleware, and Monad deployment scripts. Co-authored-by: Cursor <cursoragent@cursor.com>
41 lines
1.7 KiB
Solidity
41 lines
1.7 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.20;
|
|
|
|
import {Script, console} from "forge-std/Script.sol";
|
|
import {ReserveConversionPriceAdapter} from "../../contracts/reserve/ReserveConversionPriceAdapter.sol";
|
|
|
|
interface IDODOPMMIntegrationWire {
|
|
function setReserveSystem(address reserveSystem_) external;
|
|
function reserveSystem() external view returns (address);
|
|
}
|
|
|
|
/// @notice Deploy conversion adapter and point Stack A DODOPMMIntegration at it (live ReserveSystem formula fix).
|
|
contract WireChain138ReserveConversionAdapter is Script {
|
|
address internal constant DEFAULT_RESERVE = 0x607e97cD626f209facfE48c1464815DDE15B5093;
|
|
address internal constant DEFAULT_DODO = 0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895;
|
|
|
|
function run() external {
|
|
require(block.chainid == 138, "ChainID 138 only");
|
|
|
|
uint256 pk = vm.envUint("PRIVATE_KEY");
|
|
address reserve = vm.envOr("RESERVE_SYSTEM", DEFAULT_RESERVE);
|
|
address dodo = vm.envOr("DODO_PMM_INTEGRATION_ADDRESS", DEFAULT_DODO);
|
|
|
|
console.log("=== Wire ReserveConversionPriceAdapter ===");
|
|
console.log("ReserveSystem:", reserve);
|
|
console.log("DODOPMMIntegration:", dodo);
|
|
console.log("Current reserveSystem:", IDODOPMMIntegrationWire(dodo).reserveSystem());
|
|
|
|
vm.startBroadcast(pk);
|
|
|
|
ReserveConversionPriceAdapter adapter = new ReserveConversionPriceAdapter(reserve);
|
|
console.log("Adapter deployed:", address(adapter));
|
|
IDODOPMMIntegrationWire(dodo).setReserveSystem(address(adapter));
|
|
|
|
vm.stopBroadcast();
|
|
|
|
console.log("Wired reserveSystem:", IDODOPMMIntegrationWire(dodo).reserveSystem());
|
|
console.log("=== Done ===");
|
|
}
|
|
}
|