►
From YouTube: TokenScript Weekly Meeting 20200130
Description
No description was provided for this meeting.
If this is YOUR meeting, an easy way to fix this is to add a description to your video, wherever mtngs.io found it (probably YouTube).
A
Previously,
we
were
talking
about
planning
to
do
to
look
at
cause
paper,
which
summarized
a
few
of
our
previous
meetings
on
how
to
produce
signed
attestations
that
can
be
used
in
protocols
like
sending
either
to
someone
by
email
and
let
and
allowing
the
recipient
to
redeemed,
either
from
the
sender's
smart
contract
using
attestation
that
that
that
is
going
to
be
next
week.
So
this
week
we
are
doing
some
discussing.
How
do
we
do
the
event
so
previously
Boone
explained
to
Boone
and
James
had
an
event.
A
Events
and
events
on
user
interface
is
called
activities,
and
it's
not
strictly
related
to
our
notifications,
which
is
something
we
build
in
our
four
wallet
and
nothing
to
do
with
the
likely
not
to
do
with
token
script,
but
the
event
is
something
that
is
in
a
token
script.
So,
let's
look
at
a
moment.
Let's
look.
A
A
A
Here-
and
this
is
a
this-
this
object
is
used
to
capture
event
and,
as
you
can
see
that
the
the
the
in
the
event
there
are
secret,
there
is
a
sequence
of
five
elements.
This
event
is
a
theorem,
ENS
name
transfer.
So
how
many
this
event
means
that
you're
someone
transferred
a
DNS
name
chosen,
but
someone
else.
So
this
is
a
generic
definition
of
the
event
in
order
to
capture
it
from
blockchain
events
and
the
way
to
use
it
is
and
is
not
here
the
ways
to
use
them.
A
First,
look
at
this,
and
this
is
actually
butan
for
the
attribute
code
name,
which
is
a
distinct
attribute.
We
have
distinct
equals
true
here,
which
means
that
every
distinct,
every
distinct
instance
of
this
attribute
represents
a
separate
token.
So
let's
say
you
have
quite
a
few
and
if
hyrum
names
and
they
are
distinct
by
the
name
attribute-
let's
say
there
are
three
distinct
names.
That
means
you
have
three
ENS
named
tokens,
so
we
used
to
use
the
origin
method,
which
is
to
define
origin
element.
A
That
indicates
which
contract
is
the
holding
contract
and
you
can
do
get
balance
to
find
out.
The
instances,
but
that's
not
flexible
enough
because
for
contracts
like
ENS
name,
there
is
no
gap,
balance
method
where
you
can
simply
get
a
list
of
tokens,
so
this
attribute
based
method
and
is
more
flexible
and
elegant.
In
a
sense,
the
origins
of
this
attribute
is
a
event
with
the
reference
of
event.
After
the
data
object.
Definition
in
the
contract
section,
this
name
registered
name
registered
and
contract
name
here,
contract
name
here
and
there's
a
future
here.
A
The
future
has
owner
equals
to
on
their
address.
Now
we
know
that
owner
address
is
a
implicit
variable.
Is
the
is
users
handset?
Then
it's
the
users
address.
If
it's
not
on
the
market,
then
it's
the
donors
address
so
by
owner
equal
to
own
address,
we're
filtering
events
whose
own
their
value
is
owner,
which
means
that
this
is
incoming
transfer
transfer,
because
you
could
have
a
transfer
outside
of
your
wallet.
That
would
be
different
event,
but
this
one
is
about
incoming
transfer.
C
A
Okay,
well,
so
then
we
have
cards,
that's
the
the
usual
components
of
token
scripts.
Peugeot
spirit
has
a
decorative
components.
These
are
decorative
and
then
they
have
presentation
components.
These
are
presentation
decorative,
meaning
that
it's
the
minute
data
is
how
to
extract
that
happen.
Token,
how
to
extract
data
from
smart
contracts
and
cards
here
represent
the
the
user
interface
element.
So
we
have
token
card
as
usual,
which
is
the
user
element
using
to
face
for
for
a
token,
and
then
we
have
this
sample
code.
We
simply
say
hello,
token,
there's
the
content.
A
Now
we
have
view-
and
we
have
view
account
if
ID
that's
just
two
different
ways
to
display
token.
Sometimes
you
need
to
display
token
info.
Sometimes
you
need
to
display
token
as
a
unified
form
and
that's
the
end
of
token
card.
This
is
the
typical
token
script
structure.
The
new
things
here
is
the
new
token
card
code
event,
and
it
has
a
reference
to
the
name
registered
and.
A
A
A
A
So,
look
at
this.
There
is
a
converted
ID
to
X
star.
This
is
the
event.
Look
at
the
left
left
user
interface,
one
two,
three
four
from
top
to
down
the
fourth
one.
This
is
convert
X
not
to
die,
that's
a
that's
an
activity
that
is
I
qualified,
so
in
case
of
either
in
case
of
ENS
name,
you
would
say
that
obtain
DNS
name,
column
followed
by
the
actual
name,
and
if
you
click
that
event,
you
will
open
the
event
card
with
the
detail
of
that
event.
A
A
A
A
Hope
you
mean
this
one
okay,
so
so
the
question
is:
why
do
I
have
to
filter
it
twice?
So
this
the
first
future
is
used
in
attribute
definition.
I
should
be
a
pipe
attribute
type
is
where
how
well
the
reason
we
call
it.
Actually
you
type
in
not
actually
beauties
because
there
doesn't
have
there
isn't
real,
actually
good
evaluated,
it's
a
type
okay,
so
the
filter
here
is
used
to
obtain
lots
of
actually
builds
and
and
because
this
is
a
distinct
attribute
type.
This
allows
the
this
one
allows
the
the
mobile
wallet
or
the
market.
A
A
A
A
Okay,
so
so
when
the
event
happens,
this
is
a
this.
This
event
card
is
drawn
as
many
times
as
there
are
events
and
this
one
which
matches
this
future
and
this
card
join
as
many
events
as
matching
in
this
future,
and
this
one
attribute
definition
results
in
token
as
much
as
as
as
many
many
times
as
this
one,
so
their
numbers
are
different.
A
Let
me
give
me
give
you
example:
let's
say
you
received
a
token,
your
name,
let's
say:
what's
a
favorite
name:
idream
apple,
yeah,
okay,
let's
say
we
receive
the
ENS
name
called
Apple,
and
then
you
sent
it
to
we
will
and
we
will
decided
that
he
doesn't
like
it
and
he
send
it
back
to
you
now.
You
have
one
attribute
and
one
element,
because
this
is
a
distinct
element,
definition,
distinct,
attribute
definition.
You
only
have
one
distinct
edge,
the
distinct
name
which
is
Apple,
which
is
in
your
hand.
A
A
Actually
there
are
these:
they
each
have
one
they
each
have
one.
This
did
so
so
this
didn't
make
it
interesting.
Let's
say
which
we
change
in
five
times.
Okay,
so
you
send
it
to
me
and
I,
send
it
back
to
you,
then
the
this
event
card
when
we
joined
five
five
times
and
this
event
card
will
be
joined
five
times
to
so
by
counting
them.
You
get
different
countries
out,
then
you
see
how
different
they
are
right.
A
The
other
example
is,
if
you
sent
a
way
that
token
Apple
to
me,
let's
say
we
exchanged
five
times
and
a
sixth
time
you
sent
it
to
me
and
I
never
send
it
back
to
you
now
that
ho
is
huevos.
So
in
your
wallet
you
get
zero
tokens
and
because
there's
no,
no
event
that,
where
the
last
occurrence
of
which
has
your
name
in
it
and
on
the
other
hand,
the
event
that
says
obtain
new
names.
You
have
five
times
and
the
event
that
says
that
you
lost
the
name.
B
A
A
A
Because,
in
the
token
script-
and
we
defined
that
this
token
script
is
interested
in
two
types
of
events
actually
2
2
tab,
there
are
two
event:
two
cards,
meaning
that
token
script
should
be
interested
in
the
event
name
register
if
it
matches
this
condition
or
if
it
oh,
if
it
matches
this
condition
there.
That's
why
there
are
two
events,
because
you
had
the
toggle
script
says
whether
this
token
script
thinks
the
owner
should
be
interested
in
the
event.
That's
coming
out
talking
about
coming
to
you
the
event.
That
is
that
you
lose
the
token
so.
A
A
A
A
A
So
so,
first,
and
how
many
instances
are
there?
In
the
token,
are
we
still
talking
about
ENS?
Yes,
okay
and
that's-
that's
actually
I
didn't
capture
this.
So
let's
say
we
have
this.
We
have
this.
We
need
to
do
something
about
it.
If
it's
a
if
it's
just
the
normal
balance
is
easy,
because
the
number
of
instances
doesn't
change
so
don't
have
to
come
comment
tokens
are
there,
it's
simply
that
it
only
if
you
have
a
100
either
or
you
have
one
is.
There
is
one
coca.
A
A
So
something
has
to
be
done
about
in
this
section,
which
means
actually
from
your
point.
It
sounds
like.
Actually,
we
should
get
a
region
element
back
because
in
this,
in
this
event,
dot
XML
is
a
playground
file
that
we
try
different
designs
and
it
that
it
seems
it's
impossible
to
capture
the
event
that
the
talk
is
sent
away,
and
originally
we
use
a
origin
element
to
describe.
How
do
you?
How
do
you
get
the
instances
of
elements
with
all
you
should
get
that
one
back.
A
Because
if
you,
for
example,
if
you
use
and
if
you
used
I,
to
buy
a
ether
you're
guaranteed
to
get
more
than
one
event,
one
event
is
that
you
lose
some
died
and
the
other
event
is
you
get
some
ether.
So
the
event
transaction
relationship
is
like
and
if
you
have
multiple,
if
you
have
multiple
events
under
the
under
and
this
season,
I
was
I
was
I
was
about
to
find
using
the
face,
but
I
couldn't
find
one.
A
A
Yes,
I
know
this
said
this
most
most
contract
writer
probably
would
write
batch
transfer
in
such
a
way
that
it's
a
multiple
calls
through
a
proxy
contract
and
sorry
by
the
contract,
multiple
call
to
the
same
token
contract
and
transferred
multiple
times
in
one
transaction,
but
in
FIFA
take
a
case
we
did
batch.
We
built
a
batch
transfer
within,
so
it's
really
up
to
the
tokens.
Smart
contract
author.
If
the
author
decides
that
he
produced
an
event
with
array
in
it
like
this
one,
but
instead
of
you
int
it's
an
array
and
then
you
can.
A
You
can
have
one
event
with
multiple
items
and
that
affects
the
display
as
well,
so
in
if
you
write
smart
contract
in
the
way
we
write
it,
which
is
producing
a
single
event,
no
matter
how
many
tickets
are
being
transferred,
then
you
write
corresponding
token
script
and
in
the
user
interface
activity
tab
for
imagination
purpose.
Let
me
switch
this
okay
in
the
activity
tab
and
you
will
see
one
single
event
with
a
lot
of
with
the
information
about
all
that
all
the
tickets
you
have
transferred.
B
Yeah
so
Italy
when
single
event
I
transferred
there
can
be
more
than
one
instance
of
the
token
being
transferred.
So
my
point
is
when
you
say
that
we
need
to
add
something
to
approximately
nine
twenty
to
handle,
transferring
out
sending
of
tokens
I'm
saying
that
9:28
esposo
to
be
modified
in
order
to
handle
receiving
of
tokens.
We
can
assume
that
there
is
just
one
instance,
incoming
yeah.
A
That
you
are
presenting
a
really
challenging
situation
where
the
smart
contract
author
decidedly
not
implement,
get
balance
forcing
us
to
find
a
distinct
instance
of
the
token,
through
events
and
the
same
author
simply
decided
to
have
one
event
hired
for
multiple
token
transfer,
making
us
clueless
about
like
a
common
instance.
The
the
thing
happens.
So,
yes,
if
my
contract
is
written,
that
way
actually
don't
have
a
good
idea
how
to
save
a
situation.
A
A
A
So,
there's
no
way
to
access
a
list
of
events
from
smart
contracts,
although
you
can
produce
them
in
smart
contract
and
you
can
index
them
from
outside
smart
contract.
But
you
cannot
do
this
inside
smart
contract,
which
disabled
the
last
resort,
which
is
to
write
a
View
Function,
deploy
your
own
contract
and
just
to
return
these
events
that
that
way
is
blocked.
A
So
in
this
case,
there's
no
way
to
solve
it
in
the
declarer
declare
in
the
in
a
declaration
fashion
like
we
do
in
token
script,
so
we
probably
would
allow
if
we
still
want
to
be
compatible
with
those.
We
probably
need
to
allow
programming
in
this
very
specific
section.
It's
a
little
bit
and
the
reason
I
want
to
avoid
programming
and
use
declarative
directives
like
this
is
you
know
you
can
hardly
make
assumption
of
the
environment.
For
example,
our
application
uses
iOS
and
Java
in
android.
A
So
if
we
interpret
script
and
build
our
own
notification
chain
or
what
should
be
done
with
a
certain
attribute,
we
can
build
our
implementation
in
any
language.
But
once
you
introduce
a
get
instance
method
that
allows
a
piece
of
JavaScript
to
find
how
many
instances
of
tokens
you
have
by
looking
at
the
events
and
do
some
algorithm,
then
you're
pretty
much
restricted.
The
the
environment
could
be
JavaScript
as
well.
A
B
B
A
So
don't
know
how
many
already
deployed
it's
my
country
has
this
problem,
so
this
distinct
having
this
having
distinct
element
was
the
idea
that
maybe
we
can
we
can.
We
can
use
attributes
to
to
identify
instances
of
a
token,
but
look
like
it's
it's
not
that
easy
I
mean.
Maybe
I
will
come
up
with
an
alternative
design
where
we
have
either
use
origin
element
or
we
enrich
the
method
of
distinct
element.
A
Distinctives
and
the
distinct
method
is
more
elegant
because
you
can
do
the
same
on
balance,
you
can
simply
say
the
ID
is
token
ID
and
the
origin
of
which
is
a
smart
contract,
vo
core
to
get
balance,
and
you
apply
distinct
equal
to
true,
then,
no
matter
how
many
token
IDs
are
returned.
You
get
this
number
of
instances.
A
A
A
Don't
even
know
if
they
actually
fire
event
that
contains
the
address
of
the
person
who
lose
the
token
in
ENS.
They
could
have
done
it
in
such
a
way
that
don't
you
only
get
event
where
the
receiver
hasn't
its
addresses
mentioned
in
the
event,
and
they
don't
have
an
event
for
that
at
all.
In
that
case
hold
up.
How
do
we
capture
that
yeah.
B
A
A
A
D
A
That's
a
nice
question.
First,
if
it's
really
kitty,
you
probably
will
be
using
instead
of
origin
from
events,
you
put
a
use
origin
from
Fung,
which
is
good
element
which
is
more
elegant,
and
the
second
is
that
this
event,
we
have
have
defined
a
special
outgoing,
true
equals
true,
which
means
it's
only
applicable
if
there
is
a
result
in
the
first
one
and
based
on
the
first
one,
everyone
else
has
to
go
through
the
second
future.
So
actually
this
should
be.
D
D
A
Yeah,
so
the
the
in
this
case,
the
attribute,
is
not
relevant
to
you
anymore,
because
this
attribute
is
used
to
identify
how
many
instances
you
are
and
because
that
future
returns
zero.
You,
you
get
no
tokens
and
you
simply
don't
have
a
token
card.
Then
these
tokens
chunks
will
be
loaded
and
then
quickly,
discarded
and.
D
A
Can
cool
yeah
the
trash
can
concept
is
a
bad
one,
because
once
you
add
trash,
can
people
don't
the
stuff
say:
okay,
what
if
I
have
a
token
someone
adopting
your
token
I?
Don't
want
have
it,
but
if
you
cannot
delete
it,
what
do
you
do
you
hide
it
and
that's
what
isn't
fresh
can?
So
if
the,
if
the
kitty
is
solid,
then
it
should
not
be
in
cash
can
because
trash
can
is
already
used
for
different
concept.
A
My
activities,
yes,
and
when
you
do
a
click
event
in
the
activity,
the
prospect
changes.
So
let's
say
if
you,
if
you
click
the
kitty,
you
just
Ransford
away
in
this
case,
you
you
are,
you
are,
you
are
clicking
that
event
and
that
event,
it
has
a
token
ID.
That
event
has
a
very
specific
identifying,
actually
be
like
name
ID.
So
it's
no
longer
running
the
distinct
future,
because
you
are
already
calling
that
object
by
name.
A
D
A
What
are
you
no
intention
of
using
our
region?
Is
it's
easy
to
mix
other
sources
like
attestation?
You
can
sign
a
message
from
someone
in
instant
messenger:
it's
not
an
abduction,
but
it
has
to
be
displayed
as
a
token
because
you
can
sell
it
so
so
you
can,
according
to
some
smart
contract.
Therefore
you
need
to
write
an
origin
that
attestation
is
somewhere,
but
you
can
argue
the
other
way
around
that
you
can
also
so
use
distinct
and
then
in
the
distinct.
You
have
origin
which
says
attestation
and
it
you
can
even
argue.
A
A
Maybe
you
won't
have
a
look
at
you,
the
the
correspond
use
interface
yeah,
and
then
we
look
at
if
you
have
any
question
there,
so
this
is
user.
User
interfaces
are
for
quality
in
for
implementation.
Of
course,
you
can
have
your
own
implementation
if
you
make
a
marketplace
which
uses
token
script,
to
represent
the
elements
or
returns,
what
happened
in
our
elements
like
a
universe
again,
if
the
skanky
users
and
they
probably
have
different
interface.
This
is
sorry
for
wallet.