Using Web3.js to Parse Custom Error
The previous article Solidity - Custom Error mentioned how to use custom error in smart contracts. This article continues this topic and explains how to use Web3.js to parse custom error when call, estimateGas and transaction failed. Web3.js version 4.0.1 is used here, tested at Arbitrum Goerli. Example ContractFirst, we prepare a contract as follows: 1234567891011121314151617181920error EmptyError();error ErrorWithArgs(address user);contract MyContract { function sendEmptyError() external ...
Using Ethers.js to Parse Custom Error
The previous article Solidity - Custom Error mentioned how to use custom error in smart contracts. This article continues this topic and explains how to use Ethers.js to parse custom error when call, estimateGas and transaction failed. Ethers.js version 6.5.1 is used here, tested at Arbitrum Goerli. Example ContractFirst, we prepare a contract as follows: 1234567891011121314151617181920error EmptyError();error ErrorWithArgs(address user);contract MyContract { function sendEmptyError() exte ...
Solidity - Custom Error
This article introduces the usage of custom error in Solidity, including ways to define errors, usage, and error handling. UsageThis feature was added after Solidity v0.8.4, which can use a custom error to return the error reason. In the past, we usually used the following methods to throw errors: 1234567require(shouldPass, "MyError");// orif (!shouldPass) { revert("MyError");} Custom error is used as follows: 123456789101112// Define custom errorerror MyError();co ...
Token Checker - Token Sniffer and GoPlus
There are many methods of blockchain fraud, one of which is to airdrop or sell fraudulent tokens, and manipulate the contract to obtain benefits. I have shared several related articles before, and this article found several tools to check whether the token is safe. Token SnifferThe first one is Token Sniffer, just paste the contract address of the token directly into the input on the screen and send it. Taking the previous blockchain fraud - Blockchain Scam - Awesome Crypto World (ACW) Token as ...
LayerZero Airdrop Guide
LayerZero is a cross-chain solution, and it is also a possible airdrop project that everyone has been paying attention to recently. Here is a research and compilation of information for your reference. StrategyLayerZero is quite different from other projects. There is no direct reference strategy, and it basically focuses on interacting with related dapps. Unlike other chains, end users cannot directly use it, but indirectly generate transactions on LayerZero through interaction with other appli ...
Linea Airdrop Guide
Linea is one of the L2 solutions of ZK Rollup. The company behind it is Consensys, which is also the development company of the well-known wallet Metamask. Here I research and organize a piece of information for your reference. As the same L2 ZK Rollup solution, the strategy is the same as the previous zkSync Airdrop Strategy. WalletJust use Metamask. BridgeLinea’s Bridge page, it is better to bridge when fee is under $4 (0.002 ETH). ApplicationList some applications that have been on the mainne ...
Blockchain Scam - Awesome Crypto World (ACW) Token
There have been a lot of airdropped fraudulent tokens recently, this time I saw Awesome Crypto World (ACW), the method is exactly the same as the my last post Blockchain Scam - AI-A (AI Avail) Token. Checking a random transaction directly on the explorer shows that an Approve burned 0.02 BNB, but this time there is no information about the minting of Gas Token. From the Log, you can see many RankClaimed events: According to the trace of the source address of the event, the hacker used your gas t ...
StarkNet Airdrop Guide
StarkNet is one of the L2 solutions of ZK Rollup, which is also a popular airdrop opportunity. Here I research and organize a piece of information for your reference. As the same L2 ZK Rollup solution, the strategy is the same as the previous zkSync Airdrop Strategy. WalletUnlike zkSync, StarkNet is not an EVM-compatible, so we cannot use Metamask directly. A StarkNet-specific wallet must be downloaded. Refer to the wallet application recommended by official website: Argent X Braavos BridgeSta ...
Blockchain Scam - AI-A (AI Avail) Token
I accidentally saw a transfer on Debank, 23000 AI-A (AI Avail), worth $1740? My intuition tells me that this is a scam. I have encountered one that cannot be transferred before. I don’t know what it is. Let’s do some research first. Go to Pancakeswap to try it, it seems that there is money to exchange. Try if I can transfer the money, the result is OK, it looks ok. Let’s take a look at Approve first, and find that the fee is very expensive (I deposited a little money later for the screenshot, wh ...
zkSync Airdrop Guide Step by Step
This article illustrates, through visuals and text, how to bridge and how to interact with applications. After understanding the strategy in the zkSync airdrop strategy, we can start interacting. If you want to carry out the strategy of one interaction, prepare 0.02207 ETH, and if you want to carry out the strategy of continuous multiple transactions, prepare 0.05631 ETH. zkSync 1.0 (Lite)Bridge DepositLite does not need to add the Network to Metamask, all related operations are performed on the ...