diff --git a/src/tx-builder/config/index.ts b/src/tx-builder/config/index.ts index 59777280..3d192bfc 100644 --- a/src/tx-builder/config/index.ts +++ b/src/tx-builder/config/index.ts @@ -155,7 +155,7 @@ export const enabledNetworksByService: EnabledNetworksType = { Network.polygon, Network.mumbai, ], - faucet: [Network.kovan], + faucet: [Network.kovan, Network.mumbai], liquiditySwapAdapter: [Network.mainnet, Network.polygon], repayWithCollateralAdapter: [Network.kovan, Network.mainnet], aaveGovernanceV2: [Network.kovan, Network.mainnet], diff --git a/src/tx-builder/config/v2/addresses.ts b/src/tx-builder/config/v2/addresses.ts index d6521bf2..172b2350 100644 --- a/src/tx-builder/config/v2/addresses.ts +++ b/src/tx-builder/config/v2/addresses.ts @@ -62,7 +62,7 @@ export const commonContractAddressBetweenMarketsV2: CommonConfigType = { GOVERNANCE_PROTO_CONTRACT: '', LEND_TO_AAVE_MIGRATOR: '', WETH_GATEWAY: '0xee9eE614Ad26963bEc1Bec0D2c92879ae1F209fA', - FAUCET: '', + FAUCET: '0x0b3C23243106A69449e79C14c58BB49E358f9B10', SWAP_COLLATERAL_ADAPTER: '', REPAY_WITH_COLLATERAL_ADAPTER: '', FLASHLIQUIDATION: '', diff --git a/src/tx-builder/services/Faucet.ts b/src/tx-builder/services/Faucet.ts index d60933ca..7705e182 100644 --- a/src/tx-builder/services/Faucet.ts +++ b/src/tx-builder/services/Faucet.ts @@ -14,9 +14,7 @@ import { Configuration, eEthereumTxType, EthereumTransactionTypeExtended, - tEthereumAddress, transactionType, - tStringDecimalUnits, } from '../types'; import { FaucetParamsType } from '../types/FaucetMethodTypes'; import { mintAmountsPerToken } from '../utils/parsings'; @@ -54,13 +52,12 @@ export default class FaucetService { userAddress, reserve, tokenSymbol }: FaucetParamsType ): Promise { const amount: string = mintAmountsPerToken[tokenSymbol]; - const txValue = await this.getTxValue(reserve, amount); const txCallback: () => Promise = this.generateTxCallback({ rawTxMethod: () => this.faucetContract.populateTransaction.mint(reserve, amount), from: userAddress, - value: txValue, + value: DEFAULT_NULL_VALUE_ON_TX, }); return [ @@ -71,16 +68,4 @@ export default class FaucetService }, ]; } - - private async getTxValue( - token: tEthereumAddress, - amount: tStringDecimalUnits - ): Promise { - const minterAddress: string = await this.faucetContract.getMinter(token); - const minterContract: IMinter = this.getContractInstance(minterAddress); - - const isEthRequired: boolean = await minterContract.isEthRequired(); - - return isEthRequired ? amount : DEFAULT_NULL_VALUE_ON_TX; - } } diff --git a/src/tx-builder/utils/parsings.ts b/src/tx-builder/utils/parsings.ts index 937e64a7..4b3c8bea 100644 --- a/src/tx-builder/utils/parsings.ts +++ b/src/tx-builder/utils/parsings.ts @@ -35,6 +35,7 @@ export const mintAmountsPerToken: { [token: string]: tStringDecimalUnits } = { LINK: parseNumber('1000', 18), MANA: parseNumber('100000', 18), MKR: parseNumber('10', 18), + WETH: parseNumber('10', 18), REN: parseNumber('10000', 18), REP: parseNumber('1000', 18), SNX: parseNumber('100', 18),