Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
replace mumbai testnet with amoy testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
hcote committed Feb 1, 2024
1 parent f1c8f21 commit a20babf
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions core/utils/templateMappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function mapTemplateToFlags(template: string): any {
const quickstartConfig = (config: ConfigType): ConfigType => ({
...config,
template: 'nextjs-dedicated-wallet',
network: 'polygon-mumbai',
network: 'polygon-amoy',
product: 'dedicated',
chain: 'evm',
isChosenTemplateValid: true,
Expand Down Expand Up @@ -198,7 +198,7 @@ export const buildTemplate = async (appConfig: ConfigType): Promise<ConfigType>
config.network === 'ethereum' ||
config.network === 'ethereum-goerli' ||
config.network === 'polygon' ||
config.network === 'polygon-mumbai'
config.network === 'polygon-amoy'
) {
config.chain = 'evm';
} else if (config.network === 'solana-devnet' || config.network === 'solana-mainnet') {
Expand Down
22 changes: 11 additions & 11 deletions scaffolds/nextjs-dedicated-wallet/template/src/utils/network.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export enum Network {
POLYGON_MUMBAI = 'polygon-mumbai',
POLYGON_AMOY = 'polygon-amoy',
POLYGON = 'polygon',
ETHEREUM_GOERLI = 'ethereum-goerli',
ETHEREUM = 'ethereum',
Expand All @@ -9,8 +9,8 @@ export const getNetworkUrl = () => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON:
return 'https://polygon-rpc.com/';
case Network.POLYGON_MUMBAI:
return 'https://rpc-mumbai.maticvigil.com/';
case Network.POLYGON_AMOY:
return 'https://rpc-amoy.polygon.technology/';
case Network.ETHEREUM_GOERLI:
return 'https://eth-goerli.g.alchemy.com/v2/fYFybLQFR9Zr2GCRcgALmAktStFKr0i0';
case Network.ETHEREUM:
Expand All @@ -24,8 +24,8 @@ export const getChainId = () => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON:
return 137;
case Network.POLYGON_MUMBAI:
return 80001;
case Network.POLYGON_AMOY:
return 80002;
case Network.ETHEREUM_GOERLI:
return 5;
case Network.ETHEREUM:
Expand All @@ -35,7 +35,7 @@ export const getChainId = () => {

export const getNetworkToken = () => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON_MUMBAI:
case Network.POLYGON_AMOY:
case Network.POLYGON:
return 'MATIC';
case Network.ETHEREUM:
Expand All @@ -46,7 +46,7 @@ export const getNetworkToken = () => {

export const getFaucetUrl = () => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON_MUMBAI:
case Network.POLYGON_AMOY:
return 'https://faucet.polygon.technology/';
case Network.ETHEREUM_GOERLI:
return 'https://goerlifaucet.com/';
Expand All @@ -57,8 +57,8 @@ export const getNetworkName = () => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON:
return 'Polygon (Mainnet)';
case Network.POLYGON_MUMBAI:
return 'Polygon (Mumbai)';
case Network.POLYGON_AMOY:
return 'Polygon (Amoy)';
case Network.ETHEREUM_GOERLI:
return 'Ethereum (Goerli)';
case Network.ETHEREUM:
Expand All @@ -70,8 +70,8 @@ export const getBlockExplorer = (address: string) => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON:
return `https://polygonscan.com/address/${address}`;
case Network.POLYGON_MUMBAI:
return `https://mumbai.polygonscan.com/address/${address}`;
case Network.POLYGON_AMOY:
return `https://www.oklink.com/amoy/address/${address}`;
case Network.ETHEREUM:
return `https://etherscan.io/address/${address}`;
case Network.ETHEREUM_GOERLI:
Expand Down
18 changes: 9 additions & 9 deletions scaffolds/nextjs-universal-wallet/template/src/utils/networks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export enum Network {
POLYGON_MUMBAI = 'polygon-mumbai',
POLYGON_AMOY = 'polygon-amoy',
POLYGON = 'polygon',
ETHEREUM_GOERLI = 'ethereum-goerli',
ETHEREUM = 'ethereum',
Expand All @@ -9,8 +9,8 @@ export const getNetworkUrl = () => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON:
return 'https://polygon-rpc.com/';
case Network.POLYGON_MUMBAI:
return 'https://rpc-mumbai.maticvigil.com/';
case Network.POLYGON_AMOY:
return 'https://rpc-amoy.polygon.technology/';
case Network.ETHEREUM_GOERLI:
return 'https://eth-goerli.g.alchemy.com/v2/3jKhhva6zBqwp_dnwPlF4d0rFZhu2pjD';
case Network.ETHEREUM:
Expand All @@ -24,7 +24,7 @@ export const getChainId = () => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON:
return 137;
case Network.POLYGON_MUMBAI:
case Network.POLYGON_AMOY:
return 80001;
case Network.ETHEREUM_GOERLI:
return 5;
Expand All @@ -35,7 +35,7 @@ export const getChainId = () => {

export const getNetworkToken = () => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON_MUMBAI:
case Network.POLYGON_AMOY:
case Network.POLYGON:
return 'MATIC';
case Network.ETHEREUM:
Expand All @@ -46,7 +46,7 @@ export const getNetworkToken = () => {

export const getFaucetUrl = () => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON_MUMBAI:
case Network.POLYGON_AMOY:
return 'https://faucet.polygon.technology/';
case Network.ETHEREUM_GOERLI:
return 'https://goerlifaucet.com/';
Expand All @@ -57,7 +57,7 @@ export const getNetworkName = () => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON:
return 'Polygon (Mainnet)';
case Network.POLYGON_MUMBAI:
case Network.POLYGON_AMOY:
return 'Polygon (Mumbai)';
case Network.ETHEREUM_GOERLI:
return 'Ethereum (Goerli)';
Expand All @@ -70,8 +70,8 @@ export const getBlockExplorer = (address: string) => {
switch (process.env.NEXT_PUBLIC_BLOCKCHAIN_NETWORK) {
case Network.POLYGON:
return `https://polygonscan.com/address/${address}`;
case Network.POLYGON_MUMBAI:
return `https://mumbai.polygonscan.com/address/${address}`;
case Network.POLYGON_AMOY:
return `https://www.oklink.com/amoy/address/${address}`;
case Network.ETHEREUM:
return `https://etherscan.io/address/${address}`;
case Network.ETHEREUM_GOERLI:
Expand Down
2 changes: 1 addition & 1 deletion scaffolds/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export namespace BlockchainNetworkPrompt {
{ name: 'ethereum', message: 'Ethereum (Mainnet)' },
{ name: 'ethereum-goerli', message: 'Ethereum (Goerli Testnet)' },
{ name: 'polygon', message: 'Polygon (Mainnet)' },
{ name: 'polygon-mumbai', message: 'Polygon (Mumbai Testnet)' },
{ name: 'polygon-amoy', message: 'Polygon (Amoy Testnet)' },
],
}).run();

Expand Down

0 comments on commit a20babf

Please sign in to comment.