|
1 | 1 | ### eip: 5??? |
2 | | -### title: Client Script extension for Token Contracts |
| 2 | +### title: Client Script URI for Token Contracts |
3 | 3 | ### description: Add a scriptURI to point to point to an executable script associated with the functionality of the token. |
4 | | -### author: James (@JamesSmartCell), Weiwu (@weiwu-zhang), Tore Frederiksen (@jot2re) |
| 4 | +### author: James (@JamesSmartCell), Weiwu (@weiwu-zhang) |
5 | 5 | ### discussions-to: |
6 | 6 | ### status: Draft |
7 | 7 | ### type: Standards Track |
8 | 8 | ### category: ERC |
9 | 9 | ### created: 2022-05-03 |
10 | 10 | ### requires: |
11 | 11 | ### Abstract |
12 | | -This standard is an interface that adds a `scriptURI()` function for locating executable scripts associated with the token. |
| 12 | +This ERC is a contract interface that adds a `scriptURI()` function for locating executable scripts associated with the token. |
13 | 13 |
|
14 | 14 | ### Motivation |
15 | | -Often NFT authors want to provide some user functionality to their tokens, e.g. through scripts. This should be done safely, without opening the user to potential scams. By packaging a link to official scripts, created by the token minter, within the token itself, users can be sure they are using the correct script. |
| 15 | +Often Smart Contract authors want to provide some user functionality to their tokens through client scripts. The idea is made popular with function-rich NFTs. This should be done safely, without opening the user to potential scams. By packaging a URI to official scripts, created by the token minter, within the token itself, users can be sure they are using the correct script. |
16 | 16 |
|
17 | 17 | This ERC proposes adding a scriptURI which is a structure containing an array of URIs to external resources, such as in IPFS, GitHub, a cloud provider, etc. |
18 | 18 |
|
19 | 19 | Each scriptURI semantically contains access information to access a *single* signed script, stored in one or more off-chain locations. |
| 20 | + |
20 | 21 | Concretely each element in the array contains a pair of URIs, one to the script itself, and one to a signature of the script. |
21 | 22 |
|
22 | 23 | The script provides a client-side executable to the hosting token. Examples of such script: |
23 | 24 |
|
24 | 25 | - A 'miniDapp', which is a cut-down dapp tailored for a single token |
25 | 26 | - a 'TokenScript' which provides [T.I.P.S.](https://tokenscript.org/TIPS.html) from a browser wallet. |
26 | 27 |
|
27 | | -To facilitate a future-proof solution, this ERC also proposes a solution which allows for updating such resources *after* the token has been issued. |
| 28 | +It is expected that the return value of scriptURI() is constantly updated to reflect the current latest version, if used. However, there is a way to assert the authenticity of signed client side code without frequently updating the URI. Developers should refer to ERC 5xx1 which detailed a method of asserting code authenticity without relying on an URI. Note that both ERCs can be used together. |
28 | 29 |
|
29 | 30 | To achieve this the token minter can use the signing key associated with the token minting and an associated smart contract, to authenticate a script/scriptURI signing key. |
30 | 31 |
|
|
0 commit comments