Skip to content

Commit

Permalink
Merge pull request #58 from hollow-leaf/feat/backend
Browse files Browse the repository at this point in the history
feat: checkout to mainnet
  • Loading branch information
LinXJ1204 authored Feb 19, 2024
2 parents b34b615 + 65893f1 commit 428dc97
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions apps/backend/blockchain/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

load_dotenv()
APIKEY = os.getenv("APIKEY")
web3 = Web3(Web3.HTTPProvider("https://opbnb-testnet.nodereal.io/v1/64a9df0874fb4a93b9d0a3849de012d3"))
URL = "https://opbnb-testnet.nodereal.io/v1/64a9df0874fb4a93b9d0a3849de012d3"
web3 = Web3(Web3.HTTPProvider("https://opbnb-mainnet.nodereal.io/v1/e9a36765eb8a40b9bd12e680a1fd2bc5"))
URL = "https://opbnb-mainnet.nodereal.io/v1/e9a36765eb8a40b9bd12e680a1fd2bc5"
ServerlessURL = "http://psyduck-app.wayneies1206.workers.dev"

f = open('factoryABI.json')
factoryABI = FactoryABI
factoryAddr = '0x36199273a2bEaD1dCfcFee5702A3bD87031eF108'
factoryAddr = '0x563B972f0CdE62b8a4dC64Ad7CFde9578465B7e9'

target_contract = web3.eth.contract(address=factoryAddr, abi=factoryABI) # 建立 contract 操作物件

Expand Down Expand Up @@ -114,7 +114,7 @@ def update_opbnb(start, end):
logs = receipt["logs"]

for log in logs:
contract = web3.eth.contract("0x36199273a2bEaD1dCfcFee5702A3bD87031eF108", abi=factoryABI)
contract = web3.eth.contract("0x563B972f0CdE62b8a4dC64Ad7CFde9578465B7e9", abi=factoryABI)
top0 = hexbytes.HexBytes(log["topics"][0])
print(top0)
receipt_event_signature_hex = Web3.toHex(top0)
Expand Down
4 changes: 2 additions & 2 deletions apps/extension_app/src/services/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { FactoryABI, ERC20ABI, GlobalABI } from './contractAbi';
import { useAccount } from "wagmi"
import { address2eventId } from './api';

const FactoryADDRESS = "0x5360d0Bb8Eb03C7C988b2D3B9162028e287b63A2"
const ERC20ADDRESS = "0x92b9Ff2903F668B1C715cC8079e2ebC2D39ba4b7"
const FactoryADDRESS = "0x563B972f0CdE62b8a4dC64Ad7CFde9578465B7e9"
const ERC20ADDRESS = "0x0eDE01A62360a4D92d7CaaC38d7701e95142EFb5"
const GlobalADDRESS = "0x18b91197D9FA2b39d6118D0dB5c8f1C049eCe350"


Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Callback from './routes/callback'
import { QueryClient, QueryClientProvider } from "react-query";
import { createWeb3Modal, defaultWagmiConfig } from '@web3modal/wagmi/react'
import { WagmiConfig, configureChains, createConfig } from 'wagmi'
import { goerli, opBNBTestnet, mainnet } from 'viem/chains'
import { goerli, opBNBTestnet, mainnet, opBNB } from 'viem/chains'
import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet'
import { InjectedConnector } from 'wagmi/connectors/injected'
import { WalletConnectConnector } from 'wagmi/connectors/walletConnect'
Expand All @@ -33,7 +33,7 @@ const metadata = {
}

const { chains, publicClient } = configureChains(
[mainnet, opBNBTestnet],
[mainnet, opBNBTestnet, opBNB],
[walletConnectProvider({ projectId }), publicProvider()],

)
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/services/contractAbi.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const FactoryADDRESS = "0x36199273a2bEaD1dCfcFee5702A3bD87031eF108"
export const ERC20ADDRESS = "0xfd0514E52720205dab8Ca5342844458E52733691"
export const FactoryADDRESS = "0x563B972f0CdE62b8a4dC64Ad7CFde9578465B7e9"
export const ERC20ADDRESS = "0x0eDE01A62360a4D92d7CaaC38d7701e95142EFb5"
export const GlobalADDRESS = "0x18b91197D9FA2b39d6118D0dB5c8f1C049eCe350"

export const ERC20ABI = [
Expand Down

0 comments on commit 428dc97

Please sign in to comment.