Skip to content

Commit 734c74b

Browse files
committed
Completed: 1. all attribute element under the token can have only one attribute distinct with value true. 2. TokenScript that did not define <origins> under <token>, require at least one of the <attribute> has distinct.
1 parent 814c7fb commit 734c74b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

schema/tokenscript.xsd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
<element minOccurs="0" maxOccurs="unbounded" ref="dsig:Signature"/>
5252
</sequence>
5353
<attribute name="custodian" type="boolean" default="false"/>
54-
<!--assert test="if(not(ts:origins)) then (count(ts:attribute[string(@distinct) = 'true']) = 1) else true()"/-->
54+
<assert test="count(ts:attribute[string(@distinct) = 'true']) le 1"/>
55+
<assert test="if(not(ts:origins)) then count(ts:attribute[string(@distinct) = 'true']) = 1 else true()"/>
5556
</complexType>
5657
<keyref name="typeRef" refer="ts:namedTypeName">
5758
<selector xpath=".//ts:origins/ethereum:event|.//ts:origins/ethereum:call"></selector>

0 commit comments

Comments
 (0)