On January 25, 2022, the blockchain Service Network Development Alliance launched the “bsn-ddc basic network” and entered the trial commercial stage. At the same time, the bsn-ddc official website portal (ddc.bsnbase.com) was launched for ddc/nft business parties to apply for the registration of “platform parties”.
Up to now, the bsn-ddc basic network has been online for two months. Developers have also raised many problems in the process of using it. Previously, the BSN seminar has released an issue of frequently asked questions on DDC development. The following is the latest summary of frequently asked questions (FAQs) by BSN technical support personnel.
Q: what is the difference between a platform account and a terminal account when creating a chain account?
A: the platform account can manage the status of the terminal account and recharge the terminal user in ddc-sdk.
Q: when using the official ddc-sdk to generate DDC, what do the sender and to mean?
A: when the official ddc-sdk is used to generate DDC, the sender account is used to pay the energy value and business fees that need to be consumed in this transaction. The to account refers to the account to which the DDC is generated.
Q: can ddchuri be modified or under what circumstances can setddcuri be used?
A: if the owner generates a DDC for the first time and the ddchuri is empty, the owner and authorizer of the DDC can use the setddcuri method to assign the ddchuri. If the ddchuri has a value, it cannot be modified.
Q: what is the ddcpubtotal field in 1155ddc details? Will this field change after the transfer?
A: the ddcpuptotal field in the 1155ddc details is the total quantity issued by the 1155ddc. This quantity will not change.
Q: can the chain account created by bsn-base portal call the official DDC contract?
A: the chain account created by bsn-base portal cannot call the official DDC contract. The chain account created by DDC portal can call the official DDC contract, the DDC contract deployed by itself or other contracts.
Q: are the fund accounts in DDC portal and bsn-base portal common?
Answer: the fund accounts in DDC portal and bsn-base portal are two systems, and they cannot be used in common.
Q: after the transaction, how to judge whether the transaction is successful?
A: in addition to China Mobile, the transaction status in the transaction data is obtained according to the transaction hash, and whether the transaction is successful is judged according to the transaction status (success when the status of Wenchang chain and Wuhan chain is 0x1, and success when the status of Tai’an chain is 0x0). China Mobile Chain calls getinfo method to view head_ Block_ Whether num is greater than the block height returned after mint. If num is greater than, it indicates that the uplink is successful.
Q: how to obtain ddcid after mint?
Answer: call blockeventservice according to the block number of the transaction The getblockevent method checks the events in this block. For example, ddcid exists in ddc721transfereventbean.
Q: what is the reason for using the Wuhan chain ddc-sdk “already known”?
A: the reason is that the interface is frequently called for transactions, and the nonce value is repeated. The solution is to set the nonce value after a certain period of time for each transaction or each transaction submission, such as requestoptions requestoptions = requestoptions Builder()
Q: what is the reason for using the Wuhan chain DDC SDK to report “nonce too low”?
Answer: 1. Is the privatekey set in the transactionsignature the privatekey of the sender
2. The nonce value is repeated. Set the nonce value in options for each transaction, such as requestoptions requestoptions = requestoptions Builder()
Q: what is the reason for using “2001 unauthorized” in Wuhan chain ddc-sdk times?
Answer: check whether the gateway address set by setgatewayurl is correct. It should be https://opbningxia.bsngate.co… [item id]/rpc.
Q: why does Wuhan chain return “both RPC err and result are null” when it obtains transaction data according to the transaction hash (or the transaction is always pending)?
Answer: 1. According to eth_ The gettransactionbyhash method obtains the transaction information. After viewing the previous transaction information, it is found that the transaction is not blocked, indicating that the transaction is still in pending status
2. Check the gasprice setting. If the gasprice setting is too small, the transaction will be waiting for packaging. Query the nonce value of the pending transaction. After increasing the gasprice, restart the transaction.
3. If the nonce value is set, but the nonce value does not increase from 1 (or the nonce value is not continuous), the transaction will always be pending, and the transaction with missing nonce value should be supplemented. According to eth_ The gettransactioncount method can view the nonce value of the current transaction.
Q: how to set the gasprice in the DDC SDK of Wuhan chain appropriately?
Answer: use eth_ Gasprice method to obtain the average gasprice value of the current chain, and set it up or down.
Q: how to set gaslimit in Wuhan chain ddc-sdk properly?
A: gaslimit can be based on eth_ After the estimategas calculation, it is OK if gaslimit is larger than this value. If it is not calculated, it is OK to set a particularly large value.