Skip to content

Commit 9409fb1

Browse files
author
Weiwu Zhang
committed
half-way attempt to divide the ERC into 2
1 parent 582f80f commit 9409fb1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ERCs/ERC5XXX draft.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
### eip: 5???
2-
### title: Client Script extension for Token Contracts
2+
### title: Client Script URI for Token Contracts
33
### 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)
55
### discussions-to:
66
### status: Draft
77
### type: Standards Track
88
### category: ERC
99
### created: 2022-05-03
1010
### requires:
1111
### 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.
1313

1414
### 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.
1616

1717
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.
1818

1919
Each scriptURI semantically contains access information to access a *single* signed script, stored in one or more off-chain locations.
20+
2021
Concretely each element in the array contains a pair of URIs, one to the script itself, and one to a signature of the script.
2122

2223
The script provides a client-side executable to the hosting token. Examples of such script:
2324

2425
- A 'miniDapp', which is a cut-down dapp tailored for a single token
2526
- a 'TokenScript' which provides [T.I.P.S.](https://tokenscript.org/TIPS.html) from a browser wallet.
2627

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.
2829

2930
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.
3031

0 commit comments

Comments
 (0)