Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cosmos support to Utils and SDK #2859

Merged
merged 32 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
65bc79f
Add CW token adapter stubs
yorhodes Oct 26, 2023
c08449b
Implement getbalance
yorhodes Oct 26, 2023
c3cae52
Stash progress on cw20 token
yorhodes Oct 26, 2023
ffe081f
Implement just token adapters first
yorhodes Oct 26, 2023
1820377
Small fixes for build
yorhodes Oct 26, 2023
2a5384b
Add cosmos libraries to SDK and Utils
jmrossy Oct 26, 2023
c66fa69
Implement IHypToken adapters
yorhodes Oct 26, 2023
985a51b
Merge branch 'cosmos' into cw-token-adapter
jmrossy Oct 26, 2023
56aa34d
Rename new adapters for consistency
jmrossy Oct 26, 2023
71ef1d2
Expand ChainMetadata types for cosmos
jmrossy Oct 27, 2023
98869e3
Implement cw router adapter
yorhodes Oct 26, 2023
3643f63
Complete token adapters with type checking
yorhodes Oct 27, 2023
453fbe4
Fix lint
yorhodes Oct 27, 2023
5cf0898
Update gh linguist generated attributes
yorhodes Oct 27, 2023
f7c4954
Test native transferRemote with signer
yorhodes Oct 27, 2023
023c651
Fix test ibc denom plumbing
yorhodes Oct 27, 2023
6406835
Minor fixes for cosmos support
jmrossy Oct 28, 2023
edec28b
Normalize cosmwasm adapter names and args
jmrossy Oct 28, 2023
2fe92ad
Check for IBC denom collateral and cosmos addresess (#2868)
nambrot Oct 29, 2023
7fb2dc7
Set hardcode to untrn
nambrot Oct 29, 2023
0636bc1
Prep 3.1.0-beta0 release
nambrot Oct 29, 2023
92ab1e7
Add monitoring script for neutron (#2872)
aroralanuk Nov 1, 2023
e917fb7
Implement cw core adapter (#2873)
yorhodes Nov 2, 2023
72d7af3
Add naive cosmos native token adapter
yorhodes Nov 2, 2023
c3c5a82
Merge branch 'v3' into cw-token-adapter
nambrot Nov 3, 2023
98ea2a0
Fix merge
nambrot Nov 3, 2023
b3b35f1
Fix cw build
yorhodes Nov 3, 2023
4fe8ed2
Move cosmos token adapter out
yorhodes Nov 3, 2023
dd92caa
Fix lint
yorhodes Nov 3, 2023
23173b3
Resolve core adapter TODO
yorhodes Nov 3, 2023
d017cac
Move to readonly test to be safe
yorhodes Nov 3, 2023
9b4c832
Add dsrv/sg-1
nambrot Nov 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
typescript/sdk/src/cw-types/*.types.ts linguist-generated=true
rust/chains/hyperlane-ethereum/abis/*.abi.json linguist-generated=true
4 changes: 2 additions & 2 deletions solidity/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@hyperlane-xyz/core",
"description": "Core solidity contracts for Hyperlane",
"version": "1.5.4-beta0",
"version": "3.1.0-beta0",
"dependencies": {
"@eth-optimism/contracts": "^0.6.0",
"@hyperlane-xyz/utils": "1.5.4-beta0",
"@hyperlane-xyz/utils": "3.1.0-beta0",
"@openzeppelin/contracts": "^4.8.0",
"@openzeppelin/contracts-upgradeable": "^4.8.0"
},
Expand Down
6 changes: 3 additions & 3 deletions typescript/helloworld/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@hyperlane-xyz/helloworld",
"description": "A basic skeleton of an Hyperlane app",
"version": "1.5.4-beta0",
"version": "3.1.0-beta0",
"dependencies": {
"@hyperlane-xyz/core": "1.5.4-beta0",
"@hyperlane-xyz/sdk": "1.5.4-beta0",
"@hyperlane-xyz/core": "3.1.0-beta0",
"@hyperlane-xyz/sdk": "3.1.0-beta0",
"@openzeppelin/contracts-upgradeable": "^4.8.0",
"ethers": "^5.7.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,22 @@ import {
Chains,
RpcConsensusType,
chainMetadata,
getDomainId,
} from '@hyperlane-xyz/sdk';

import { LiquidityLayerRelayerConfig } from '../../../src/config/middleware';

import { environment } from './chains';

const circleDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.ethereum].chainId, circleDomain: 0 },
{ hyperlaneDomain: chainMetadata[Chains.avalanche].chainId, circleDomain: 1 },
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.ethereum]),
circleDomain: 0,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.avalanche]),
circleDomain: 1,
},
];

export const bridgeAdapterConfigs: ChainMap<BridgeAdapterConfig> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ import {
Chains,
CircleBridgeAdapterConfig,
chainMetadata,
getDomainId,
} from '@hyperlane-xyz/sdk';

const circleDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.goerli].chainId, circleDomain: 0 },
{ hyperlaneDomain: chainMetadata[Chains.fuji].chainId, circleDomain: 1 },
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.goerli]),
circleDomain: 0,
},
{ hyperlaneDomain: getDomainId(chainMetadata[Chains.fuji]), circleDomain: 1 },
];

// Circle deployed contracts
Expand Down
27 changes: 20 additions & 7 deletions typescript/infra/config/environments/testnet4/liquidityLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,36 @@ import {
ChainMap,
Chains,
chainMetadata,
getDomainId,
} from '@hyperlane-xyz/sdk';

const circleDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.goerli].chainId, circleDomain: 0 },
{ hyperlaneDomain: chainMetadata[Chains.fuji].chainId, circleDomain: 1 },
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.goerli]),
circleDomain: 0,
},
{ hyperlaneDomain: getDomainId(chainMetadata[Chains.fuji]), circleDomain: 1 },
];

const wormholeDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.goerli].chainId, wormholeDomain: 2 },
{ hyperlaneDomain: chainMetadata[Chains.fuji].chainId, wormholeDomain: 6 },
{ hyperlaneDomain: chainMetadata[Chains.mumbai].chainId, wormholeDomain: 5 },
{
hyperlaneDomain: chainMetadata[Chains.bsctestnet].chainId,
hyperlaneDomain: getDomainId(chainMetadata[Chains.goerli]),
wormholeDomain: 2,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.fuji]),
wormholeDomain: 6,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.mumbai]),
wormholeDomain: 5,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.bsctestnet]),
wormholeDomain: 4,
},
{
hyperlaneDomain: chainMetadata[Chains.alfajores].chainId,
hyperlaneDomain: getDomainId(chainMetadata[Chains.alfajores]),
wormholeDomain: 14,
},
];
Expand Down
27 changes: 20 additions & 7 deletions typescript/infra/config/environments/testnet4/token-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,36 @@ import {
ChainMap,
Chains,
chainMetadata,
getDomainId,
} from '@hyperlane-xyz/sdk';

const circleDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.goerli].chainId, circleDomain: 0 },
{ hyperlaneDomain: chainMetadata[Chains.fuji].chainId, circleDomain: 1 },
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.goerli]),
circleDomain: 0,
},
{ hyperlaneDomain: getDomainId(chainMetadata[Chains.fuji]), circleDomain: 1 },
];

const wormholeDomainMapping = [
{ hyperlaneDomain: chainMetadata[Chains.goerli].chainId, wormholeDomain: 2 },
{ hyperlaneDomain: chainMetadata[Chains.fuji].chainId, wormholeDomain: 6 },
{ hyperlaneDomain: chainMetadata[Chains.mumbai].chainId, wormholeDomain: 5 },
{
hyperlaneDomain: chainMetadata[Chains.bsctestnet].chainId,
hyperlaneDomain: getDomainId(chainMetadata[Chains.goerli]),
wormholeDomain: 2,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.fuji]),
wormholeDomain: 6,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.mumbai]),
wormholeDomain: 5,
},
{
hyperlaneDomain: getDomainId(chainMetadata[Chains.bsctestnet]),
wormholeDomain: 4,
},
{
hyperlaneDomain: chainMetadata[Chains.alfajores].chainId,
hyperlaneDomain: getDomainId(chainMetadata[Chains.alfajores]),
wormholeDomain: 14,
},
];
Expand Down
4 changes: 3 additions & 1 deletion typescript/infra/helm/warp-routes/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ The warp-routes container
command:
- ./node_modules/.bin/ts-node
- ./typescript/infra/scripts/warp-routes/monitor-warp-routes-balances.ts
- -c
- -l
- "10000"
- -c
- {{ .Values.config }}
{{- end }}
6 changes: 3 additions & 3 deletions typescript/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"@ethersproject/experimental": "^5.7.0",
"@ethersproject/hardware-wallets": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@hyperlane-xyz/helloworld": "1.5.4-beta0",
"@hyperlane-xyz/sdk": "1.5.4-beta0",
"@hyperlane-xyz/utils": "1.5.4-beta0",
"@hyperlane-xyz/helloworld": "3.1.0-beta0",
"@hyperlane-xyz/sdk": "3.1.0-beta0",
"@hyperlane-xyz/utils": "3.1.0-beta0",
"@nomiclabs/hardhat-etherscan": "^3.0.3",
"@safe-global/api-kit": "^1.3.0",
"@safe-global/protocol-kit": "^1.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { HelmCommand } from '../../src/utils/helm';
import { runWarpRouteHelmCommand } from './helm';

async function main() {
await runWarpRouteHelmCommand(HelmCommand.InstallOrUpgrade, 'mainnet3');
await runWarpRouteHelmCommand(
HelmCommand.InstallOrUpgrade,
'mainnet3',
'neutron',
);
}

main()
Expand Down
12 changes: 7 additions & 5 deletions typescript/infra/scripts/warp-routes/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,32 @@ import { assertCorrectKubeContext, getEnvironmentConfig } from '../utils';
export async function runWarpRouteHelmCommand(
helmCommand: HelmCommand,
runEnv: DeployEnvironment,
config: string,
) {
const envConfig = getEnvironmentConfig(runEnv);
await assertCorrectKubeContext(envConfig);
const values = getWarpRoutesHelmValues();
const values = getWarpRoutesHelmValues(config);

return execCmd(
`helm ${helmCommand} ${getHelmReleaseName(
'zebec',
config,
)} ./helm/warp-routes --namespace ${runEnv} ${values.join(
' ',
)} --set fullnameOverride="${getHelmReleaseName('zebec')}"`,
)} --set fullnameOverride="${getHelmReleaseName(config)}"`,
);
}

function getHelmReleaseName(route: string): string {
return `hyperlane-warp-route-${route}`;
}

function getWarpRoutesHelmValues() {
function getWarpRoutesHelmValues(config: string) {
const values = {
image: {
repository: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
tag: '962d34b-20230905-194531',
tag: 'ae8ce44-20231101-012032',
},
config: config, // nautilus or neutron
};
return helmifyValues(values);
}
Loading
Loading