Skip to content

Instantly share code, notes, and snippets.

View technophile-04's full-sized avatar
🏗️
Building...

Shiv Bhonde | shivbhonde.eth technophile-04

🏗️
Building...
View GitHub Profile
@technophile-04
technophile-04 / ContractInteraction.tsx
Created October 15, 2023 05:14
SE-2: useTransactor example with wagmi's useContractWrite hook
import { parseEther } from "viem";
import { useContractWrite } from "wagmi";
import { ArrowSmallRightIcon } from "@heroicons/react/24/outline";
import DeployedContracts from "~~/generated/deployedContracts";
import { useTransactor } from "~~/hooks/scaffold-eth";
export const ContractInteraction = () => {
const yourContractAbi = DeployedContracts[31337][0].contracts.YourContract.abi;
const yourContractAddress = DeployedContracts[31337][0].contracts.YourContract.address;
@technophile-04
technophile-04 / scaffold.config.ts
Last active March 10, 2024 09:32
SE-2 frontend config custom chain
import * as chains from "viem/chains";
// Blast chain
export const blast = {
id: 81457,
name: "Blast",
network: "blast",
nativeCurrency: { name: "Blast", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: { http: ["https://rpc.blast.io"] },
@technophile-04
technophile-04 / README.txt
Created October 29, 2021 14:46
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS