Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 14 additions & 14 deletions .github/workflows/release-wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ jobs:

- uses: actions/upload-artifact@v3
with:
name: namada-extension-chrome
path: ./apps/extension/build/chrome/namada_extension-*.zip
name: namada-keychain-chrome
path: ./apps/extension/build/chrome/namada_keychain-*.zip

build-extension-firefox:
needs: setup
Expand Down Expand Up @@ -102,8 +102,8 @@ jobs:

- uses: actions/upload-artifact@v3
with:
name: namada-extension-firefox
path: ./apps/extension/build/firefox/namada_extension-*.zip
name: namada-keychain-firefox
path: ./apps/extension/build/firefox/namada_keychain-*.zip

release:
needs: [setup, build-extension-chrome, build-extension-firefox]
Expand All @@ -112,20 +112,20 @@ jobs:
- name: Download Chrome extension build
uses: actions/download-artifact@v3
with:
name: namada-extension-chrome
path: ./namada-extension-chrome
name: namada-keychain-chrome
path: ./namada-keychain-chrome

- name: Download Firefox extension build
uses: actions/download-artifact@v3
with:
name: namada-extension-firefox
path: ./namada-extension-firefox
name: namada-keychain-firefox
path: ./namada-keychain-firefox

- name: Get extension filenames
id: get-filenames
run: |
echo "CHROME_FILENAME=$(ls -1 ./namada-extension-chrome)" >> "$GITHUB_OUTPUT"
echo "FIREFOX_FILENAME=$(ls -1 ./namada-extension-firefox)" >> "$GITHUB_OUTPUT"
echo "CHROME_FILENAME=$(ls -1 ./namada-keychain-chrome)" >> "$GITHUB_OUTPUT"
echo "FIREFOX_FILENAME=$(ls -1 ./namada-keychain-firefox)" >> "$GITHUB_OUTPUT"

- name: Make release body text
run: |
Expand All @@ -149,8 +149,8 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./namada-extension-chrome/${{ steps.get-filenames.outputs.CHROME_FILENAME }}
asset_name: namada-extension-chrome_${{ needs.setup.outputs.VERSION }}.zip
asset_path: ./namada-keychain-chrome/${{ steps.get-filenames.outputs.CHROME_FILENAME }}
asset_name: namada-keychain-chrome_${{ needs.setup.outputs.VERSION }}.zip
asset_content_type: application/zip

- name: Add Firefox extension to release
Expand All @@ -159,6 +159,6 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./namada-extension-firefox/${{ steps.get-filenames.outputs.FIREFOX_FILENAME }}
asset_name: namada-extension-firefox_${{ needs.setup.outputs.VERSION }}.zip
asset_path: ./namada-keychain-firefox/${{ steps.get-filenames.outputs.FIREFOX_FILENAME }}
asset_name: namada-keychain-firefox_${{ needs.setup.outputs.VERSION }}.zip
asset_content_type: application/zip
24 changes: 24 additions & 0 deletions .vscode/bookmarks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"files": [
{
"path": "apps/namadillo/src/atoms/staking/services.ts",
"bookmarks": [
{
"line": 20,
"column": 0,
"label": ""
}
]
},
{
"path": "apps/namadillo/src/atoms/staking/atoms.ts",
"bookmarks": [
{
"line": 32,
"column": 0,
"label": ""
}
]
}
]
}
1 change: 1 addition & 0 deletions apps/genesis-bond/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NAMADA_INTERFACE_GENESIS_API_URL=http://127.0.0.1:3000
3 changes: 3 additions & 0 deletions apps/genesis-bond/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.css
*.svg
webpack.config.js
3 changes: 3 additions & 0 deletions apps/genesis-bond/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
"extends": require.resolve("@namada/config/eslint/react.js")
}
4 changes: 4 additions & 0 deletions apps/genesis-bond/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# dependencies
/node_modules
/build
.env
78 changes: 78 additions & 0 deletions apps/genesis-bond/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# faucet

This is a front-end app to the [namada-faucet](https://github.com/heliaxdev/namada-faucet) server.

## Table of Contents

- [Setup](#setup)
- [Local Development](#local-development)
- [Proxying Requests](#proxying-requests)
- [Building the Project](#building-the-project)
- [Notes](#notes)

## Setup

To install dependencies, from the root `namada-interface` folder, run the following:

```bash
yarn
```

Then, look at the potential variables you may override in [.env.sample](./.env.sample) in `apps/faucet`. You can copy these variables into a `.env` file,
and they will be used when the application is built.

As an example, if all you want to override the the API url or endpoint, you can override the following default values in a `.env`:

```bash
# Faucet API Endpoint override
NAMADA_INTERFACE_FAUCET_API_URL=http://127.0.0.1:5000
NAMADA_INTERFACE_FAUCET_API_ENDPOINT=/api/v1/faucet
```

[ [Table of Contents](#table-of-contents) ]

## Local Development

In `apps/faucet`, you can issue the following command to run the Faucet app locally in development mode:

```bash
yarn dev
```

The app will be accessible at `http://localhost:8081`.

[ [Table of Contents](#table-of-contents) ]

## Proxying Requests

If you are experiencing request failures due to CORS origin problems (e.g., if you are connecting to a remote server from a local dev instance),
you can launch the local CORS proxy via the following:

```bash
yarn dev:proxy
```

This will proxy the `NAMADA_INTERFACE_FAUCET_API_URL` (or default URL if this is unspecified) via a Node server, which should resolve the issue.

[ [Table of Contents](#table-of-contents) ]

## Building the project

To build the final, static HTML version of this app, simply run the following:

```bash
yarn build
```

This will build the production version of the app, and the resulting bundle will be available in `apps/faucet/build`. This contents of this folder can be served on a web host
as a static HTML website.

[ [Table of Contents](#table-of-contents) ]

## Notes

The logic for the API calls, as well as the mining logic can be found in [utils/](./src/utils/).

The form interface where these calls are invoked is located in [Faucet.tsx](./src/App/Faucet.tsx).

[ [Table of Contents](#table-of-contents) ]
4 changes: 4 additions & 0 deletions apps/genesis-bond/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": [],
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
59 changes: 59 additions & 0 deletions apps/genesis-bond/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "@kintsugi-tech/namada-genesis-bonds",
"version": "0.1.0",
"description": "Namada Genesis Pre-Bond Generator",
"repository": "https://github.com/anoma/namada-interface/",
"author": "Heliax Dev <[email protected]>",
"license": "MIT",
"private": true,
"scripts": {
"start": "webpack-dev-server",
"start:proxy": "node ./scripts/startProxy.js",
"dev": "NODE_ENV=development yarn start",
"dev:proxy": "./scripts/start-proxy.sh; NAMADA_INTERFACE_PROXY=true yarn dev",
"build": "NODE_ENV=production webpack-cli",
"lint": "eslint src --ext .ts,.tsx",
"lint:fix": "yarn lint -- --fix"
},
"dependencies": {
"@cosmjs/encoding": "^0.29.0",
"buffer": "^6.0.3",
"dompurify": "^3.0.5",
"node-forge": "^1.3.1",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"react-router-dom": "^6.0.0",
"styled-components": "^5.3.5"
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.20.11",
"@svgr/webpack": "^6.3.1",
"@types/dompurify": "^3.0.5",
"@types/node": "^22.5.4",
"@types/node-forge": "^1.3.6",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@types/styled-components": "^5.1.26",
"dotenv": "^16.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-react": "^7.35.2",
"eslint-plugin-react-hooks": "^4.6.0",
"html-webpack-plugin": "^5.6.0",
"local-cors-proxy": "^1.1.0",
"postcss": "^8.4.32",
"postcss-loader": "^8.1.0",
"postcss-preset-env": "^9.3.0",
"tailwindcss": "^3.4.1",
"ts-loader": "^9.3.1",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.5.4",
"typescript-plugin-styled-components": "^2.0.0",
"webpack": "^5.9.4",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1"
}
}
6 changes: 6 additions & 0 deletions apps/genesis-bond/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
1 change: 1 addition & 0 deletions apps/genesis-bond/public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* /index.html 200
Binary file added apps/genesis-bond/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions apps/genesis-bond/public/bg-dots.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/genesis-bond/public/chain-setting.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/genesis-bond/public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/genesis-bond/public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions apps/genesis-bond/public/incline-arrow-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions apps/genesis-bond/public/incline-arrow-yellow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions apps/genesis-bond/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!doctype html>
<html lang="en" style="height: 100%">
<head>
<meta charset="utf-8" />
<meta name="”robots”" content="”noindex,nofollow”" />
<link rel="icon" href="/assets/favicon-32x32.png" />
<meta name="viewport" content="width=device-width" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Create your pre-bond transaction to be included in Namada Genesis Block!"
/>
<link rel="apple-touch-icon" href="/assets/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.json" />
<title>Namada Genesis Pre-Bond</title>
<meta property="og:title" content="Namada Genesis Pre-Bond" />
<meta
property="og:description"
content="Create your pre-bond transaction to be included in Namada Genesis Block!"
/>
<meta
property="og:image"
content="https://namada-genesis.kintsugi-nodes.com/assets/og.png"
/>

<meta property="twitter:card" content="summary_large_image" />
<meta
property="twitter:url"
content="https://namada-genesis.kintsugi-nodes.com/"
/>
<meta property="twitter:title" content="Namada Genesis Pre-Bond" />
<meta
property="twitter:description"
content="Create your pre-bond transaction to be included in Namada Genesis Block!"
/>
<meta
property="twitter:image"
content="https://namada-genesis.kintsugi-nodes.com/assets/og.png"
/>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
25 changes: 25 additions & 0 deletions apps/genesis-bond/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "Namada Genesis Pre-Bond",
"name": "Namada Genesis Pre-Bond Generator",
"icons": [
{
"src": "apple-touch-icon.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "favicon-16x16.png",
"type": "image/png",
"sizes": "16x16"
},
{
"src": "favicon-32x32.png",
"type": "image/png",
"sizes": "32x32"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
Binary file added apps/genesis-bond/public/og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions apps/genesis-bond/public/plus-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/genesis-bond/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
6 changes: 6 additions & 0 deletions apps/genesis-bond/scripts/start-proxy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd -P)

node $SCRIPT_DIR/startProxies.js&

Loading