Skip to content

Commit

Permalink
Deploy core to injective mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes committed Jan 24, 2024
1 parent 97bf0f5 commit ed6b3cc
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 54 deletions.
2 changes: 1 addition & 1 deletion scripts/action/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const deploy_igp = async (
owner: client.signer,
gas_token: config.deploy.igp.token || config.network.gas.denom,
beneficiary: client.signer,
default_gas_usage: "25000" // must be string
default_gas_usage: "250000" // must be string
});

// init igp oracle
Expand Down
107 changes: 57 additions & 50 deletions scripts/context/injective-1.json
Original file line number Diff line number Diff line change
@@ -1,95 +1,102 @@
{
"contracts": {
"hpl_hook_aggregate": {
"codeId": 6407,
"digest": "ff2c972cc66ec5c5aeaac0506a39b48e37387126c07ca7e8a45f9b18d34aa0f2"
"codeId": 381,
"digest": "1d3c711db8ef6a536b94e72259361551343cee1645565f2ae88c9199fb1beef9"
},
"hpl_hook_fee": {
"codeId": 382,
"digest": "33b4e8ee59c4c5f6c95dde746d21666c7f81a49ce7391a5bd074a3104b703496"
},
"hpl_hook_merkle": {
"codeId": 6408,
"digest": "25e0c969f233c2db5dd81b17005a0367935bfea9f6b8275873026562d9583920"
"codeId": 383,
"digest": "c20c709a72769679ce1750927fe38107dfdbc5da2fa1c6da51bdf559aa5f652e"
},
"hpl_hook_pausable": {
"codeId": 6409,
"digest": "10bce0701f9cb67cb1b80aaeb0af7d8bc91175b6a9299783ae420f1adc413ed3"
"codeId": 384,
"digest": "454a4b99f7b3674c7fdc8e2c143bb2deb7fb66c9f94de98b893b56cd4fe2a0e7"
},
"hpl_hook_routing": {
"codeId": 6410,
"digest": "3a7f4ef76b596c77faef35890e924e8f8550fdb6f2569fa62ec67dbcbb7f1006"
"codeId": 385,
"digest": "d5cc55f7287d5ee0e59cf236e6211c8a68bd54bd773f4ee03ffb67df288b57ba"
},
"hpl_hook_routing_custom": {
"codeId": 6411,
"digest": "6fd4796181e046ae71dc7f2cdefa8459e26431da67b0e9028c0952b980f6dfc2"
"codeId": 386,
"digest": "55e9c6e12965617fd5dd19cac6c1d460009daeec66cc32a64ea8fe3432d7c854"
},
"hpl_hook_routing_fallback": {
"codeId": 6412,
"digest": "14fa5137267486053d8b065a5420d215c0c7b33dec51f573d26d7d231a432883"
"codeId": 387,
"digest": "89108d56675015c03cd266bd55bde577b57cfc946d1cea02f4d79dc31d037da5"
},
"hpl_igp": {
"address": "inj1p0q2uylnnv226xpg9hn8jylf0fy9vwyea85qhr",
"codeId": 6413,
"digest": "b42c7d9b2c77d01ddbc77e027ce1d6950b635ed7e564df928095056c2ae2759a"
"address": "inj1y7h9y2vwtdfmxjm6ur9x8czcghp3u86e2wtcxr",
"codeId": 388,
"digest": "9fe334789058e7e236dc4bbea1c3becaa85b884ad762012b1a4753d7159e4c80"
},
"hpl_igp_oracle": {
"address": "inj1k4ju5nppwcucpet7ggjhefdweme35husalxm9a",
"codeId": 6414,
"digest": "53872a2989164ee487187910fe0813adcfdb04f3876f5ceead14aafed2c181c1"
"address": "inj1qkmy09d749jdl7p88slrxgzdfnt7u4wnfk7gxk",
"codeId": 389,
"digest": "e3b595296ce0638668bfe0e08dcfcf9717f0955c063d45f15c393dfedd0a309c"
},
"hpl_ism_aggregate": {
"codeId": 6415,
"digest": "6ff86c257611dfc0c4d9e82b67ac969fdee4ead8b6c5563a1f16c9b9b059ab7a"
"codeId": 390,
"digest": "b425d0b79c1a51bf4c3e49adb00b389ca8fcccac12b355289c5f6daf27959a18"
},
"hpl_ism_multisig": {
"codeId": 6416,
"digest": "8969e6927592b91b0cd8755bc79cf0152a2a5f51375dd86980ea36670623e2ac"
"codeId": 391,
"digest": "ce34a65d380eb4ddb0e47a5e859c740f2f34675a026d8d123eaf548230e704a4"
},
"hpl_ism_pausable": {
"codeId": 6417,
"digest": "0470b0d1b7d16baabe014f5fea500b80a748421c61ba061183b3953326321c74"
"codeId": 392,
"digest": "8e5b96cd62378563267be930edb8c3dd9494ec13c6de7909172cdf0fe4edd4b2"
},
"hpl_ism_routing": {
"codeId": 6418,
"digest": "f86fc1bbabf2688770a2900ef25a02fa2e2c198b0e42b861162a3900f9a6c7aa"
"codeId": 393,
"digest": "8453cbfbaa0c68d0980689c734ff1f13c221e5a6e5c1938dea7645d1926a5e6e"
},
"hpl_mailbox": {
"address": "inj1rk600zvjzw0ype8q9526m63d7upk2usg40fu72",
"codeId": 6419,
"digest": "2ed06bf3633ff0af4821527b1eca5a2633f2865f1bd577c3c6a4e694c7f688b1"
"address": "inj1palm2wtp6urg0c6j4f2ukv5u5ahdcrqek0sapt",
"codeId": 394,
"digest": "f21ec28636172a8d52602145b00f4cb56ba9d001dd6d4cbe6d5e38ace04ea3f3"
},
"hpl_test_mock_hook": {
"codeId": 6420,
"digest": "3a03d211d98ac3d32a39ff188be19e4ec9a5f992269f696197b7f09952c909df"
"codeId": 395,
"digest": "b35975f8d3741d6fff93e262c2bd11ac582464c2adfc7ba95999952349a36395"
},
"hpl_test_mock_ism": {
"codeId": 396,
"digest": "b99645eab7b564218d184aaf8f840d5944c7bc6c4a55cef6aa36bbff0c44e078"
},
"hpl_test_mock_msg_receiver": {
"address": "inj1q33naqf9zqx6zf0de7m0znjtaxsueyn7928f3r",
"codeId": 6421,
"digest": "9dba7ab71a392b369561370eaffbcd450abaeca64111d2ff5daa389912846313"
"address": "inj1sy7sz0ek0353qym2q92l306m3h4tty24t5l9dt",
"codeId": 397,
"digest": "b073c3253a17ab2709e9eabc7c7010832632832ec24bdc6f4ff5ca87fcd26cba"
},
"hpl_validator_announce": {
"address": "inj1vghn9za7kdxpjx8hjckv86e7h77kl0r2pte7xw",
"codeId": 6422,
"digest": "4d8d5b22b1ebbd8cc221ee9bcf3e79587bfbfc91845e5726dd9de052d410c8dc"
"address": "inj1r7eztvhul0n4uc22r438m6tl7dezgthdw2cjjx",
"codeId": 398,
"digest": "768b0192d7b307dd6dbd26b8285f33b92530150186171d25b1831fe2fa16ce8a"
},
"hpl_warp_cw20": {
"codeId": 6423,
"digest": "4da1db8d03aab8df02fb0588326e392e457e2234c2ea7f32cb062c0d1d276322"
"codeId": 399,
"digest": "656725112ce2574d29ddcc7221a07c82de0bf3da5dc9ca22f70c256bdaa266e2"
},
"hpl_warp_native": {
"codeId": 6424,
"digest": "3dbf222865d96c9496bdddc815ff3c0b776bc143d7d56045330ec4ebfd5a69fe"
"codeId": 400,
"digest": "1dc6d8e868dc606c04d2fcb075c8aa68c45416565ebefa60a5252362adcc05c4"
},
"hpl_default_ism": {
"codeId": 6416,
"digest": "8969e6927592b91b0cd8755bc79cf0152a2a5f51375dd86980ea36670623e2ac",
"address": "inj1xk20l3fcmycqyezu808q2lrt3xvfq8l3363w5a"
"codeId": 390,
"digest": "b425d0b79c1a51bf4c3e49adb00b389ca8fcccac12b355289c5f6daf27959a18",
"address": "inj1jkvdheut9sdzz492wagp2n3cxh9537w3v4786a"
},
"hpl_default_hook": {
"address": "inj1p0q2uylnnv226xpg9hn8jylf0fy9vwyea85qhr"
"address": "inj1y7h9y2vwtdfmxjm6ur9x8czcghp3u86e2wtcxr"
},
"hpl_required_hook": {
"codeId": 6408,
"digest": "25e0c969f233c2db5dd81b17005a0367935bfea9f6b8275873026562d9583920",
"address": "inj13wcydgk47m74k4qucq59l74gs249u5zmlqsjxn"
"codeId": 383,
"digest": "c20c709a72769679ce1750927fe38107dfdbc5da2fa1c6da51bdf559aa5f652e",
"address": "inj1269dxcuyglc8mmecf95lf63elt3cq2tz57ka6h"
}
},
"address": "inj1cj08fl9hycsvdhctfqv6rq22al3hjttyxdx768"
}
}
1 change: 1 addition & 0 deletions scripts/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type IsmType =
type: "aggregate";
owner: string;
isms: IsmType[];
threshold: number;
}
| {
type: "routing";
Expand Down
10 changes: 7 additions & 3 deletions scripts/src/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,14 @@ export const deploy_ism = async (
return multisig_ism_res.address!;

case "aggregate":
let sub_modules = [];
for (const v of ism.isms) {
sub_modules.push(await deploy_ism(client, v, contracts));
}
const aggregate_ism_res = await isms.aggregate.instantiate({
owner: ism.owner === "<signer>" ? client.signer : ism.owner,
isms: await Promise.all(
ism.isms.map((v) => deploy_ism(client, v, contracts))
),
isms: sub_modules,
threshold: ism.threshold,
});

return aggregate_ism_res.address!;
Expand Down Expand Up @@ -131,6 +134,7 @@ export const deploy_ism = async (
return routing_ism_res.address!;

case "pausable":

const pausable_ism_res = await isms.pausable.instantiate({
owner: ism.owner === "<signer>" ? client.signer : ism.owner,
paused: ism.paused ?? false
Expand Down

0 comments on commit ed6b3cc

Please sign in to comment.