Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: configure testnet #598

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/utils/bzz-abi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const BZZ_TOKEN_ADDRESS = '0xdBF3Ea6F5beE45c02255B2c26a16F300502F68da'
export const BZZ_TOKEN_ADDRESS = '0x2ac3c1d3e24b45c6c310534bc2dd84b5ed576335'

export const bzzABI = [
{
type: 'function',
Expand Down
4 changes: 2 additions & 2 deletions src/utils/rpc.ts
Original file line number Diff line number Diff line change
@@ -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<number> {
const provider = new providers.JsonRpcProvider(url, NETWORK_ID)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down