Skip to content

Commit

Permalink
Merge pull request #3410 from osmosis-labs/stage
Browse files Browse the repository at this point in the history
Publish Stage
  • Loading branch information
MaxMillington authored Jul 2, 2024
2 parents 44ce910 + 93d75b9 commit b7ff0ee
Show file tree
Hide file tree
Showing 140 changed files with 8,028 additions and 2,377 deletions.
45 changes: 36 additions & 9 deletions .github/workflows/monitoring-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ jobs:
echo "matrix={\"include\":[{ \"base-url\":\"https://app.osmosis.zone\", \"server-url\":\"https://sqs.osmosis.zone\", \"env\": \"production\", \"timeseries-url\":\"https://stage-proxy-data-api.osmosis-labs.workers.dev\"}, { \"base-url\":\"https://stage.osmosis.zone\", \"server-url\":\"https://sqs.stage.osmosis.zone\", \"env\": \"staging\", \"timeseries-url\":\"https://stage-proxy-data-api.osmosis-labs.workers.dev\"}]}" >> "$GITHUB_OUTPUT"
frontend-e2e-tests:
name: ${{ matrix.env }}
needs: setup-matrix
name: production
runs-on: macos-latest
strategy:
fail-fast: false
matrix: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
environment:
name: prod_swap_test
steps:
Expand All @@ -43,9 +39,9 @@ jobs:
- name: Install Playwright
run: |
yarn --cwd packages/web install --frozen-lockfile && npx playwright install --with-deps chromium
- name: Run Swap tests on ${{ matrix.env }}
- name: Run Swap tests on production
env:
BASE_URL: ${{ matrix.base-url }}
BASE_URL: "https://app.osmosis.zone"
PRIVATE_KEY_S: ${{ secrets.PRIVATE_KEY_S }}
run: |
cd packages/web
Expand All @@ -55,7 +51,7 @@ jobs:
id: e2e-test-results
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.env }}-e2e-test-results
name: production-e2e-test-results
path: packages/web/playwright-report
- name: Send Slack alert if test fails
id: slack
Expand All @@ -77,7 +73,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Environment:* ${{ matrix.env }}\n*App URL:* ${{ matrix.base-url }}"
"text": "*Environment:* production\n*App URL:* https://app.osmosis.zone"
}
},
{
Expand Down Expand Up @@ -208,3 +204,34 @@ jobs:
with:
name: ${{ matrix.env }}-quote-test-results
path: packages/web/playwright-report

delete-deployments:
runs-on: ubuntu-latest
if: always()
needs: [frontend-e2e-tests, fe-quote-tests]
steps:
- name: Delete Previous deployments
uses: actions/github-script@v7
with:
debug: true
script: |
const deployments = await github.rest.repos.listDeployments({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha
});
await Promise.all(
deployments.data.map(async (deployment) => {
await github.rest.repos.createDeploymentStatus({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id,
state: 'inactive'
});
return github.rest.repos.deleteDeployment({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id
});
})
);
19 changes: 14 additions & 5 deletions packages/bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ class MyBridgeProvider implements BridgeProvider {
providerName = "MyBridge";
logoUrl = "url_to_logo";

async getQuote(params: GetBridgeQuoteParams): Promise<BridgeQuote> {
getQuote(params: GetBridgeQuoteParams): Promise<BridgeQuote> {
// Implement logic to get a quote for a cross-chain transfer
}

async getTransferStatus(
getTransferStatus(
params: GetTransferStatusParams
): Promise<BridgeTransferStatus | undefined> {
// Implement logic to get the status of a transfer
Expand All @@ -81,6 +81,12 @@ class MyBridgeProvider implements BridgeProvider {
// Implement logic to get transaction data
}

getSupportedAssets(
params: GetBridgeSupportedAssetsParams
): Promise<(BridgeChain & BridgeAsset)[]> {
// Implement logic to get supported assets
}

getDepositAddress?(
params: GetDepositAddressParams
): Promise<BridgeDepositAddress> {
Expand Down Expand Up @@ -121,6 +127,9 @@ export interface BridgeProvider {
getTransactionData(
params: GetBridgeQuoteParams
): Promise<BridgeTransactionRequest>;
getSupportedAssets(
params: GetBridgeSupportedAssetsParams
): Promise<(BridgeChain & BridgeAsset)[]>;
getDepositAddress?(
params: GetDepositAddressParams
): Promise<BridgeDepositAddress>;
Expand Down Expand Up @@ -158,14 +167,13 @@ export interface BridgeTransferStatus {

### BridgeAsset

The BridgeAsset interface represents an asset that can be transferred across a bridge. It includes the denomination of the asset, the address of the asset, the number of decimal places for the asset, and the source minimum denom (e.g. uatom).
The BridgeAsset interface represents an asset that can be transferred across a bridge. It includes the denomination of the asset, the address of the asset on a given chain, the number of decimal places for the asset.

```tsx
export interface BridgeAsset {
denom: string;
address: string;
decimals: number;
sourceDenom: string;
}
```

Expand All @@ -177,7 +185,8 @@ The BridgeCoin type represents an asset with an amount, likely returned within a
export type BridgeCoin = {
denom: string;
decimals: number;
sourceDenom: string;
/** The address of the asset, represented as an IBC denom, origin denom, or EVM contract address. */
address: string;
/** Amount without decimals. */
amount: string;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"cachified": "^3.5.4",
"long": "^5.2.3",
"lru-cache": "^10.0.1",
"viem": "2.13.3",
"viem": "2.16.4",
"zod": "^3.22.4"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit b7ff0ee

Please sign in to comment.