[target_chains] Add deployment information for neutron mainnet (#930)

* Deploy pyth cosmwasm 1.2.0 contract to neutron mainnet
This commit is contained in:
Mohammad Amin Khashkhashi Moghaddam 2023-06-30 14:33:25 +02:00 committed by GitHub
parent 5e44fa4c95
commit e5fd5a9d81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 131 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# How to add a new chain for deployment
1. Add the chain name to `ChainId` enum in `chains-manager/chains.ts`
2. Add the network configs to `CHAINS_NETWORK_CONFIG` in `chains-manager/chains.ts`. You can lookup for rpc endpoints in [this repo](https://github.com/cosmos/chain-registry). The `gasPrice` is the `average_gas_price` of the chain + the chain token `denom` (Available in chain-registry `chain.json` file).
3. Add the contract configs to `CHAINS_CONTRACT_CONFIG` in `configs.ts`
4. Add the ChainId either to `getChainIdsForStableDeployment` or `getChainIdsForEdgeDeployment` functions in `helper.ts`
5. If the wormhole contract is not deployed on the target chain run the following command:
```
ts-node src/wormhole-stub.ts --mnemonic "<YOUR_MNEMONIC>" --deploy <stable or edge>
```
6. Deploy the pyth contract:
```
ts-node src/instantiate-pyth.ts --contract-version <X.Y.Z> --mnemonic "<YOUR_MNEMONIC>" --deploy <stable or edge>
```
7. Test the new contract:
```
ts-node src/test.ts --mnemonic "<YOUR_MNEMONIC>" --deploy <stable or edge>
```
8. Commit the new json files to the repo
9. Update documentation repos and add the new contract address

View File

@ -24,6 +24,7 @@ export enum ChainId {
INJECTIVE = "injective", INJECTIVE = "injective",
OSMOSIS = "osmosis", OSMOSIS = "osmosis",
SEI_PACIFIC_1 = "sei_pacific_1", SEI_PACIFIC_1 = "sei_pacific_1",
NEUTRON = "neutron",
} }
export const ChainIds = Object.values(ChainId); export const ChainIds = Object.values(ChainId);
@ -129,6 +130,14 @@ export const CHAINS_NETWORK_CONFIG: Record<ChainId, ChainNetworkConfig> = {
prefix: "sei", prefix: "sei",
gasPrice: "0.025usei", gasPrice: "0.025usei",
}, },
[ChainId.NEUTRON]: {
chainId: ChainId.NEUTRON,
chainType: ChainType.COSMWASM,
executorEndpoint: "https://rpc-kralum.neutron-1.neutron.org",
querierEndpoint: "https://rpc-kralum.neutron-1.neutron.org",
prefix: "neutron",
gasPrice: "0.025untrn",
},
}; };
/** /**

View File

@ -56,6 +56,11 @@ export const CHAINS_CONTRACT_CONFIG: Record<ChainId, ChainContractConfig> = {
pythArtifactZipName: "cosmwasm", pythArtifactZipName: "cosmwasm",
wormholeChainId: CHAINS.sei_pacific_1, wormholeChainId: CHAINS.sei_pacific_1,
}, },
[ChainId.NEUTRON]: {
feeDenom: "untrn",
pythArtifactZipName: "cosmwasm",
wormholeChainId: CHAINS.neutron,
},
}; };
function getPythSources(deploymentType: DeploymentType) { function getPythSources(deploymentType: DeploymentType) {

View File

@ -15,6 +15,7 @@ export function getChainIdsForStableDeployment(): ChainId[] {
ChainId.NEUTRON_TESTNET_PION_1, ChainId.NEUTRON_TESTNET_PION_1,
ChainId.JUNO_TESTNET, ChainId.JUNO_TESTNET,
ChainId.SEI_PACIFIC_1, ChainId.SEI_PACIFIC_1,
ChainId.NEUTRON,
]; ];
} }

View File

@ -0,0 +1,22 @@
{
"deploy-pyth-code": {
"status": "fulfilled",
"result": {
"codeId": 67,
"txHash": "8324A0429E8460E0F58F214E17D07ADCD689236A95B433F721E8757D7F8038E6"
}
},
"instantiate-contract": {
"status": "fulfilled",
"result": {
"contractAddr": "neutron1m2emc93m9gpwgsrsf2vylv9xvgqh654630v7dfrhrkmr5slly53spg85wv",
"txHash": "12D99EBE9E9C3772EB321FC313C0741C792DD3FFF39D86093F4AF441E50A9821"
}
},
"set-own-admin": {
"status": "fulfilled",
"result": {
"txHash": "0A8FE81BB3253FD4233990F27087FDCF0642E5C5631FEA034369503AAE48F737"
}
}
}

View File

@ -0,0 +1,28 @@
{
"push-price-update": {
"status": "fulfilled",
"result": {
"txHash": "7EB152F2171A6AA3EEC3DB3183C8B756337D9A38105A234D75A79BDF1EDAB163"
}
},
"fetch-price-feed-update": {
"status": "fulfilled",
"result": {
"price_feed": {
"id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43",
"price": {
"price": "3080340250000",
"conf": "613359448",
"expo": -8,
"publish_time": 1688123199
},
"ema_price": {
"price": "3079387100000",
"conf": "795037770",
"expo": -8,
"publish_time": 1688123199
}
}
}
}
}

View File

@ -0,0 +1,40 @@
{
"deploy-wormhole-code": {
"status": "fulfilled",
"result": {
"codeId": 66,
"txHash": "E8B5D4BD00FC78526D77903CB2792CA797ECBBF06E88AE07EADF033640DD3FA3"
}
},
"instantiate-contract": {
"status": "fulfilled",
"result": {
"contractAddr": "neutron178ruq7gf6gk3uus5n8xztj5tsrt5xwxfelw88mc9egfw5d99ktksnk5rsh",
"txHash": "401BC50543E670CEFECE12A13A1A86EF15EB73E72B73FD616ECA0692109FF890"
}
},
"set-own-admin": {
"status": "fulfilled",
"result": {
"txHash": "63C866FA2F09B351C4DBC3C3E5CC0EE8A0E4F572D68AEE032EE51805B4A9878C"
}
},
"GUARDIAN_SET_UPGRADE_1_VAA": {
"status": "fulfilled",
"result": {
"txHash": "340C5F8F560ABD59AB5B8401D137BE150A10CC04BD42133F2A454E0716B6A181"
}
},
"GUARDIAN_SET_UPGRADE_2_VAA": {
"status": "fulfilled",
"result": {
"txHash": "31F239C4A411C97FD108FE53E72BFC55CC259AEB2AB846C2A96F3F80DEBBF7CE"
}
},
"GUARDIAN_SET_UPGRADE_3_VAA": {
"status": "fulfilled",
"result": {
"txHash": "A7F5BB426E0DB86FC189E7075AA8A5B8C5EC807ECA59E94C117F604F0E19B6FA"
}
}
}