In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of NEO how to improve the protocol, the content is detailed and easy to understand, the operation is simple and quick, and has a certain reference value. I believe you will gain something after reading this NEO article on how to improve the agreement. Let's take a look.
Abstract
This NEP describes an URI standard for NEO native asset transfer. In addition, it proposes a subset of URI to improve intelligent contract operations when the NEP-5token contained in this proposal is transferred. In the future, URI will be added as more understandable and well-tested contracts are added to the network. We define a framework to determine whether an URI scheme is suitable for the following intelligent contract operations.
motivation
Currently, there is no standard URI available for NEO clients. Bitcoin implements a URI standard, so clicking on a connection or scanning a QR code can easily make a Bitcoin payment. Similarly, native asset transfer on NEO should be so simple
However, NEO may be able to achieve more contract operations through the invocation of smart contracts. This includes casting and transfer of token, registration of domain names, exchange and other custom applications. Ideally, a URI has a call to a generic smart contract. However, there are security risks, and it may be difficult to determine what the smart contract actually does, which may lead to the loss of funds.
To solve this problem, we propose that the URI generated for generic intelligent contract calls should be limited to a subset of complete contract operations (such as the transfer of NEP-5 token). This will make it easy for the client to understand and verify what a given URI is going to do. If the client pays more attention to security, you can maintain a whitelist of contracts that comply with a given URI specification
Any new smart contracts for NEO URI added to this proposal should be secure, well documented and widely used. We will have more discussion at the end of this proposal.
Detailed description of native asset transfer URI
The transfer of native assets has the following URI. It describes the recipient's address, assets, and the additional attributes that accompany the transaction.
URI scheme: neo
Neo: [? asset=] [? amount=] [?] URI key describes whether it is necessary to address valid NEO addresses ✓ assetneo, gas and the number of asset ID-amount assets sent e.g 1.0-you can use the URI key to map the NEO transaction attribute key URIKEYNEO transaction attribute to describe the hash ecdh02 of the contractHash0x00 contract, ecdh030x02,0x03 public key for ECDH key exchange script0x20 transaction additional verification vote0x30 Url address descriptionUrl0x81 description hash2,hash3,... Hash250xa1,0xa2,... 0xaf is used to store the custom hash value remark,remark2, … Remark150xf0,0xf1,... 0xff remarks refer to the native asset address name hash NEOc56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9bGAS602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7 example
Start trading to the specified address
Neo:AeNkbJdiMx49kBStQdDih7BzfDwyTNVRfb
Start a transaction with an unspecified number of NEO
Neo:AeNkbJdiMx49kBStQdDih7BzfDwyTNVRfb?asset=neo
Start the transaction from 1NEO to the specified address
Neo:AeNkbJdiMx49kBStQdDih7BzfDwyTNVRfb?asset=neo&amount=1.0
Start a transaction with 1NEO to the specified address and the transaction is described as "hello"
Neo:AeNkbJdiMx49kBStQdDih7BzfDwyTNVRfb?asset=neo&amount=1.0&description=Hello
Start the transaction from 0.1GAS to the specified address. Place the public key in the ecdh02 property field to allow the sender to use ECDH encryption. The transaction attribute is described as "hello"
Neo:AQc5mtFayAdoCK13BW1cGAzAHyo9SoUWe7?asset= gas&amount=0.1&ecdh02=02ed53ad58c838435d4dd7a4b25c1eba01384c814ca53a539405434807afbb04b4&description=Hello
This should be sufficient to facilitate the safe transfer of NEO native assets.
Intelligent contract calls URI
In order to invoke the smart contract, we need to specify the operations in which the script hash and the smart contract are invoked and provide the required parameters. In this way, the application can customize the screen interface to match the invoked operation with pre-populated information. For example: NEP-5 token transfer, voting, etc. What the user needs to do is authorize / sign and trade.
As mentioned earlier, the invocation of a generic smart contract does not necessarily apply to URI. This is because of both security and availability. URI clients should be 100% sure that the URI they use will achieve the desired results. Limiting it to a subset of contract operations can solve most complex problems. If the client wants to be more secure, it can build its own whitelist in a subset of each supported smart contract URI.
Any addition to the supported contract URI should follow the same process as other NEO improvement proposals. In order to add a supported smart contract URI, the action / proposal should have the following …
1. Do not specify application
two。 After a good test
3. Good documentation and easy to use by the client
Examples of 4.URI usage
NEP-5 token transfer
The transfer of NEP-5token is a call to the smart contract and has the following URI.
Neo:?asset= [? amount=] [?] URI KeysKEYDESCRIPTIONREQUIREDaddress valid NEO address for transfer. ✓ asset valid contract hash in big endian format. Number of token sent by ✓ amount. E.g 1.0-exampl
Start transferring 10ONT to the transaction Begin at the specified address
Neo:AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y?asset=ceab719b8baa2310f232ee0d277c061704541cfb&amount=10
Start transferring a non-specified number of ONT to a specified address for transaction
Neo:AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y?asset=ceab719b8baa2310f232ee0d277c061704541cfb
Principle
URI needs to consider ease of use and security concerns for users and wallet developers, especially when executing arbitrary smart contracts. Compared with smart contract calls, we can use URI related to the transfer of native assets to achieve security more easily.
This is the end of the article on "how to improve the Protocol in NEO". Thank you for reading! I believe you all have a certain understanding of "how to improve the Agreement of NEO". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 296
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.