Skip to content
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

The source of a card #366

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 7 additions & 17 deletions ERCs/ERC20/ERC20-TokenScript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<ts:syntax>1.3.6.1.4.1.1466.115.121.1.36</ts:syntax>
</ts:type>
<ts:origins>
<ethereum:event type="Approval" filter="${to}=${ownerAddress}" select="to"/>
<ethereum:event type="Approval" filter="${to}=${ownerAddress}"/>
</ts:origins>
</ts:attribute>
<ts:item-view xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
Expand All @@ -103,22 +103,12 @@
</ts:card>

<ts:card type="activity" name="approvalObtained">
<ts:attribute name="amount">
<ts:type>
<ts:syntax>1.3.6.1.4.1.1466.115.121.1.36</ts:syntax>
</ts:type>
<ts:origins>
<ethereum:event type="Approval" filter="${to}=${ownerAddress}" select="amount"/>
</ts:origins>
</ts:attribute>
<ts:attribute name="from">
<ts:type>
<ts:syntax>1.3.6.1.4.1.1466.115.121.1.36</ts:syntax>
</ts:type>
<ts:origins>
<ethereum:event type="Approval" filter="${to}=${ownerAddress}" select="from"/>
</ts:origins>
</ts:attribute>
<!-- attributes like amount, from, to shouldn't need to be
defined here because they are implied -->
<ts:source>
<!-- contract="…" is missing, this might be a problem -->
<ethereum:event type="Approval" filter="${to}=${ownerAddress}" />
</ts:source>
<ts:item-view xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<style type="text/css">&style;</style>
<script type="text/javascript">&item-view-approvalObtained.en;</script>
Expand Down
3 changes: 2 additions & 1 deletion schema/tokenscript.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<element name="card">
<complexType>
<sequence>
<element ref="asnx:module" minOccurs="0" maxOccurs="unbounded"/>
<element minOccurs="0" name="label" type="ts:text"/>
<element minOccurs="0" maxOccurs="unbounded" ref="ts:attribute"/>
<element minOccurs="0" maxOccurs="unbounded" ref="ts:selection"/>
Expand Down Expand Up @@ -253,7 +254,7 @@
</element>
<!-- label is not needed if the attribute is only used for selection -->
<element minOccurs="0" name="label" type="ts:text"/>
<element ref="ts:origins"/>
<element minOccurs="0" ref="ts:origins"/>
</sequence>
<attribute name="name" use="required" type="NCName"/>
<attribute name="oid" type="NMTOKEN"/>
Expand Down