New answers tagged

0

If you are running the smart comtract in truffle, you will have a migrations file and a config file. The config file will have different networks that you configure. In the 2nd migrations file that you create yourself, you can log the current network being used. Something like this module.exports=function(deployer,network){ console.log(network); deployer....


2

You can use the CHAINID opcode to get the current chain ID. AFAIK, Solidity does not have a built-in function for this, but you can use inline assembly to get the chain ID in a Solidity contract, e.g.: function getChainId() private view returns (uint256 chainId) { assembly { chainId := chainid() } } Then you can check if the chain ID is 1 for ...


1

The bootnodes on the commandline are no longer needed. That repo was created when ropsten was attacked a few years ago. New client version should have the correct bootnodes. Around 10 Mar 2021 Ropsten was forked to Berlink, see announcement on Ethereum blog. In order to synchronize to the correct branch use geth v1.10.1 at least.


0

The issue has been resolved. I found out that the problem was with Etherscan explorer. It wasn't showing Kovan's transactions even after they were mined successfully. Later I, changed it to Rinkeby. I suppose that'll be a stable one hopefully.


1

There is no mining reward in clique consensus algorithm. The sealer information is already included in extradata field.


Top 50 recent answers are included