From 5e68eca73b8ba8b90674866fc9ac5f803c430dc6 Mon Sep 17 00:00:00 2001 From: Cafe137 Date: Fri, 16 Dec 2022 10:00:22 +0100 Subject: [PATCH] chore: configure testnet --- src/utils/bzz-abi.ts | 3 ++- src/utils/rpc.ts | 4 ++-- src/utils/wallet.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/utils/bzz-abi.ts b/src/utils/bzz-abi.ts index 4f6c5ce1..5025b761 100644 --- a/src/utils/bzz-abi.ts +++ b/src/utils/bzz-abi.ts @@ -1,4 +1,5 @@ -export const BZZ_TOKEN_ADDRESS = '0xdBF3Ea6F5beE45c02255B2c26a16F300502F68da' +export const BZZ_TOKEN_ADDRESS = '0x2ac3c1d3e24b45c6c310534bc2dd84b5ed576335' + export const bzzABI = [ { type: 'function', diff --git a/src/utils/rpc.ts b/src/utils/rpc.ts index d69e55b6..1c078b9c 100644 --- a/src/utils/rpc.ts +++ b/src/utils/rpc.ts @@ -1,8 +1,8 @@ import { debounce } from '@material-ui/core' -import { Contract, providers, Wallet, BigNumber as BN } from 'ethers' +import { BigNumber as BN, Contract, providers, Wallet } from 'ethers' import { bzzABI, BZZ_TOKEN_ADDRESS } from './bzz-abi' -const NETWORK_ID = 100 +const NETWORK_ID = 5 async function getNetworkChainId(url: string): Promise { const provider = new providers.JsonRpcProvider(url, NETWORK_ID) diff --git a/src/utils/wallet.ts b/src/utils/wallet.ts index b1a487c2..3d8cf783 100644 --- a/src/utils/wallet.ts +++ b/src/utils/wallet.ts @@ -69,7 +69,7 @@ export class ResolvedWallet { await Rpc.sendNativeTransaction( this.privateKey, destination, - this.dai.toBigNumber.minus(totalCost.toString()).toString(), + '0x' + this.dai.toBigNumber.minus(totalCost.toString()).toString(16), jsonRpcProvider, gasPrice, )