理解ERC20中的decimals
decimals 本身是小数的意思,在区块链的ERC20的智能合约里边,也存在一个只读的decimals的方法。这个方法一般返回的是一个小于18的整数。为什么需要这个方法,他设计的初衷是什么,以及如何运用是这篇文章将要探讨的主题 他的作用是能将token分成任意小份。假设有一个Token叫PAI, 小明有3个PAI,想转账1.5个PAI给小红,自己留1.5个。这样的操作在solidity语言中是不被支持的。因为solidity只支持整数,所以你就只能转1或则2,不能转1.5个token 而ERC20里边定义decimals就是为了解决这一问题。如上边例子,如果PAI想要支持转账小数位后1位,那么他会将decimal就可以设置为1,那么余额的30就代表有3个PAI。这种情况下,小明可以转15给小红,也就实现了转1.5个PAI token现实例子:在Ethereum里,USDT的decimals是6,也就是说USDT支持最多小数点后六位的转账我们也找到了有6位数小数点的转账 https://etherscan.io/tx/0x543c3e23073b339d3aa17a252b275...

中文:ERC4337 详解之:Account Creation
与传统意义上的钱包账户不同, AA账户本身实现了账户和签名器的分离,所以钱包地址不再是我们理解的签名器的地址,而是一个专门的账户地址,而且值得注意的是,这个账户地址因为是一个智能合约,所以他需要被部署到区块链上才能使用。但幸运的是,ERC4337定义了标准,让账户地址在账户只能合约部署之前就能得到。 这篇文章讲详细解释ERC 4337账户的创建以及部署:账户创建账户的创的目的是得到一个账户地址。整个过程需要一下模块的交互: 账户工厂:账户工厂的作用是用来创建账户的,但往往创建过程不是直接的账户工厂的调用。账户工厂未来保证创建账户地址的可预测性,会使用CREATE2方法来创建 Example:他需要一下步骤来完成:getAccountInitCode:通过链接账户得到账户工厂的address,以及账户工厂账户创建的callData,把这两个数据组合到一起得到账户initCode调用EntryPoint → getSenderAddress,传入initCode,getSenderAddress内部会解析这个initCode,并且解析工厂合约的地址和callData,用call方法来...
DApp: Use Wallet to perform the transaction
When writing DApp, we often need Wallet like Metamask to interact with the user to perform any Transactions(Like send Eth to an address) The following diagram explains the whole process of how the User use DApp to connect to the Wallet and perform the TransactionsSequence DiagramProcess ExplainConnected to the Wallet Before performing the transaction, the user has to connect to the wallet to ensure that he/she has the ability to execute any transactionWhen User use App to connect to the walle...
理解ERC20中的decimals
decimals 本身是小数的意思,在区块链的ERC20的智能合约里边,也存在一个只读的decimals的方法。这个方法一般返回的是一个小于18的整数。为什么需要这个方法,他设计的初衷是什么,以及如何运用是这篇文章将要探讨的主题 他的作用是能将token分成任意小份。假设有一个Token叫PAI, 小明有3个PAI,想转账1.5个PAI给小红,自己留1.5个。这样的操作在solidity语言中是不被支持的。因为solidity只支持整数,所以你就只能转1或则2,不能转1.5个token 而ERC20里边定义decimals就是为了解决这一问题。如上边例子,如果PAI想要支持转账小数位后1位,那么他会将decimal就可以设置为1,那么余额的30就代表有3个PAI。这种情况下,小明可以转15给小红,也就实现了转1.5个PAI token现实例子:在Ethereum里,USDT的decimals是6,也就是说USDT支持最多小数点后六位的转账我们也找到了有6位数小数点的转账 https://etherscan.io/tx/0x543c3e23073b339d3aa17a252b275...

中文:ERC4337 详解之:Account Creation
与传统意义上的钱包账户不同, AA账户本身实现了账户和签名器的分离,所以钱包地址不再是我们理解的签名器的地址,而是一个专门的账户地址,而且值得注意的是,这个账户地址因为是一个智能合约,所以他需要被部署到区块链上才能使用。但幸运的是,ERC4337定义了标准,让账户地址在账户只能合约部署之前就能得到。 这篇文章讲详细解释ERC 4337账户的创建以及部署:账户创建账户的创的目的是得到一个账户地址。整个过程需要一下模块的交互: 账户工厂:账户工厂的作用是用来创建账户的,但往往创建过程不是直接的账户工厂的调用。账户工厂未来保证创建账户地址的可预测性,会使用CREATE2方法来创建 Example:他需要一下步骤来完成:getAccountInitCode:通过链接账户得到账户工厂的address,以及账户工厂账户创建的callData,把这两个数据组合到一起得到账户initCode调用EntryPoint → getSenderAddress,传入initCode,getSenderAddress内部会解析这个initCode,并且解析工厂合约的地址和callData,用call方法来...
DApp: Use Wallet to perform the transaction
When writing DApp, we often need Wallet like Metamask to interact with the user to perform any Transactions(Like send Eth to an address) The following diagram explains the whole process of how the User use DApp to connect to the Wallet and perform the TransactionsSequence DiagramProcess ExplainConnected to the Wallet Before performing the transaction, the user has to connect to the wallet to ensure that he/she has the ability to execute any transactionWhen User use App to connect to the walle...

Subscribe to B+

Subscribe to B+
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers

Coin market cap and Coingecko are the 2 largest cryptocurrency information websites. When evaluating a coin or token, we often need to check the token matrics like total supply, distribution from those websites. If you stay long enough, you will find that some coin’s market cap information differs from one to another. For example, the total supply of token Wonderland is different from Coin market cap and coin gecko.


Then you might ask, which one is correct or how could I know which website provides the correct information. The answer is if you want to find the most correct answer, you have to check out the information from their block explorers.
Let’s still take Wonderland as an example, this is a token that has been issued from Avax. which means that the truth is held on the Avax blockchain and lucky we could access the explorer to check that information.
The step is:
Find a token from either Coinmarket cap or coingerko. from the information section, it will have a Contract address.
Copy that contract and go to the explorer. in this Wonderland case, the snowtrace (Etherum will be Etherscan and Binance will be Bscscan)
Past the contract addresses from their search bar and navigates to the token page, it will look like this

Most of the Token information will be addressed in that overview section plus there’s some more interesting to check. which is Holders if you want to ensure that the token has large enough holders and has been fairly equally distributed.

And a quick tip here: From the chart above, it will set a red flag as it seems that a large amount of the token was held in 3 wallets. but for this case it not that scared because those 3 are smart contracts(which have a note icon and the beginning of the addresses).

Coin market cap and Coingecko are the 2 largest cryptocurrency information websites. When evaluating a coin or token, we often need to check the token matrics like total supply, distribution from those websites. If you stay long enough, you will find that some coin’s market cap information differs from one to another. For example, the total supply of token Wonderland is different from Coin market cap and coin gecko.


Then you might ask, which one is correct or how could I know which website provides the correct information. The answer is if you want to find the most correct answer, you have to check out the information from their block explorers.
Let’s still take Wonderland as an example, this is a token that has been issued from Avax. which means that the truth is held on the Avax blockchain and lucky we could access the explorer to check that information.
The step is:
Find a token from either Coinmarket cap or coingerko. from the information section, it will have a Contract address.
Copy that contract and go to the explorer. in this Wonderland case, the snowtrace (Etherum will be Etherscan and Binance will be Bscscan)
Past the contract addresses from their search bar and navigates to the token page, it will look like this

Most of the Token information will be addressed in that overview section plus there’s some more interesting to check. which is Holders if you want to ensure that the token has large enough holders and has been fairly equally distributed.

And a quick tip here: From the chart above, it will set a red flag as it seems that a large amount of the token was held in 3 wallets. but for this case it not that scared because those 3 are smart contracts(which have a note icon and the beginning of the addresses).
No activity yet