update contract and providers

master
lza_menace 2 years ago
parent 89de439372
commit fd14d320a1

@ -7,6 +7,7 @@ import {
} from 'wagmi'; } from 'wagmi';
import { localhost, goerli } from 'wagmi/chains'; import { localhost, goerli } from 'wagmi/chains';
import { publicProvider } from 'wagmi/providers/public'; import { publicProvider } from 'wagmi/providers/public';
import { infuraProvider } from 'wagmi/providers/infura';
import { InjectedConnector } from 'wagmi/connectors/injected'; import { InjectedConnector } from 'wagmi/connectors/injected';
import { readContract, writeContract, prepareWriteContract, waitForTransaction } from '@wagmi/core' import { readContract, writeContract, prepareWriteContract, waitForTransaction } from '@wagmi/core'
import { ethers, BigNumber } from 'ethers'; import { ethers, BigNumber } from 'ethers';
@ -21,11 +22,11 @@ import 'bulma/css/bulma.min.css';
import 'noty/lib/noty.css'; import 'noty/lib/noty.css';
import 'noty/lib/themes/relax.css'; import 'noty/lib/themes/relax.css';
const contractAddress = "0xa8553a4c170f2aa41c036fa768e698de56c2960f"; const contractAddress = "0x4f2888c3f43f87190d7d3f4df99329c74b3039c9";
const { chains, provider } = configureChains( const { chains, provider } = configureChains(
[localhost, goerli], [localhost, goerli],
[publicProvider()] [infuraProvider({ apiKey: 'e7674eea9d72437d9129b41ed018183d' }), publicProvider()]
); );
const connector = new InjectedConnector({ chains }); const connector = new InjectedConnector({ chains });

@ -683,7 +683,13 @@
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "withdraw", "name": "withdraw",
"outputs": [], "outputs": [],
"stateMutability": "nonpayable", "stateMutability": "nonpayable",

Loading…
Cancel
Save