Skip to content

Commit

Permalink
Merge branch 'main' into fix_decodeTransactionData
Browse files Browse the repository at this point in the history
  • Loading branch information
technophile-04 authored Nov 21, 2024
2 parents 9348262 + 3024992 commit f3c24b5
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 22 deletions.
2 changes: 1 addition & 1 deletion packages/hardhat/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
# but we recommend getting your own API Keys for Production Apps.

# To access the values stored in this .env file you can use: process.env.VARIABLENAME
FORKING_URL=
ALCHEMY_API_KEY=
DEPLOYER_PRIVATE_KEY=
ETHERSCAN_API_KEY=
36 changes: 23 additions & 13 deletions packages/hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ const deployerPrivateKey =
process.env.DEPLOYER_PRIVATE_KEY ?? "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
// If not set, it uses ours Etherscan default API key.
const etherscanApiKey = process.env.ETHERSCAN_API_KEY || "DNXJA8RX2Q3VZ4URQIWP7Z68CJXQZSC6AW";
// forking rpc url
const forkingURL = process.env.FORKING_URL || "";

// If not set, it uses ours Alchemy's default API key.
// You can get your own at https://dashboard.alchemyapi.io
const providerApiKey = process.env.ALCHEMY_API_KEY || "oKxs-03sij-U_N0iOlrSsZFr29-IqbuF";

const config: HardhatUserConfig = {
solidity: {
Expand Down Expand Up @@ -45,48 +47,48 @@ const config: HardhatUserConfig = {
// If the network you are looking for is not here you can add new network settings
hardhat: {
forking: {
url: forkingURL,
url: `https://eth-mainnet.alchemyapi.io/v2/${providerApiKey}`,
enabled: process.env.MAINNET_FORKING_ENABLED === "true",
},
},
mainnet: {
url: `https://cloudflare-eth.com`,
url: `https://eth-mainnet.alchemyapi.io/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
sepolia: {
url: `https://rpc2.sepolia.org`,
url: `https://eth-sepolia.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
arbitrum: {
url: `https://arb1.arbitrum.io/rpc`,
url: `https://arb-mainnet.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
arbitrumSepolia: {
url: `https://sepolia-rollup.arbitrum.io/rpc`,
url: `https://arb-sepolia.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
optimism: {
url: `https://mainnet.optimism.io`,
url: `https://opt-mainnet.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
optimismSepolia: {
url: `https://sepolia.optimism.io`,
url: `https://opt-sepolia.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
polygon: {
url: `https://polygon-rpc.com`,
url: `https://polygon-mainnet.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
polygonMumbai: {
url: `https://rpc.ankr.com/polygon_mumbai`,
url: `https://polygon-mumbai.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
polygonZkEvm: {
url: `https://zkevm-rpc.com`,
url: `https://polygonzkevm-mainnet.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
polygonZkEvmTestnet: {
url: `https://rpc.public.zkevm-test.net`,
url: `https://polygonzkevm-testnet.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
gnosis: {
Expand Down Expand Up @@ -121,6 +123,14 @@ const config: HardhatUserConfig = {
url: "https://sepolia.publicgoods.network",
accounts: [deployerPrivateKey],
},
celo: {
url: "https://forno.celo.org",
accounts: [deployerPrivateKey],
},
celoAlfajores: {
url: "https://alfajores-forno.celo-testnet.org",
accounts: [deployerPrivateKey],
},
},
// configuration for harhdat-verify plugin
etherscan: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const AddressCopyIcon = ({ className, address }: { className?: string; ad
}, 800);
}}
>
<button onClick={e => e.stopPropagation()}>
<button onClick={e => e.stopPropagation()} type="button">
{addressCopied ? (
<CheckCircleIcon className={className} aria-hidden="true" />
) : (
Expand Down
1 change: 1 addition & 0 deletions packages/nextjs/components/scaffold-eth/Balance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const Balance = ({ address, className = "", usdMode }: BalanceProps) => {
<button
className={`btn btn-sm btn-ghost flex flex-col font-normal items-center hover:bg-transparent ${className}`}
onClick={toggleDisplayUsdMode}
type="button"
>
<div className="w-full flex items-center justify-center">
{displayUsdMode ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ export const Bytes32Input = ({ value, onChange, name, placeholder, disabled }: C
onChange={onChange}
disabled={disabled}
suffix={
<div
<button
className="self-center cursor-pointer text-xl font-semibold px-4 text-accent"
onClick={convertStringToBytes32}
type="button"
>
#
</div>
</button>
}
/>
);
Expand Down
5 changes: 3 additions & 2 deletions packages/nextjs/components/scaffold-eth/Input/BytesInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ export const BytesInput = ({ value, onChange, name, placeholder, disabled }: Com
onChange={onChange}
disabled={disabled}
suffix={
<div
<button
className="self-center cursor-pointer text-xl font-semibold px-4 text-accent"
onClick={convertStringToBytes}
type="button"
>
#
</div>
</button>
}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const EtherInput = ({
className="btn btn-primary h-[2.2rem] min-h-[2.2rem]"
onClick={toggleDisplayUsdMode}
disabled={!displayUsdMode && !nativeCurrencyPrice}
type="button"
>
<ArrowsRightLeftIcon className="h-3 w-3 cursor-pointer" aria-hidden="true" />
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const IntegerInput = ({
className={`${disabled ? "cursor-not-allowed" : "cursor-pointer"} font-semibold px-4 text-accent`}
onClick={multiplyBy1e18}
disabled={disabled}
type="button"
>
</button>
Expand Down
5 changes: 3 additions & 2 deletions packages/nextjs/scaffold.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ const scaffoldConfig = {
// it has no effect if you only target the local network (default is 4000)
pollingInterval: 30000,

// You can get your Alchemy's default API key at https://dashboard.alchemyapi.io
// This is ours Alchemy's default API key.
// You can get your own at https://dashboard.alchemyapi.io
// It's recommended to store it in an env variable:
// .env.local for local testing, and in the Vercel/system env config for live apps.
alchemyApiKey: process.env.NEXT_PUBLIC_ALCHEMY_API_KEY || "",
alchemyApiKey: process.env.NEXT_PUBLIC_ALCHEMY_API_KEY || "oKxs-03sij-U_N0iOlrSsZFr29-IqbuF",

// This is ours WalletConnect's default project ID.
// You can get your own at https://cloud.walletconnect.com
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/services/web3/wagmiConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const wagmiConfig = createConfig({
ssr: true,
client({ chain }) {
const alchemyHttpUrl = getAlchemyHttpUrl(chain.id);
const rpcFallbacks = alchemyHttpUrl ? [http(alchemyHttpUrl), http()] : [http()];
const rpcFallbacks = alchemyHttpUrl ? [http(), http(alchemyHttpUrl)] : [http()];

return createClient({
chain,
Expand Down
8 changes: 8 additions & 0 deletions packages/nextjs/utils/scaffold-eth/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export const RPC_CHAIN_NAMES: Record<number, string> = {
[chains.base.id]: "base-mainnet",
[chains.baseGoerli.id]: "base-goerli",
[chains.baseSepolia.id]: "base-sepolia",
[chains.celo.id]: "celo-mainnet",
[chains.celoAlfajores.id]: "celo-alfajores",
};

export const getAlchemyHttpUrl = (chainId: number) => {
Expand Down Expand Up @@ -81,6 +83,12 @@ export const NETWORKS_EXTRA_DATA: Record<string, ChainAttributes> = {
[chains.scrollSepolia.id]: {
color: "#fbebd4",
},
[chains.celo.id]: {
color: "#FCFF52",
},
[chains.celoAlfajores.id]: {
color: "#476520",
},
};

/**
Expand Down

0 comments on commit f3c24b5

Please sign in to comment.