-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91056c4
commit e0f0a61
Showing
6 changed files
with
153 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ethers } from "ethers"; | ||
import Account from "@/artifacts/contracts/account.sol/Account.json"; | ||
|
||
export const sepoliaUrl = String(process.env.SEPOLIA_RPC_URL); | ||
export const address = String(process.env.CONTRACT_ADDRESS); | ||
export const provider = new ethers.JsonRpcProvider(sepoliaUrl); | ||
export const privateKey = String(process.env.PRIVATE_KEY); | ||
export const wallet = new ethers.Wallet(privateKey); | ||
export const walletConnected = wallet.connect(provider); | ||
|
||
export const contract = new ethers.Contract( | ||
address, | ||
Account.abi, | ||
walletConnected, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters