Skip to content

Commit

Permalink
Add Mantle Wadsley
Browse files Browse the repository at this point in the history
  • Loading branch information
MantisClone committed Jul 19, 2023
1 parent 92cb211 commit 1f9e01a
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 5 deletions.
2 changes: 2 additions & 0 deletions packages/currency/src/chains/evm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as FantomDefinition from './data/fantom';
import * as FuseDefinition from './data/fuse';
import * as GoerliDefinition from './data/goerli';
import * as MainnetDefinition from './data/mainnet';
import * as MantleWadsleyDefinition from './data/mantle-wadsley';
import * as MaticDefinition from './data/matic';
import * as MoonbeamDefinition from './data/moonbeam';
import * as MumbaiDefinition from './data/mumbai';
Expand Down Expand Up @@ -39,6 +40,7 @@ export const chains: Record<CurrencyTypes.EvmChainName, EvmChain> = {
fuse: FuseDefinition,
goerli: GoerliDefinition,
mainnet: MainnetDefinition,
'mantle-wadsley': MantleWadsleyDefinition,
matic: MaticDefinition,
moonbeam: MoonbeamDefinition,
mumbai: MumbaiDefinition,
Expand Down
6 changes: 6 additions & 0 deletions packages/currency/src/native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ export const nativeCurrencies: Record<RequestLogicTypes.CURRENCY.ETH, NativeEthC
name: 'Tomb',
network: 'tombchain',
},
{
symbol: 'MNT',
decimals: 18,
name: 'Mantle',
network: 'mantle-wadsley',
},
],
[RequestLogicTypes.CURRENCY.BTC]: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const networks: Record<string, ethers.providers.Network> = {
optimism: { chainId: 10, name: 'optimism' },
moonbeam: { chainId: 1284, name: 'moonbeam' },
tombchain: { chainId: 6969, name: 'tombchain' },
'mantle-wadsley': { chainId: 5001, name: 'mantle-wadsley' },
};

/**
Expand Down Expand Up @@ -57,6 +58,8 @@ export class MultichainExplorerApiProvider extends ethers.providers.EtherscanPro
return 'https://api.arbiscan.io';
case 'avalanche':
return 'https://api.snowtrace.io';
case 'mantle-wadsley':
return 'https://explorer.testnet.mantle.xyz/';
default:
return super.getBaseUrl();
}
Expand Down
5 changes: 5 additions & 0 deletions packages/smart-contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ export default {
chainId: 6969,
accounts,
},
'mantle-wadsley': {
url: url('mantle-wadsley'),
chainId: 5001,
accounts,
},
},
etherscan: {
apiKey: {
Expand Down
8 changes: 4 additions & 4 deletions packages/smart-contracts/scripts-create2/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import { EvmChains } from '@requestnetwork/currency';
*/
export const create2ContractDeploymentList = [
// 'ChainlinkConversionPath',
// 'EthereumProxy',
// 'EthereumFeeProxy',
'EthereumProxy',
'EthereumFeeProxy',
// 'EthConversionProxy',
// 'ERC20FeeProxy',
'ERC20FeeProxy',
// 'ERC20SwapToPay',
// 'ERC20SwapToConversion',
// 'BatchConversionPayments',
// 'ERC20EscrowToPay',
'ERC20TransferableReceivable',
// 'ERC20TransferableReceivable',
];

/**
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/currency-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type EvmChainName =
| 'fuse'
| 'goerli'
| 'mainnet'
| 'mantle-wadsley'
| 'matic'
| 'moonbeam'
| 'mumbai'
Expand Down
3 changes: 2 additions & 1 deletion packages/utils/src/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const networkRpcs: Record<string, string> = {
optimism: 'https://mainnet.optimism.io',
moonbeam: 'https://moonbeam.public.blastapi.io',
tombchain: 'https://rpc.tombchain.com/',
'mantle-wadsley': 'https://rpc.testnet.mantle.xyz/',
};

/**
Expand Down Expand Up @@ -91,7 +92,7 @@ const defaultProviderFactory: ProviderFactory = (network: string | undefined) =>

if (!warned) {
console.warn(
`No provider is specified for network ${network}, using ethers default provider.
`No provider is specified for network ${network}, using ethers default provider.
This is not recommended for Production environments.
Use setProviderFactory to override the default provider`,
);
Expand Down

0 comments on commit 1f9e01a

Please sign in to comment.