-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove Cannoli + leave in a good state to add back chains in fture basic section in readme abstract out the link to other network * ignore dynamic type mixup for now * Apply formatting to readme updates Co-authored-by: 0xarthurxyz <[email protected]> * Move adding chains section to root readme move token data to chain config file --------- Co-authored-by: Aaron <[email protected]> Co-authored-by: 0xarthurxyz <[email protected]>
- Loading branch information
1 parent
b38fe86
commit ad95d5f
Showing
7 changed files
with
76 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { Network } from 'types' | ||
|
||
interface ChainParams { | ||
chainId: `0x${string}` | ||
chainName: string | ||
nativeCurrency: { | ||
name: string | ||
symbol: string | ||
decimals: number | ||
} | ||
rpcUrls: string[] | ||
blockExplorerUrls: string[] | ||
iconUrls: string[] | ||
} | ||
|
||
export const CHAIN_PARAMS: Record<Network, ChainParams> = { | ||
alfajores: { | ||
chainId: '0xaef3', | ||
chainName: 'Alfajores Testnet', | ||
nativeCurrency: { name: 'Alfajores Celo', symbol: 'A-CELO', decimals: 18 }, | ||
rpcUrls: ['https://alfajores-forno.celo-testnet.org'], | ||
blockExplorerUrls: ['https://explorer.celo.org/alfajores'], | ||
iconUrls: ['future'], | ||
}, | ||
} | ||
|
||
interface Token { | ||
symbol: string | ||
address: `0x${string}` | ||
} | ||
|
||
export const tokens: Record<Network, Token[]> = { | ||
alfajores: [ | ||
{ | ||
symbol: 'cEUR', | ||
address: '0x10c892A6EC43a53E45D0B916B4b7D383B1b78C0F', | ||
}, | ||
{ | ||
symbol: 'cREAL', | ||
address: '0xE4D517785D091D3c54818832dB6094bcc2744545', | ||
}, | ||
{ | ||
symbol: 'cUSD', | ||
address: '0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1', | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
|
||
# Welcome to Alfajores Faucet app | ||
|
||
This Repo contains the code for the alfajores faucet. This is contained in 2 apps. | ||
|
||
* The firebase app contains functions which do the actual fauceting. | ||
- The firebase app contains functions which do the actual fauceting. | ||
|
||
* The web app contains a UI for making requests. | ||
- The web app contains a UI for making requests. | ||
|
||
The web app deploys automatically to vercel. | ||
|
||
To setup the web app to run locally set the vercel project to clabs/faucet and the env variables from vercel with `vercel env pull` then run `yarn dev` | ||
To setup the web app to run locally set the vercel project to clabs/faucet and the env variables from vercel with `vercel env pull` then run `yarn dev` | ||
|
||
## Adding chains | ||
|
||
### Web | ||
|
||
- Add the chain config and token info to `config/chains.ts`. | ||
|
||
- Add chain name to the networks array, and `ChainId` and `FaucetAddress` to enums in `types/index.ts`. | ||
|
||
### Firebase | ||
|
||
In the `apps/firebase` project run `yarn cli config:set` with the relevant params. |
ad95d5f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
faucet – ./
faucet-c-labs.vercel.app
faucet.celo.org
faucet-git-master-c-labs.vercel.app
faucet-clabs.vercel.app