Skip to content

Commit

Permalink
Merge branch 'main' into rs-setting-governance-params
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Apr 18, 2024
2 parents e7e551f + a684537 commit 060bede
Show file tree
Hide file tree
Showing 12 changed files with 131 additions and 75 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/cf-logs-fetcher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CF Deployment Logs
on:
issue_comment:
types: [created, edited]
jobs:
fetch_comment_log:
if: ${{ (github.event.issue.pull_request) && (github.event.comment.user.login == 'cloudflare-pages[bot]' ) }}
runs-on: [ubuntu-latest]
steps:

- name: Fetch & Print The Deployment Logs
uses: agoric-labs/cf-logs-fetcher@v1
with:
cf_account_id: "0c4635effffcd7f36d1b9f0425a4367a"
cf_project: "wallet-app"
cf_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}

- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Cloudflare deployment logs are available [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
comment_tag: cflogs
2 changes: 2 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * *'

Expand Down
27 changes: 5 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,21 @@
FROM ghcr.io/agoric/agoric-sdk:20240401190900-a3bdfb-linux_amd64

FROM ghcr.io/agoric/agoric-sdk:latest
# Add the Agoric CLI to the PATH so that 'agops' can be accessed from anywhere in the command line.
ENV PATH="/usr/src/agoric-sdk/packages/agoric-cli/bin:${PATH}"

# Setup Node 18.18
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
SHELL ["/bin/bash", "--login", "-c"]
ENV NODE_VERSION=18.18.0
ENV NVM_DIR /tmp/nvm
WORKDIR $NVM_DIR

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default

ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/v$NODE_VERSION/bin:$PATH

# Install necessary dependencies
RUN apt-get update \
&& apt-get install -y wget gnupg ca-certificates jq expect xvfb


RUN apt update && apt install -y nginx
COPY test/e2e/nginx.conf /etc/nginx/sites-available/default

# Install Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable

# Setup nginx
RUN apt update && apt install -y nginx
COPY test/e2e/nginx.conf /etc/nginx/sites-available/default

# Setup Wallet App
WORKDIR /app
COPY . .
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
- ./cypress/videos:/app/test/e2e/videos
- ./cypress/screenshots:/app/test/e2e/screenshots
command: >
bash -c 'echo -n "======> local noVNC URL: http://localhost:8080/vnc.html?autoconnect=true " && yarn wait-on http://display:8080 && echo -n "======> remote noVNC URL: " && curl -s ngrok:4040/api/tunnels | jq -r .tunnels[0].public_url && nginx && source /tmp/nvm/nvm.sh && nvm use 18.18 && yarn test:e2e:ci'
bash -c 'echo -n "======> local noVNC URL: http://localhost:8080/vnc.html?autoconnect=true " && yarn wait-on http://display:8080 && echo -n "======> remote noVNC URL: " && curl -s ngrok:4040/api/tunnels | jq -r .tunnels[0].public_url && nginx && yarn test:e2e:ci'
networks:
- x11

Expand Down Expand Up @@ -77,7 +77,7 @@ services:
- display
networks:
- x11

agd:
profiles:
- synpress
Expand All @@ -97,4 +97,4 @@ services:
- x11

networks:
x11:
x11:
36 changes: 18 additions & 18 deletions test/e2e/specs/test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ describe('Wallet App Test Cases', () => {
it('should place a bid by discount from the CLI successfully', () => {
cy.addNewTokensFound();
cy.getTokenAmount('IST').then((initialTokenValue) => {
cy.exec('bash ./test/e2e/test-scripts/place-bid-by-discount.sh', {
failOnNonZeroExit: false,
}).then((result) => {
expect(result.stderr).to.contain('');
expect(result.stdout).to.contain('Bid Placed Successfully');
cy.getTokenAmount('IST').then((tokenValue) => {
expect(tokenValue).to.lessThan(initialTokenValue);
});
});
cy.exec('bash ./test/e2e/test-scripts/place-bid-by-discount.sh').then(
(result) => {
expect(result.stderr).to.contain('');
expect(result.stdout).to.contain('Your bid has been accepted');
cy.getTokenAmount('IST').then((tokenValue) => {
expect(tokenValue).to.lessThan(initialTokenValue);
});
},
);
});
});

Expand Down Expand Up @@ -86,15 +86,15 @@ describe('Wallet App Test Cases', () => {

it('should place a bid by price from the CLI successfully and verify IST balance', () => {
cy.getTokenAmount('IST').then((initialTokenValue) => {
cy.exec('bash ./test/e2e/test-scripts/place-bid-by-price.sh', {
failOnNonZeroExit: false,
}).then((result) => {
expect(result.stderr).to.contain('');
expect(result.stdout).to.contain('Bid Placed Successfully');
cy.getTokenAmount('IST').then((tokenValue) => {
expect(tokenValue).to.lessThan(initialTokenValue);
});
});
cy.exec('bash ./test/e2e/test-scripts/place-bid-by-price.sh').then(
(result) => {
expect(result.stderr).to.contain('');
expect(result.stdout).to.contain('Your bid has been accepted');
cy.getTokenAmount('IST').then((tokenValue) => {
expect(tokenValue).to.lessThan(initialTokenValue);
});
},
);
});
});

Expand Down
11 changes: 1 addition & 10 deletions test/e2e/test-scripts/place-bid-by-discount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,5 @@

source ./test/e2e/test-scripts/common.sh

output=$(agops inter bid by-discount --discount 5 --give 2IST --from $accountAddress --keyring-backend=test | jq)
agops inter bid by-discount --discount 5 --give 2IST --from $accountAddress --keyring-backend=test 2>&1
wait

if echo "$output" | grep -q "Your bid has been accepted"; then
echo "Bid Placed Successfully"
echo "" >&2
exit 0
else
echo "Error: $output" >&2
exit 1
fi
11 changes: 1 addition & 10 deletions test/e2e/test-scripts/place-bid-by-price.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,5 @@

source ./test/e2e/test-scripts/common.sh

output=$(agops inter bid by-price --give 1IST --price 8.55 --from $accountAddress --keyring-backend=test | jq)
agops inter bid by-price --give 1IST --price 8.55 --from $accountAddress --keyring-backend=test 2>&1
wait

if echo "$output" | grep -q "Your bid has been accepted"; then
echo "Bid Placed Successfully"
echo "" >&2
exit 0
else
echo "Error: $output" >&2
exit 1
fi
12 changes: 12 additions & 0 deletions wallet/public/tokens/stkatom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion wallet/src/components/IbcTransfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ const useSnackbar = () => {
Transaction {isSuccess ? 'succeeded' : 'failed'}:{' '}
<Link
color="rgb(0, 176, 255)"
href={`https://bigdipper.live/${explorerPath}/transactions/${transactionHash}`}
href={`https://${explorerPath}.explorers.guru/transaction/${transactionHash}`}
target={transactionHash}
>
...{transactionHash.slice(transactionHash.length - 12)}
Expand Down
1 change: 1 addition & 0 deletions wallet/src/util/Icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const icons = {
USDT: 'tokens/USDT.png',
stTIA: 'tokens/sttia.svg',
stOSMO: 'tokens/stosmo.svg',
stkATOM: 'tokens/stkatom.svg',
};

export const defaultIcon = 'tokens/default.png';
63 changes: 63 additions & 0 deletions wallet/src/util/ibc-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,67 @@ export const ibcAssets: IbcAssets = {
'ibc/B1E6288B5A0224565D915D1F66716486F16D8A44BF33A9EC323DD6BA30764C35',
},
},
stOSMO: {
chainInfo: {
chainName: 'Stride',
chainId: 'stride-1',
rpc: 'https://stride-rpc.polkachu.com:443',
addressPrefix: 'stride',
explorerPath: 'stride',
gas: '100000',
},
deposit: {
sourcePort: 'transfer',
sourceChannel: 'channel-148',
denom: 'stuosmo',
},
withdraw: {
sourcePort: 'transfer',
sourceChannel: 'channel-59',
denom:
'ibc/DDAB71B9D194CBF3B87DD6924B3B4846F14061289FCBA8A3989B6F8230BC0F05',
},
},
stTIA: {
chainInfo: {
chainName: 'Stride',
chainId: 'stride-1',
rpc: 'https://stride-rpc.polkachu.com:443',
addressPrefix: 'stride',
explorerPath: 'stride',
gas: '100000',
},
deposit: {
sourcePort: 'transfer',
sourceChannel: 'channel-148',
denom: 'stutia',
},
withdraw: {
sourcePort: 'transfer',
sourceChannel: 'channel-59',
denom:
'ibc/4BFBA0996893D2049913D24060BE5936EF8AAF2C89E08B91BCCCA2B8DE3BA241',
},
},
stkATOM: {
chainInfo: {
chainName: 'Persistence',
chainId: 'core-1',
rpc: 'https://persistence-rpc.polkachu.com',
addressPrefix: 'persistence',
explorerPath: 'persistence',
gas: '100000',
},
deposit: {
sourcePort: 'transfer',
sourceChannel: 'channel-202',
denom: 'stk/uatom',
},
withdraw: {
sourcePort: 'transfer',
sourceChannel: 'channel-72',
denom:
'ibc/4721B61DBE668E2F3E613E45885396991F21E8374ABDE48CD7336A77B79101A5',
},
},
};
12 changes: 1 addition & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15988,17 +15988,7 @@ [email protected]:
parseurl "~1.3.3"
send "0.18.0"

ses@^0.18.1:
version "0.18.1"
resolved "https://registry.yarnpkg.com/ses/-/ses-0.18.1.tgz#cd0e6460672f12fd639e9c15d681d45d16901c05"
integrity sha512-TySWbVcVDL7V/5lSoPz2EgTirn9APy6ib7lYMsiQ8OkEMA4dVwc1a3REHEzOqjQ8g7f0bLWErOt5IbIMsxf5aQ==

ses@^0.18.4:
version "0.18.4"
resolved "https://registry.yarnpkg.com/ses/-/ses-0.18.4.tgz#28781719870262afc6928b7d6d94dc16318dbd86"
integrity sha512-Ph0PC38Q7uutHmMM9XPqA7rp/2taiRwW6pIZJwTr4gz90DtrBvy/x7AmNPH2uqNPhKriZpYKvPi1xKWjM9xJuQ==

ses@^0.18.8:
ses@^0.18.1, ses@^0.18.4, ses@^0.18.8:
version "0.18.8"
resolved "https://registry.yarnpkg.com/ses/-/ses-0.18.8.tgz#88036511ac3b3c07e4d82dd8cfc6e5f3788205b6"
integrity sha512-kOH1AhJc6gWDXKURKeU1w7iFUdImAegAljVvBg5EUBgNqjH4bxcEsGVUadVEPtA2PVRMyQp1fiSMDwEZkQNj1g==
Expand Down

0 comments on commit 060bede

Please sign in to comment.