Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m18s
CI/CD Pipeline / Security Scanning (push) Successful in 2m27s
CI/CD Pipeline / Lint and Format (push) Failing after 46s
CI/CD Pipeline / Terraform Validation (push) Failing after 28s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 29s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 1m0s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 29s
Validation / validate-genesis (push) Successful in 30s
Validation / validate-terraform (push) Failing after 32s
Validation / validate-kubernetes (push) Failing after 10s
Validation / validate-smart-contracts (push) Failing after 13s
Validation / validate-security (push) Failing after 1m23s
Validation / validate-documentation (push) Failing after 22s
Verify Deployment / Verify Deployment (push) Failing after 11m53s
- CWTokenMarketRegistry + USD feeds for mainnet cW* market anchors - HYBX cross-chain treasury line registry expansion - PMM seed default → live DODOPMMIntegration (0x86ADA6Ef…) - mint-xau-chain138: troy-ounce mint helper with multisig path - relay: prefer CCIP_MAINNET_LINK138 relayer key on default profile Co-authored-by: Cursor <cursoragent@cursor.com>
60 lines
2.0 KiB
Solidity
60 lines
2.0 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.20;
|
|
|
|
import {Script, console2} from "forge-std/Script.sol";
|
|
import {CWTokenMarketRegistry} from "../../contracts/mainnet-market/CWTokenMarketRegistry.sol";
|
|
import {CWTokenUsdFeed} from "../../contracts/mainnet-market/CWTokenUsdFeed.sol";
|
|
|
|
contract DeployCWTokenMarketRegistry is Script {
|
|
struct TokenSeed {
|
|
address token;
|
|
uint8 decimals;
|
|
uint64 faceUsdE8;
|
|
address uniV3Pool;
|
|
bool cwIsToken0;
|
|
string feedDescription;
|
|
}
|
|
|
|
function run() external {
|
|
vm.startBroadcast();
|
|
address admin = msg.sender;
|
|
|
|
CWTokenMarketRegistry registry = new CWTokenMarketRegistry(admin);
|
|
|
|
TokenSeed[] memory seeds = _seeds();
|
|
for (uint256 i = 0; i < seeds.length; i++) {
|
|
TokenSeed memory s = seeds[i];
|
|
CWTokenUsdFeed feed = new CWTokenUsdFeed(registry, s.token, s.feedDescription);
|
|
registry.registerToken(
|
|
s.token, s.decimals, s.faceUsdE8, s.uniV3Pool, s.cwIsToken0, address(feed)
|
|
);
|
|
console2.log("Registered", s.token);
|
|
console2.log(" feed", address(feed));
|
|
}
|
|
|
|
vm.stopBroadcast();
|
|
console2.log("CWTokenMarketRegistry", address(registry));
|
|
}
|
|
|
|
function _seeds() internal pure returns (TokenSeed[] memory) {
|
|
TokenSeed[] memory seeds = new TokenSeed[](2);
|
|
seeds[0] = TokenSeed({
|
|
token: 0x2de5F116bFcE3d0f922d9C8351e0c5Fc24b9284a,
|
|
decimals: 6,
|
|
faceUsdE8: 100_000_000,
|
|
uniV3Pool: 0x1Cf2e685682C7F7beF508F0Af15Dfb5CDda01ee3,
|
|
cwIsToken0: true,
|
|
feedDescription: "cWUSDC / USD (GRU market anchor)"
|
|
});
|
|
seeds[1] = TokenSeed({
|
|
token: 0xaF5017d0163ecb99D9B5D94e3b4D7b09Af44D8AE,
|
|
decimals: 6,
|
|
faceUsdE8: 100_000_000,
|
|
uniV3Pool: 0x6eF5A392BcbE42F3D0a855595bEa60CFf9451784,
|
|
cwIsToken0: true,
|
|
feedDescription: "cWUSDT / USD (GRU market anchor)"
|
|
});
|
|
return seeds;
|
|
}
|
|
}
|