Skip to content

Commit

Permalink
feat: polymer deployment on old infra
Browse files Browse the repository at this point in the history
  • Loading branch information
reednaa committed Apr 22, 2024
1 parent f750ce5 commit 557dedf
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 21 deletions.
2 changes: 1 addition & 1 deletion evm/lib/GeneralisedIncentives
15 changes: 13 additions & 2 deletions evm/script/Registry.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,18 @@ contract Registry is BaseMultiChainDeployer {
deploy_lens(bytes32(0));

setRegistry("v1");
setDescriber();
__setDescriber();
}

function _setDescriber() internal {
load_config();

__setDescriber();
}

function setDescriber(string[] memory chains) iter_chains_string(chains) broadcast external {
admin = vm.envAddress("CATALYST_ADDRESS");
_setDescriber();
}

function deploy(string[] memory chains) iter_chains_string(chains) broadcast external {
Expand Down Expand Up @@ -125,7 +136,7 @@ contract Registry is BaseMultiChainDeployer {
if (!contains) reg.modifyDescriber(registry.describer, version);
}

function setDescriber() internal {
function __setDescriber() internal {
CatalystDescriber desc = CatalystDescriber(registry.describer);
// Set (or update) the templates
address current_volatile_template = desc.version_to_template("volatile");
Expand Down
18 changes: 9 additions & 9 deletions evm/script/Swap.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,29 @@ contract Swap is Script, IMessageEscrowStructs {
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PK");
vm.startBroadcast(deployerPrivateKey);

address fromVault = address(0xBd529ff730DAE029fA85B38d98d6046721215FA4);
address toVault = address(0xcdFeF148155ee1d5d908D4d7030de865E5720D1f);
address fromVault = address(0xf1D1A2ee1Eb8A04be6474aaaADDB8539D06bd0d0);
address toVault = address(0x794EfdbE09A135BE183C3cED192A1eD94A02b074);

// mantle
address WGAS = ICatalystV1Vault(fromVault)._tokenIndexing(0);

uint256 amount = 0.0001 * 1e18;
uint256 amount = 1 * 1e18;

Token(WGAS).approve(fromVault, 2**256-1);
IWETH(WGAS).deposit{value: amount}();

for (uint256 i = 0; i < n; ++i) {
ICatalystV1Vault(fromVault).sendAsset{value: 0.2 ether}(
ICatalystV1Vault(fromVault).sendAsset{value: 0.007 ether}(
ICatalystV1Structs.RouteDescription({
chainIdentifier: bytes32(uint256(44963396551096171397092266893742463113889440497773945538210212856297399779328)),
chainIdentifier: bytes32(uint256(44963396551096171397165175003751151599300063736385732409163549762670697644032)),
toVault: abi.encodePacked(uint8(20), bytes32(0), abi.encode(toVault)),
toAccount: abi.encodePacked(uint8(20), bytes32(0), abi.encode(address(0x0000007aAAC54131e031b3C0D6557723f9365A5B))),
incentive: IncentiveDescription({
maxGasDelivery: 2000000,
maxGasAck: 2000000,
maxGasDelivery: 700000,
maxGasAck: 700000,
refundGasTo: address(0x0000007aAAC54131e031b3C0D6557723f9365A5B),
priceOfDeliveryGas: 10 gwei,
priceOfAckGas: 60 gwei,
priceOfDeliveryGas: 5 gwei,
priceOfAckGas: 5 gwei,
targetDelta: 0 minutes
}),
deadline: uint64(0)
Expand Down
8 changes: 4 additions & 4 deletions evm/script/config/config_interfaces.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
},
"Polymer": {
"basesepolia": {
"interface": "0x76Dc10065949C258923B9273513E27fF52de8C02",
"escrow": "0x147d414F1964c94c4Ac7422aC148aBddb4BEdC82"
"interface": "0xaE1B33e8570a3485F846f2Fbe1E7D5d9e64978c3",
"escrow": "0xE106643739deB1879CcD8E3ffe2736D8B489bC2F"
},
"optimismsepolia": {
"interface": "0x77D13F9aea291F7294d596431EA61d1765C4aCAB",
"escrow": "0x62e27C0bD89D7AC599Df8765cDEe0183A34A9929"
"interface": "0xA47591Ba12DD1c0e59a997A84356228dd9d2a5ED",
"escrow": "0x87AE7bC6B565E545bDD51788C43BF9E5cbB72EBD"
}
}
}
8 changes: 4 additions & 4 deletions evm/script/config/config_vaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"PolymerOPBASEsepolia": {
"cci_version": "Polymer",
"optimismsepolia": {
"cci": "0x77d13f9aea291f7294d596431ea61d1765c4acab",
"address": "0xcdfef148155ee1d5d908d4d7030de865e5720d1f",
"cci": "0xa47591ba12dd1c0e59a997a84356228dd9d2a5ed",
"address": "0x8d4a70ffa99a8a74b1a9f4409352a5d2e9e9a132",
"weights": [
1
],
Expand All @@ -49,8 +49,8 @@
}
},
"basesepolia": {
"cci": "0x76dc10065949c258923b9273513e27ff52de8c02",
"address": "0xbd529ff730dae029fa85b38d98d6046721215fa4",
"cci": "0xae1b33e8570a3485f846f2fbe1e7d5d9e64978c3",
"address": "0xf1d1a2ee1eb8a04be6474aaaaddb8539d06bd0d0",
"weights": [
1
],
Expand Down

0 comments on commit 557dedf

Please sign in to comment.