2

The place where you initialize each variable determines when the initialization code will run. During initialization the code is executed in the following order: Expressions used as initializers in state variable declarations (least to most derived). Base constructor arguments (most to the least derived). Constructor bodies (least to the most derived). If ...


2

Yes, If you verify your contract you can call contracts's functions from scanner sites. for example https://rinkeby.etherscan.io/ for rinkeby testnet. for every contract in scanner sites there is a tab named Contract and you can verify your contract there


1

You can deploy your smart contracts using http://remix.ethereum.org/ to the ethereum blockchain, Install MetaMask Select desired network ( Mainnet, Kovan, Ropsten, Rinkeby, Goerli etc ) Connect MetaMask with the Remix editor Compile your Smart Contract code and Deploy


1

You need to await the getContractFactory .deployed() is, iirc, only in web3js (you can remove it here) double check you contract name (« WETH », case sensitive) if it’s not solving it const { expect } = require("chai"); const { ethers } = require("hardhat"); describe("testing", function () { it("Should work", async ...


1

This has nothing to do with how miners get paid. This happens automatically when you do a transaction (including deploying a contract), and it's the gas fee you pay, you dont specify who gets it, it's paid to the miner who included your traansaction in the block they found. Here it looks like the token has been created using an automated ERC20 token ...


1

Change RPC server to: https://bsc-dataseed2.binance.org in truffle-config.js (instead of dataseed1)... I had the same problem and this resolved it!


1

I'm currently working on a Blender add on that can generate thousands of images or 3D models. It does this by reading your .blend file and creating a unique DNA strand for every possible NFT you can generate. It then randomly selects however many you desire (10000 lets say) and exports them as a rendered image, or a 3D model. Now you have a collection of ...


1

Assuming import { Contract, providers, utils, Wallet } from "ethers"; and const rpc = await new providers.JsonRpcProvider( process.env.RPC_ENDPOINT ) ; const wallet = new Wallet( process.env.PRIVATE_KEY, rpc); Then using the ABI... import { testTokenAbi } from "./abi/token.js"; where the abi file in the format of: export const ...


1

Hello from the future and the past! If you are in the sample project of Hardhat and have customized your Greeter.sol contract [perhaps to deploy an ERC-721 contract] and are now trying to run sample-script.js and it is now failing with reason: 'too many arguments: in Contract constructor' Go into /sample-script.js to const greeter = await Greeter.deploy(...


1

Etherscan.io offers some of these features. Look up your contract by its address and view the Contract Tab. There is a chance the developers published the source code and thereby verified the contract. If this is not the case you must do with trying the decompiled bytecode or the opcode view.


Only top voted, non community-wiki answers of a minimum length are eligible