-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
draft new ERC for contract working with ts #430
Draft
SmartLayer
wants to merge
785
commits into
main
Choose a base branch
from
new_ercs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+65,534
−199
Draft
Changes from 1 commit
Commits
Show all changes
785 commits
Select commit
Hold shift + click to select a range
c0bf838
added redeemed text, compressed images
rosieprom 385d51b
Update README.md
zhangzhongnan928 e314954
Update README.md
zhangzhongnan928 a66acd4
Update README.md
zhangzhongnan928 6030f0c
fixed shared.css to work on Android/iOS
rosieprom 81c7f3d
changed the background image and some height issue fix
rosieprom 0ed4344
Merge pull request #291 from AlphaWallet/UEFA-redeem-item
bitcoinwarrior1 ea23654
WIP add basic edcon draft TokenScript
bitcoinwarrior1 48a8c83
Merge pull request #298 from AlphaWallet/edcon
zhangzhongnan928 a25a702
add base files for alipay
bitcoinwarrior1 fa6df2c
add location info to edcon
bitcoinwarrior1 2157ef9
add pickup to alipay
bitcoinwarrior1 9876fde
populate with sample contracts and info
bitcoinwarrior1 e78db85
Merge pull request #299 from AlphaWallet/alipay
bitcoinwarrior1 6b71301
rename AliEuro TokenScripts
bitcoinwarrior1 93f542c
fix up names
bitcoinwarrior1 12ef7fb
AliEuro TokenScripts with layouts
bitcoinwarrior1 7ffa49c
Merge pull request #301 from AlphaWallet/airport-dropoff
bitcoinwarrior1 7c7f5d1
alipay amended css
rosieprom 7ed41f5
fixed alipay styled css
rosieprom f48d84e
Merge pull request #302 from AlphaWallet/alipay-style-fixing
bitcoinwarrior1 3760319
made the edcon ts ticket layout
rosieprom bbc4dd1
changed background images to new design
rosieprom e857b61
Merge pull request #303 from AlphaWallet/edcon-layout
bitcoinwarrior1 c181b7e
added new background image
rosieprom 094fc8e
Merge pull request #306 from AlphaWallet/edcon-layout-fix
bitcoinwarrior1 5330f2c
blank ticket template done for tokenscript
rosieprom 11693a0
Merge pull request #305 from AlphaWallet/blank-template-example
bitcoinwarrior1 84bca45
add Chinese to UEFA
bitcoinwarrior1 e2d8697
allowing multiple views in <action> or <token-card>.
c3a434e
Merge pull request #308 from AlphaWallet/translate-uefa-to-chinese
bitcoinwarrior1 9d4ae62
this is the 1st part of a 3-part serial
4c82e73
Replace logo and title used in UEFA ticket
hboon aeb70fc
Merge pull request #315 from AlphaWallet/replace-logo-and-title-used-…
bitcoinwarrior1 a8b4b17
change Makefile in UEFA to have name AlphaWallet
bitcoinwarrior1 fab82fa
Create The tech stack for tokenising tickets on public blockchain
zhangzhongnan928 b45e753
Update The tech stack for tokenising tickets on public blockchain
zhangzhongnan928 7a2de64
Delete The tech stack for tokenising tickets on public blockchain
zhangzhongnan928 dbfa630
Add files via upload
zhangzhongnan928 dd312c1
change Makefile to use Shankai name
bitcoinwarrior1 9d5bdfd
Merge branch 'master' of https://github.com/AlphaWallet/TokenScript
bitcoinwarrior1 a8d241c
add starwars sports tickets
bitcoinwarrior1 27d4e28
adjust fonts
bitcoinwarrior1 6eb8873
rename star wars sports
bitcoinwarrior1 6036512
rename legacy DAI to SAI
bitcoinwarrior1 8241ed8
add cDAI TokenScript
bitcoinwarrior1 43146fb
change bridge to use DAI rather than SAI
bitcoinwarrior1 a5ae9ff
add SAI Migration TokenScript to replace bridge
bitcoinwarrior1 f7a3527
update images of DAI
bitcoinwarrior1 8d7a1fa
remove examples, resources and tutorial while changing the readme to …
bitcoinwarrior1 2bf1c44
Merge pull request #324 from AlphaWallet/adapt-for-examples-repo
bitcoinwarrior1 6954bbb
add why XML section
bitcoinwarrior1 6216a04
Merge pull request #327 from AlphaWallet/add-why-xml
bitcoinwarrior1 0e2414a
adding a few paragraphs to explain the difference between signing a t…
99d9217
allowing event card in <cards>
8937839
rename <token-card> to <token>
188a33d
adding asnx schema and changing view to include only javascript and s…
7ef248b
adding xhtml:body to support html (abeit with namespace, meaning norm…
4dba0d6
changing view-iconified to item-view because
f1eafb6
reading for being published as 2020-03 schema
ab16fd6
reversing a seemly mistaken change. I never intended sub-elements und…
d666d74
turn aciton from an element with local definition to an element from …
4b807dc
Update JavaScript doc with API for TokenScript view container access.…
hboon 2a4b5f1
change action back to a global element so it can be uesd as root element
b5e322e
Update design_paper.md
zhangzhongnan928 daac10d
Change licence to MIT
bitcoinwarrior1 fb75e7b
Merge pull request #334 from AlphaWallet/zhangzhongnan928-patch-1
bitcoinwarrior1 f006805
Merge pull request #335 from AlphaWallet/change-to-mit
zhangzhongnan928 905630c
Update README.md
zhangzhongnan928 e0eec08
a minimalist asnx schema for urn:ietf:params:xml:ns:asnx namespace, j…
696f96d
adding comments
17e8a06
adding ethereum namespace for ethereum-only attributes
9da9964
forgot this spot (adding indexed attribute) in the last commit
72ebaeb
now allowing actions to have two attributes: exclude and available-to…
86bec1a
using xml.xsd we hosted instead of w3c's which sometimes becomes unav…
458ad81
remove the <selections> elements which we no longer use
6dd7429
finish removing <attribute-types> and <selections>
11958b2
Update tutorial link
jzaki 3f69cd4
Fix typo
jzaki dbc31aa
Create We need a better framework for applications using blockchain 中文
zhangzhongnan928 23cf27a
add local-ref
bitcoinwarrior1 a5389a0
correct address element to variable
bitcoinwarrior1 d2edad2
move the definition of "as" attribute and "mapping" element to data w…
184c663
clarification in express-of-trust
169c6d4
upping namespace to 2020/06 for quite a few schema-breaking changes i…
4c8c830
moving etheruem calls to its own namespace
72b0c15
renaming name to label
4f976b6
for attribute-types, changing attribute id into name
6d49229
changing <token> and <action> cards into <card type="…". detail https…
bb68d7a
fixing the sequence of the elements inside cards - we can always rela…
18f2352
add e6 which replaces #350
bitcoinwarrior1 ff5cc21
Merge pull request #348 from AlphaWallet/rename-names
aaad8c4
Merge pull request #332 from AlphaWallet/schema/2020/03
bitcoinwarrior1 8e85f5a
Merge pull request #345 from AlphaWallet/schema/2020/06
bitcoinwarrior1 740be6d
introducing <ethereum:transaction> based on <ethereum:call>
67d54e0
Merge pull request #353 from AlphaWallet/rename-names
bitcoinwarrior1 0225d2b
add in local-ref to ethereum:value (#354)
bitcoinwarrior1 f630edf
reformat - wanted to do this for a long time but schema has always be…
7748505
Merge pull request #356 from AlphaWallet/reformat-schema-files
bitcoinwarrior1 c0cffe2
moving attributes' type definition into its own element
62f1d2f
Merge pull request #358 from AlphaWallet/type-in-attribute
bitcoinwarrior1 02e8457
rename id to name for all <selection>
6f046d5
using asnx module correctly, as per RFC4912, to include sequence in a…
7856914
Merge pull request #359 from AlphaWallet/id-and-asnx-module-correction
bitcoinwarrior1 ed478c1
add sample activities for ERC20 & ERC721
bitcoinwarrior1 264e30c
directory structure - the ERCs implemented in TokenScripts are real t…
c88ab21
adding README
1c02db0
relax schema rules so that ERCs can be implemented in TokenScript
92dd2be
updating tokenscript to validate
a3cde51
Fix: TokenScript file for ERC20 should not have string interpolation …
hboon 6484039
Merge pull request #361 from AlphaWallet/fix-erc20-filter-lhs-no-stri…
bitcoinwarrior1 b218c77
Fix: TokenScript file for ERC20's ownerApproved filter
hboon 8d22e0c
Merge pull request #362 from AlphaWallet/fix-erc20-filter-ownerApprov…
bitcoinwarrior1 bf75453
modifies readme for tokenscript
c506dc1
RFC4912 required a <type> for a named type that defines a type
5c260b1
apply the same RFC4912 comformation change to the default ERC scripts
a632653
corrisponding change in ERC72 was left out in the last commit
b19b8d5
Fix: TokenScript file for ERC20's activity filters not using correct …
hboon 4927e61
link correction
5422a58
allowing contracts to be absent in ethereum:*
5337776
format editing
ed69c84
Remove "Don't we already have a front-end for tokens?"
ba1d9e6
Merge pull request #363 from AlphaWallet/origin/readme-updates
8c2cd61
Merge pull request #368 from AlphaWallet/fix-erc20-activity-event-fil…
bitcoinwarrior1 a517d0d
adding JavaScript xmldsig verification example (#369)
364ad54
updating the tokenscript schema README to explain the release cycle. …
745b503
RFC4912 required a <type> for a named type that defines a type
44ae8ad
apply the same RFC4912 comformation change to the default ERC scripts
af0b3a3
corrisponding change in ERC72 was left out in the last commit
9dbe81f
allowing <origins> and allowing empty <asnx:element>
eb0aadc
making ERC721 compatible with the <origins> style too
c5d3a76
retro-rename the 3rd element in ERC20 transfer/approve events to amou…
746e7b5
Add the link to basic tutorial
zhangzhongnan928 d076ff6
Merge pull request #365 from AlphaWallet/correct-violation-of-rfc4912
b1df515
Update JavaScript doc with API to separate token and card attribute d…
hboon 98064be
revert a change in the previous version which forced asnx:element to …
a5d310b
forgot a few patches in the previous comment that replaces card attri…
3f74249
ah still wrong, correcting LHS field name
9d8061e
Merge branch 'master' into correct-violation-of-rfc4912+add-origins-i…
72afaba
adding the keyref constraints on the newly added card/origins's events
ea565c9
requiring contract in Ethereum Event as Sangalli would need
2bc5140
Merge pull request #373 from AlphaWallet/correct-violation-of-rfc4912…
543008b
adding use="required" to the attributes that needs it
6676cc4
make function required when calling, optional when making a transaction
a24e1e2
refactor type to allow token/activity/action cards to have different …
e16561a
taking <cards> out to a global element so that it can be used as root…
660967c
refactor view as we only need them in cards
ebb8f9f
allowing guide-view
ef180f3
requiring name for cards, reasons explained https://community.tokensc…
6c1dbd7
attempt to make the keyref enforcement work on ethereum:call's type a…
9361fcd
Resolved issue - The XPath expression //ts:origins/ethereum:event|//t…
darakhbharat 0b02703
introducing distinct as per previous ts meeting
5e5c5a2
introducing distinct as per previous ts meeting
5ac912d
unify token as top level element & as reference, both allow name
7c17ce5
Fix: TokenScript file for ERC721's activity filters not using correct…
hboon 3cf25b6
Merge pull request #385 from AlphaWallet/fix-erc721-activity-event-fi…
bitcoinwarrior1 f3e88c2
Fix: TokenScript view files for ERC721's activity for reference to `t…
hboon c4ca79f
distinct attribute is not allowed for attributes in <card>, only if i…
darakhbharat 879faf0
Merge pull request #386 from AlphaWallet/fix-erc721-activity-views-re…
bitcoinwarrior1 73020c6
Completed: 1. all attribute element under the token can have only one…
darakhbharat aae2315
Merge branch 'master' into distinct
darakhbharat 1faec47
formatting changes
darakhbharat 29cf1f6
XSLT is not needed for xml.xsd
68d20ad
Merge branch 'master' of github.com:AlphaWallet/TokenScript
40cab86
update web3 data changed callback
bitcoinwarrior1 656935f
Merge pull request #394 from AlphaWallet/update-callback-to-token-data
bitcoinwarrior1 bc0020b
Merge pull request #388 from AlphaWallet/distinct
1783424
providing a basic frame for using tokenscript on a web page
62cd231
adding notes on future extensibility
91dfb67
first version handed to Oleg
d768428
new version with TokenNegotiation
a8f6332
realised that doing .then() on the 2nd round of negotiation isn't nec…
c6bfc94
using meta correctly + using x.509 convention that objectClass be in …
370970a
added bootstrap.js to parse XML and updated entry-token.html(fixed er…
oleggrib bde9349
sample JSON to be transformed from module
bc9b9d3
breaking down the negotiation into active/passive pair
5a29fac
refactored bootstrap.js , created Negotiator global object to parse X…
oleggrib c50854b
James Brown provided a new contract address for Rinkby
e180dc7
JB updated the contract address for token holder 0x0C770da98559DD6806…
fee6705
adding definition for balanceOf
767f8d2
most of methods moved to Negotiator. Negotiator do all work to prepar…
oleggrib edf49d1
updated token ID to use tokenID=... or ownerAddress=0x...
oleggrib 8c2bd3b
adding an 2nd example with activity defined
8ed17c8
added event parsing code with console output. to run code we have to …
oleggrib df5e09e
fix : let -> var
oleggrib 658a9dc
added erc-20 activity cards pop-up
oleggrib 1ab95b0
ready to be taken into master soon, renaming directories
135a5d9
changed message for connect/disconnect network and added button to Co…
oleggrib 6a628bd
convert the error message to a table for better display
f640ed6
breaking things a bit by assuming passive negotiation and show the fi…
2e395bf
added upload/download XML and filters
oleggrib 491fe4e
fixed box title
oleggrib 2a5ec76
added tests, some code moved to separate module, active negotiation p…
oleggrib 6fb6c7c
every card use own iframe
oleggrib a70bc16
added live event update, new event marker, erc20 token props list and…
oleggrib e7b2887
relaxing contract name rule to allow NCName instead of ID, as contrac…
448410a
Merge branch 'master' of github.com:AlphaWallet/TokenScript
d6e7dc1
rolling back part of the change in https://github.com/AlphaWallet/Tok…
e2a8c9a
token name is required thanks to the previous merge of Oleg's token n…
4855c96
no longer using IDREF (replaced most with keyref) since many months a…
0ea2c00
allow contract reference & attribute refer to another
37c310e
allowing accessing storage
8054ba4
docs are generated from the document repository
2076527
Set theme jekyll-theme-minimal
09ed5c0
Web example: devcon issuer
nicktaras fce6c9b
switched npm package polyfill for bigint to big-integer, updated Sign…
nicktaras c81f55f
Merge pull request #411 from TokenScript/web-examples
AW-STJ 733aafd
adding flow chart for authenticator and negotiator
27cd507
adding the first js xmldsig verifier code that actually works for dem…
32b9e80
coming up with better README
ba452f5
using ES module instead of nodejs require (for webpack). Also making …
0f249d0
updating readme since most of its content is moved to the sub-directo…
f1a90c7
adding the index.js which was forgotten earlier.
882c0a6
Update README.md (#421)
zhangzhongnan928 256f2fc
version obtained from Tore which is based on an earlier version from …
c110d6a
Added Hu's suggestions
4766ecf
Changed getScriptURI to scriptURI
582f80f
wording update and dos2unix endian update
594ed57
Updated naming convention
9409fb1
half-way attempt to divide the ERC into 2
9fd0215
Merge branch 'new_ercs' of github.com:TokenScript/TokenScript into ne…
588249f
splitting ERCs into 2
66a57a2
amending to add optional contract inteface
fa51952
renaming
bd56970
Added details to both the split and combined ERCs
20e90eb
rename so every file look the same
4075999
wording update, mostly
99dc909
Refine language
58cbb65
wording update, mostly
7b0cec0
Refine language
35e0bc1
Merge branch 'new_ercs' of https://github.com/TokenScript/TokenScript…
89bc557
to make it clear ERC5XX0 doesn't require new key pairs at all
f90e119
Changed from struct to string[]
a8f92cb
Merge branch 'new_ercs' of https://github.com/TokenScript/TokenScript…
f87bebc
Added suggestion of self administration of array of scripturi
cc8dd27
Add sample implementations
JamesSmartCell f2c4901
trivial text change.
c7a9bf2
sorry James, I'm removing this large chunk because it belongs to the …
b09f0e3
Merge branch 'new_ercs' of github.com:TokenScript/TokenScript into ne…
b27266e
copy-editing, and fixing the first 4 out of 5 problems in feedback:
989f074
Tried to shorten ERC5xx0 a bit
ba00c50
Added Henderson's test case
c807aef
updated to avoid the issues Jason's feedback revealed.
37446d4
spelling
45c77b3
Update ERC5XX0 draft.md
40886c1
Update ERC5XX0 draft.md
0874e14
use download instead of location to resources
a9335d6
Tried to shorten and proof read 5xx1
931de88
Tried to shorten and proof read 5xx1
5b4e10a
more shortening
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added Hu's suggestions
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
James asked me to read:
Should
getScriptURI()
bescriptURI()
instead? More idiomatic and mentioned in other parts of this doc.Seems like it would be better to narrow down
IERC5XXX
to just:or even:
The rest looks optional and might slow adoption. If we can draw the line somewhere, the rest of the stuff can be in the reference implementation and submitted to OpenZeppelin. Without the parts that covers signature, there's a chance someone could use it in a non-TokenScript way, then the TokenScript engine or the client will need to innspect the contents referred to by the URI returned to see if it's a TokenScript file (or we might need an additional ERC165 check, but seems unnecessary).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually changed it to
getScriptURI()
since I thought it was more idiomatic 😅 But feel free to change it, if you thinkscriptURI()
is better.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a good point that it might be too broad! However, I do think that the issue we are trying to handle as a minimum requires a possibility to update the script. When it comes, to the script signing key, it could be sufficient to just use the smart contract signing key, but from the discussion with @weiwu-zhang I got the understanding that something smart was required for this ERC.
@weiwu-zhang what do you think? Should we make the script signing key optional?
In any case, it might be an idea to write a partial class instead of simply an interface, such that it can simply be copy-pasted into the base of any contract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more idiomatic because of the similarity to ERC721.
There is this snippet in that page:
tokenURI(uint256)
(and alsoname()
andsymbol()
).Also how it specifies a getter and not a setter in the specs. The OpenZeppelin contracts do contain the setter though.
I suggest to post a draft early to https://ethereum-magicians.org and request for comments. To a certain extent, as long as they like it, it's going to get more acceptance :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I have changed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scriptURI() is more coherent with existing ERC standards.
EG:
Let's keep it consistent.