►
From YouTube: TokenScript Weekly Meeting 20200625
Description
00:55:01 hboon: class Cheque {
set amount(val){
console.log("setting amount")
this._amountValue = val;
}
get amount(){
console.log("getting amount");
return this._amountValue;
}
}
let cheque = new Cheque();
cheque.amount = 123;
A
C
C
A
Everybody
here,
hello,
okay,
good
good
morning
good
afternoon
and
we're
still
looking
waiting
for
james
right.
C
C
D
A
Oh
yes,
yes,
I
have
my
desktop
computer
and
actually
I
repaired
my
laptop
and
it
has
a
button
that
allows
you
to
reset
it
to
the
original
status.
A
Okay,
we're
going
to
continue
building
the
token
transmission
last
time
last
token
screen
meeting
the
topic
of
last
talking
street
meeting
was
whether
or
not
we
should
have
the
module
and
to
define
like
the
level
of
abstraction
between
module
and
data.
A
C
C
A
Okay,
stuff
like
this,
so
basically
you
might
have
this.
A
You
might
have
stuff
like
this.
This
is
not
a
javascript
videomatic
we're
just
I'm
just
showing
the
the
thinking
here.
That
is,
we
provide
a
dynamically
injected
code
that
allows
users
to
initialize
class
check
and
set
amount
and
set
reader
and
finalize
it
without
and
javascript
has
to
has
to
assemble
the
the
stuff
to
be
signed.
C
C
A
Okay,
so
so
the
idea
is
once
you
have
defined
and
once
you
have
defined
a
data
model.
A
E
Yes,
it
does
mean
that
the
developer
is
going
to
have
to
be
more
familiar
with
how
injection
works
and
he's
going
to
have
to
know
it's
less
self-contained.
But
it's
it's
quite
a
lot
safer.
I
think.
A
Yes,
so
every
every
view
will
have
come
will
come
with
different
injected
code.
A
Okay,
so
today
we
continue
from
this
conversation
and
we
look
at
how
this,
how
this
also
how
how
this
view
gets
its
get
data,
because,
in
order
to
have
such
a
tag,
the
view
has
to
understand
from
which
contract
this
is
applied
to,
because
that's
part
of
the
things
to
be
tested
that
aware
that
which
contract
contract
this
testation
can
be
applied
to.
A
A
Okay,
let
me
show
you,
let
me
show
you,
let
me
show
you
first,
I
should
be
able
to
get
this
code
from.
E
Yes,
that
one
does,
I
thought,
that's
what
you
were
talking
about.
Oh
you,
I
see
what
you
mean
yeah
you.
Could
your
code
wasn't
showing
it,
but
you
could
be
doing
it
that
way.
Yeah
okay
got
it.
C
A
Okay,
so
in
the,
if
alice
wish
to
create
a
check
that
allows
bob
to
redeem,
one
ether
alice
has
to
have
this
action
available
on
his
wrapped
ether.
Token
right.
A
E
Yeah,
okay!
Well,
I
thought.
Okay,
I
thought
you
meant
the
you
were
talking
about
the
having
native
chain
actions.
A
The
to
the
things
that
are
relevant-
okay,
okay,
okay,
so
this
is
how
it
works.
On
the
left
side
is
the
email
attestation.
A
E
And
oh,
I
see
so
that
you
mean
so
this
input
token.
This
is
like
an
equivalent
of
using
value.
So
when
you
use
value
in
the
as
an
input
in
the
token
script,
that's
like
actual
ethereum
or
actual
x
die.
So
instead
of
that
you're
saying
that
the
input
has
to
be
this
particular
token.
A
A
Okay-
and
here
will
be
here-
is
the
email
attestation.
A
A
Okay,
so
this
is
similar
to
the
one
you
have
seen
before,
and
then
we
have.
We
need
the
third
one
which
which
is
corresponding,
which
corresponds
to
the
check
that
is
created
here.
A
A
C
A
A
First,
I
think
I
made
that
argument
last
last
token
meeting,
but
I
actually
didn't
think
they're
thinking,
maybe
I
was
drunk
when
I
did
that
so.
A
You
don't
need
to
define,
for
example,
data
type
or
syntax
or
whether
or
not
the
you
don't
need
to
type
the
attribute.
You
probably
still
need
to
to
provide
a
region
for
that
attribute
if
needed,
but
you
don't
need
to
define
the
type
and
then,
if
your
card
is
about
a
attestation
or
a
event,
then
you
don't
even
need
to
define
the
origin
because
it
is
implied.
A
A
Which
allows
you
to
redeem
one
ether
based
on
the
check
ali.
Send
you
suppose
you
are
bob
and
you
have
this
token
script,
which
has
the
rules
allowing
you
to
redeem
one
ether.
If
you
receive
a
check
from
bob
from
alice,
then
you
do
not
need
to
define.
A
E
It
does
okay,
so
that
that
will
be
in
the
the
other
token
script
or
from
the
return
from
the
smart
contract.
A
A
A
A
E
Then
you
can
use
all
of
the
other
things
from
you
can
use
all
the
other
parameters
from
that
event,
yeah
in
your
just
as
per
as
parameters
inside
the
the
actions
of
this
of
the
card.
Yeah.
Okay,
yes,.
A
E
Just
one
thing,
so
this
implies
that
when
I
construct
the
view,
I
should
also
inject
we
should
be
injecting
all
of
the
the
parameters
from
the
event
as
attributes
into
the
view.
Is
that
correct.
E
E
E
Do
we
want
owner
spender
and
value
as
attributes
injected
into
the
view
when
you
have
that
when
you've
referenced
that
module
as
an
event,
does
it
make
sense
so
that
the
the
token
script
author
can
use
those
values
as
attributes.
E
A
A
Sorry,
I
couldn't
show
you
so
let's
say
this
one:
okay,
this
one
only
have
one
input,
which
is
the
event
which
is
nice.
A
A
A
A
A
A
A
D
A
Oh,
yes,
that's
that's
one
scenario,
but
the
other
scenario
is
you
have
one
more
than
one
token
as.
A
A
A
Anyway,
let's
look
at
the
api
here:
okay,
let's
look
at
what
is
in
there
so
forget
about
this.
I
have
highlighted
this.
This
is
the
activity.
A
A
A
A
A
A
E
E
to
me,
is
it
like
input
is
an
intrinsic
in
other
places.
So
is
it
an
intrinsic
here
or
could
I
just
put
ts
colon,
I
don't
know
initialize
or
something,
and
then
that
would
then
on
the
left
hand,
side,
I'd
have
initialized
dot
and
then
whatever.
E
A
A
A
D
What,
if
what,
if
the
same
event,
approval.
A
A
A
Actually,
no,
this
is
activity
card,
so
no
activity
card
is
different
activity
card.
I
see
where
why
this
is
confusing,
because.
A
Because
an
activity
card
is
not
an
action
card
action
card,
have
the
input
already
selected
activity,
not
token
card
is
also.
The
same
token
card
is
is
is
not
based
based
on
what
user
selected
it
actually
exists,
because
the
token
exists.
C
D
D
C
D
A
Yeah,
I
don't
have
a
set
conclusion
on
this.
This
is
something
to
to
to
debate
and
think
about.
A
D
E
You
don't,
then
you
don't.
Yes,
that
is
that's
much
more
logical.
Like
looking
at
that.
From
an
outside
point
of
view,
I
can
see
exactly
where
source.2
is
corresponding
to,
but
so
yeah
I
I
agree.
That's
that's.
Some.
That's
much
easier.
A
Okay.
But,
given
that
we
already
use
origins
to
to.
A
To
enclose
the
ethereum
event
in
other
places
and
not
originally
include
the
ethereum
function,
call
we
might
consider
the
word
origin
as
well.
E
Yes,
but
then
would
it
get?
Would
it
get
confused
with
the
the
contract
address?
That's
part
of
the
the
declaration,
the
the
top
declaration
of
the
script.
A
You're
right,
let
me
let
me
shoot
down
this
a
little
bit,
and
this
is
this
is
so
far
what
we
have
you
are.
You
have
made
a
valid
point,
so,
let's
let
me
keep
source
as
it
is
for
now
now
the
last
thing
the
last
thing
is
see
before
we
have
data
module.
A
A
Okay,
and
here
is
the
data
module,
and
so,
if
we're
generating
this
data
module
from
if
we're
generating
a
email
attestation,
we
we
know
how
to
do
that
in
action
card.
But
if
a
if
a,
if
a.
A
A
A
A
For
example,
let's
consider
a
tech
model
where
you
build
a
new
usd
token.
You
call
it
jb
usd
meaning
james
brown
usd,
and
you
say
that
this
is
like
cusd
and
usdc,
except
it's
better
than
both,
and
then
we
will
build
that
website
which
asks
you
to
sign
the
transaction
so
that
you
can
allocate
some
of
your
diet
token
into
jb
die,
and
you
will
write
that
allocate
30
die
into
jb,
die
and
note.
A
This
is
not
erc
20
because
you
actually
have
to
use
authorized
first,
you
have
to
approve
a
contract
first
in
order
to
do
that,
and
if
the
other
contract
pulls
money
from
your
suppose,
aod
that
died
from
your
one
die
contract.
Not
not.
You
send
dice
or
die
away
to
the
other
contract.
A
Then,
let's
suppose
this
web,
that
side
is,
is
evil
because
james
brown
is
evil,
then
the
user
will
actually
sign
the
transaction
that
sends
all
of
his
style,
which
could
be
a
million
dice
to
the
to
james
brown's
contract.
Then
he
will
siphon
this
out
now
suppose
suppose
there
is
a
token
script
way
to
render
transaction
by
defining
data
module.
A
A
A
A
That
actually
scarred
you
from
sending
your
die
and
any
token
that
is
already
in
your
wallet
that
has
token
script
away
or
doing
other
things
like
authorizing
a
card
to
be
used
by
a
stranger,
because
your
card
tokens
token
script
is
already
there.
The
card
tokens
token
script
has
an
action
that
allows
you
to
authorize
your
card
to
be
used
by
someone
and
all
knowledge
for
this.
Action
to
work
can
be
used
to
reverse
past
saturation
section
if
a
web,
if
that
depth
website
asks
you
to
do.
A
D
D
Oh,
so,
if
a
depth
just
prompts
the
user
to
triggers
a
action
action
card
action,
just
a
simple
transaction.
A
D
A
D
A
D
A
We
do
so
far.
This
is
not
a
not
not
something
to
be
implemented
anytime
soon.
It's
just
that
now
we
are
capable
of
doing
this,
but
we
don't
have
to
do
it
and
we
don't
know
how
much
the
security
we
are
adding
to
the
user.
We
hope
users
use
card
if
the
user
bypass
the
card
and
sign
transaction
anyway,
even
if
we
can
display
some
of
the
information,
some
information
might
not
be
valid
anyway.
Imagine
if
the
hash
is
used
in
transaction,
then
you
cannot
see
what
is
before
the
hash
right.
So
card
is
irreplaceable.
C
C
A
To
cover
yeah.
D
D
A
Yes,
okay
at
all,
you
still
online.
A
A
Okay,
so
I
asked
a
contractor,
I
don't
want
to
use
james
and
bones
time
and
who
is
a
javascript
person.
I
want
him
to
and
he's
very
familiar
with
them.
A
A
So
I
asked
him
to
produce
some
kind
of
api
like
this
from
1336
to
41
and
let
boone
review
if
it's
good
and
if
he
can
produce
the
set
of
api
dynamically
generated
cpi
for
api
for
asm
module,
then
I
will
ask
him
to
create
the
api
which
is
to
by
reading
by
dynamically
generating
such
api
through
reading,
reading
module
like
this
yeah
and
in
the
meanwhile,
we
need
on
our
side
to
generate
the
java
code
to
comprehend
the
data
created
by
such
javascript
api.
B
So
the
data
created
by
the
javascript
api-
in
this
case,
I
guess,
will
will
that
will
just
be.
I
mean
that
would
then
be
internal
and
internal
javascript.
B
B
B
Yeah,
okay,
so
you
mean
you
mean
the
java
part
interpreting
the
the
as1,
the
ss
as1,
that
isn't
one
that
based
on
a
data
structure
that
then
that's,
then,
in
this
case,
described
with
with
xml
right.
A
Yes,
so
what
we
need
is
a
asn
one.
Okay,
we
need
two
things.
First,
we
already
know
that
we
need
a
signer
right
which
takes
the
that
object
as
is
and
sign
it.
B
Yeah,
but
that
shouldn't
be
so
so
so
bad
if
we
just
assume
that
it's
it's
correct
whatever
we
we're
signing
right.
A
That's
easy:
let's,
let's,
let's,
let's
put
a
pin
on
the
wall,
put
it
on
the
thing
we
need
to
do
that,
like
in
the
next
month
or
within
next
few
weeks.
We
need
to
do
that.
That's
clear,
and
actually
I
will
talk
with
you.
A
A
Oh
actually,
even
if
you
receive
a
check
from
the
alias,
you
probably
should
be
able
to
to
to
pass
the
data
in
javascript
too.
Therefore
you
don't
you
don't
have
to
render
it
with
java.
A
So
actually,
yes,
we
only
need.
We
only
need
the
signer
for
for
quite
some
time,
yeah.
B
So
so
just
begin
I
mean
beside
on
this
case
is
basically
just
taking
whatever
beyond
coded.
Is
I
mean
you?
I
I
don't
see,
there's
anything
else
needed
besides,
basically,
just
taking
like
the
dom,
for
example,
I
mean
you,
could
the
dumb
dumb
encoding.
Basically,
you
know
just
just
converting
the
base64
into
into
the
byte
representation
and
just
directly
signed
that
right
or
you.
B
B
B
Yeah
yeah,
okay,
like
like
the
thing
I'm
thinking
is
this
is,
if
I
mean
when
this
needs
to
to
integrate.
B
Like
that,
but
no
that
should
this
should
still
be
the
same.
Everything
is
just
it's
just
asn
airs
and
everything
is
just
asn
1,
so
yeah
that
should
be.
That
should
be
super
simple.
You
can't
see
there
should
be
any
issue
with
that.
A
Yeah,
can
you
then
can
you
can
we
start
from
the
other
side?
This
is
this
is
really
simple.
Can
we
start
from
the
other
side?
Can
we
you
have
the
protocol
here
right
so
and
that
and
then
I
already
defined
these
xml
schema
from
your
data
from
your
protocol
yeah
and
then
you
might
want
to
add
something
new
which
is
okay
to
this
thing.
If
you
want
to,
I
can.
I
can
commit
the
files
to
the
repository,
so
you
can
work
on
it
too.
A
And
then
we
say
that
save
that
save
them
as
binary
file
binary
file,
and
then
I
will.
I
will
use
that
tribute
to
later
test
the
java
signer,
as
well
as
the
javascript
api.
A
B
A
B
B
A
So
the
actual
format
of
that
object,
like
we
I
provided
in
the
example
from
line
14
to
line
17,
is
just
the
example
yeah.
As
you
produce
the
test
on
that
data
object,
you
also
produce
the
correct
data.
Exam
data
object,
for
example.
Here
here
I
use
the
bit
stream,
but
maybe
you
want
to
use
octix
string,
because
here
I
use
latex
the.
A
A
So
actually
it's
the
definition
of
all
that
object
needed
as
well
as
examples
for
them.
So
actually
there
are
two
two
two
jobs.
One
is
the
correct
modules
and
one
when
is
the
correct
one?
The
other
is
the.
B
All
right
exactly
the
amount
or
I
guess,
you're
you're
gonna-
specify
that
a
bit
more
like
exactly
the
amount
of
like
of
of
which
kind
of
testing
you
wanna
do
you
I
mean.
Basically
you
want
me
to
to
to
basically
just
implement
this,
implement
the
the
protocol
right
and
ensure
that
it
works
with
those
those
specific
formats.
B
B
Yeah
all
right,
just
yeah,
if
yeah,
if
you,
if
you
write
a
like
a
test
description,
then
I'll
I'll
have
a
look
at
it.
Also,
while
we're
talking
about
the
blockchain
attestation,
I
took
a
look
at
your
your
pull
request
and
and
approved
it,
and
I
made
a
new
one
because
I
was
I
was
checking
like
the
syntax
and
the
consistency
of
the
different
different
things,
and
there
were
a
couple
of
issues.
B
B
It
doesn't
have
to
be
now.
It
was
just
in
case
that
that
the
email
had
like
that,
but
you
didn't
know,
so
that's
why
I
just
want
to
say
also.
I
wanted
to
mention
like
this
right.
Sorry,
some
of
those
are
format,
change
yeah.
So
so
that's
some
issues
so
we're
both
both
in
in
the
pull
request.
I
proved
to
you
and
in
this
one
some
of
the
issues
that
are
like,
like
in
particular,
regards
to
the
the
format
specification
itself.
A
B
I
will
carefully
check
them.
Thank
you
very
much.
You're
welcome,
also
just
to
mention.
I
haven't
had
much
time
that
I
haven't
had
sent
last
week
to
work
on
the
the
the
backup,
but
like
the
state
at
which
it
is
now.
Is
that
it?
Actually,
it
works
with
with
the
threshold
sharing
and
like
what
I
need
to
to
do
is
is
integrate
with
some
database
and
make
those
work
before
we
can
start
running
like
actually
running
some
tests
and
see
if
it
works
great.
B
We
also
we
are
in
our
own
branch,
we're
implementing
two-factor
authentication
soon,
so
I
might
be
able
to
to
steal
some
of
the
some
of
the
code
from
from
there.
A
Nice,
nice,
yeah.
Okay,
that's
that's!
That's
very
good!
As
you
change
the
test
station
xml
file,
I
will
try
to
regenerate
the
corresponding
asn
representation
using.
A
Engine
you
know
that
I
contract
this
indian
guy
to
make
me
a
translation
and
to
translate
the
xml
one
into
the
asm.one
format.
So
I
can
read
it
and
potentially
use
useful
for
other
applications.
Where's.
B
The
website
engine
is
it
on
on
one
of
the
github
pages
or.
A
A
A
Okay,
it's
it's!
Actually
it's
actually
in
the
branch.
So
that's
why
we
didn't
see
that
I
probably
should
move
that
one
into
an.
A
I
should
make
a
pull
request
to
make
it
into
the
main
branch,
so
have
a
look
at
the
branch
called
identity,
identifier,
testation
token
script.
B
A
A
Once
you,
since
you
made
modifications
these
translation
rules,
might
need
to
change
because
it
made
you
might
trigger
the
bug
in
the
transaction
translation
rule,
but
we
already
have
the
indian
guy
to
help
us
to
fix
it
right,
cool,
okay,
thank
you.