Solidity - ecrecover
IntroductionThe ecrecover function in the smart contract can be used to verify the signature of the wallet. The verifier can confirm the identity of the signer without the signer’s private key. It is often used for off-chain authorization, and then used on-chain by a third party or for simple identity verification. Function1function ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) returns (address) hash: The hash of the signed message. v: v value of signature. r: r value of signature. s: ...
zkEVM Airdrop Guide
zkEVM is one of the L2 solutions of ZK Rollup. While there is already a MATIC coin, it is said that there may be an airdrop opportunity as well. 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. BridgezkEVM 的 Bridge page, it is better to bridge when fee is under $6 (0.0028 ETH). ApplicationList some applications that have been on the mainnet Name ...
Load CSS Asynchronously
This article explains FOUC (Flash of unstyled content), render-blocking issues, and how to load CSS asynchronously. Flash of unstyled contentAfter the HTML is loaded, it will be displayed first, and then the CSS will be loaded. You will see the HTML screen without style first, and might load CSS style in short time. This causes it looks like a flicker. In addition to this situation, many webpages now also use JavaScript to render the screen, and similar problems will also occur. 例如一個使用 Bootstrap ...
GCP Cloud Monitoring - Reduce Data and Cost
Cloud Monitoring can be used to monitor system status and send alert notifications. I mainly use to monitor hard disk capacity and some custom statuses. I installed Ops Agent on all machines to monitor hard disk status. But I later realized the bill was expensive, so I did some research on its fees and how to keep costs down. PricingFirst of all, let’s understand the pricing of Cloud Monitoring. Mostly, only the first feature is used. The first 150 MiB of this part is a free quota. If we can kee ...
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 ...







