►
Description
Coding workshop during Gateway 2022 (May 16, 2022) on how to start coding with Agoric JS smart contracts. Presented by Martin Vejmelka of Rockaway Blockchain Fund.
Timestamps
00:00:00 - Introduction
00:12:00 - CONTRACT 0
00:27:00 - CONTRACT 1
01:11:08 - CONTRACT 2
01:42:30 - Deployment
01:46:02 - Front end launch
Github Repository
https://github.com/RBFLabs/intro-agoric-smart-contracts
Follow the speakers
Martin Vejmelka - https://twitter.com/shipthecode
Gateway Hackathon - https://twitter.com/Gateway_Conf
Agoric - https://twitter.com/agoric
A
Hey
guys
welcome
to
the
intro
to
a
gorick
workshop
thanks
for
coming.
I
just
want
to
say
up
front.
This
whole
workshop
is
done
as
a
github
repo,
that's
publicly
available.
A
Whenever
at
your
convenience,
when
you're
walking
out
coming
in
wherever
taking
a
break,
there
is
a
qr
code
on
the
door
which
you
can
which
you
can
use.
Otherwise,
if
you're
willing
to
sort
of
do
this
manually,
you
can
go
to
github
and
go
to
rbf
labs,
github.com,
rbflabs
and
there's
a
gateway
repo
which
you
can
clone
right
away.
A
So
talking
about
concepts
in
the
gork
and
typing
this
out,
but
I
wouldn't
worry
about
you
guys
copying
like
what
I'm
writing
on
the
board,
because
it's
just
it's
a
lot
of
effort,
but
whenever
you
want
to
refer
to
the
code,
the
exercise
spaces
inside
the
repo,
but
there's
also
the
solution
right
next
to
it.
So
at
any
time
you
can
go
and
have
a
look
at
what
the
what
the
what
the
solution
looks
like
right.
So
it's
no
stress:
let's
have
some
fun,
let's
dive
into
agorik.
A
I
think
it's
a
interesting
piece
of
tech,
so
I
was
lucky-
was
already
up
on
the
conference
and
explained
a
lot
of
the
things
that
are
the
basis
for
sort
of
this
talk.
So
let
me
just
do
this
very
quickly
the
what
what
are
the
blockchains
that
we're
used
to
if
you
were
deployed
on
any
blockchains
it's
today
you
get
a
blockchain
sort
of
base
layer.
A
You
get
the
platform
which
does
the
consensus
for
you
and
it
provides
for
you
a
virtual
machine,
and
you
compile
your
code
straight
onto
that
virtual
machine.
If
we're
talking
windows,
imagine
everything
you
use,
driver
everything
you
write
as
a
divisor.
It
sits
right
on
top
of
the
hardware
and
can
do
whatever
it
wants.
So
this
is
sort
of
like
where
we
are
mostly
today
and
the
the.
So
that's
that's
one
part
of
this.
A
As
a
result,
a
developer
who
writes
the
smart
contract
has
absolutely
full
control
over
what
happens
inside
the
smart
contract
and
there
is
practically
no
user
protection
right.
I
mean
in
uniswap,
you
can
say
technically
the
ui
could
show
you.
Oh
I'll
accept
your
help,
you,
whatever
adam
back
but
then
one
and
then,
when
you
say
yeah,
I
want
to
shows
up
hey.
Do
you
want
to
send
your
usdt
into
the
contract
when
you
say
yes
that
you
out,
there
is
no
guarantee
we're
getting
anything
back
right.
A
There's
a
lot
of
effort
gone
into
battle
testing
this.
So
you
should
get
your
stuff
back,
but
my
point
is:
that's.
That
only
depends
on
what
the
uni
swap
guys
have
done,
but
the
platform
itself
itself
under
that
is
not
guaranteeing
you
that
any
of
that
will
happen
right.
So
what
that
happens
is
the
developer
has
a
lot
of
responsibility.
There
is
there's
a
and,
on
the
other
hand,
and
the
user
doesn't
really
have
any
protection
from
the
platform.
A
It
means
developers
have
to
be
super
careful,
any
bugs
whatsoever,
they're
liable
for
any
caveats.
They
have
to
take
care
of
all
that
on
on
the
user
side,
user
doesn't
really
get
any
protection
on
the
blockchain
today
and
what
I,
what
I
want
to
show
you
is
an
algorithm.
They
do
actually
excuse
me
for
many
types
of
transactions.
A
The
one
thing
that
often
happens-
I
don't
know
if
any
anybody
here
has
ever
done
that,
but
it's
easy
to
send
funds
to
the
wrong
address.
So
some
blockchains
have
checksums
for
the
addresses,
so
you
can't
exactly
make
whatever
typos
but
there's
actually
no
guarantee,
there's
anything
else
on
the
other.
On
the
other
side
of
the
address,
once
you
send
money
somewhere
and
this
address
doesn't
have
any
associated
private
keys
like
that's
it
that
the
the
money's
gone
a
popular
item
is
zero:
zero,
zero,
zero,
zero.
A
So
there's
a
lot
of
eth
there,
it's
a
burn
address,
so
some
of
that
is
rightfully
there
it's
it's
gotten
to
the
place
as
it
should
be,
but
many
times
people
have
sent
if
they're
unwittingly
it
happens.
So
often
there
are
scams
based
off
of
this.
So
I
I
screenshotted
one
I
used
to
work
in
a
vast
which
is
an
anti-malware
antivirus
company,
so
always
interested
in
scams.
A
You
can
see
somebody
somebody
what
happens
if
I
send
transactions,
throwing
a
theme
address
and
somebody
here
is
willing
to
help
and
they're
referring
people
to
a
website
called
ncybernet.com,
a
very
favorite
tactic
of
scammers.
It's
got
a
comma
instead
of
a
dot
if
it's
a
dot,
it's
picked
up
by
url
scanners
and
it
can
be,
it
can
be
scanned
right.
But
if
it's
a
comma,
it
doesn't
look
like
you're
all
addressed
to
a
automated
scanner,
so
standard
trick
in
the
book
and
everybody's
of
course
interested.
A
How
can
I
get
my
money
back
and
the
answer?
Usually?
Is
you
can't
we
could
look
at
this
there's
an
etherscan
link
by
the
way
this
presentation
is
also
linked
to
in
the
github
repo.
So
if
you
open
up
the
github
repo,
you
can
straight
click
through
this
and
look
at
this
on
your
own
computer.
You
can
look
at
you,
can
look
at
this
link.
We
can
look
at
the
transactions
that
go
here
right,
but
I
don't
want
to
spend
time
on
this.
A
So
one
thing
is:
like
users
aren't
really
protected
against
making
mistakes
and
and
and
there's
just
it's
just
hardcore-
addresses
right,
there's
hex
strings
which
you
have
to
retype
and
and
and
work
with.
If
you
want
to
send
somebody
money,
there
are
also
so
so.
As
I
said,
the
developers
are
have
to
be
really
really
careful
not
to
introduce
bugs.
Here
are
a
couple
of
examples
and
by
the
way,
I'm
not
knocking
any
of
these
blockchains
right
there,
where
the
first
players,
first
runners,
they've,
built
up
an
enormous
amount.
A
An
enormous
amount
of
effort
has
gone
into
the
innovation
that
that
were
provided
today.
But
now
the
question
is:
can
we
do
things
differently
right?
So
that's
the
starting
point
with
which
I'm
I'm
giving
this
presentation.
I
don't
know
if
any
of
you
have
been
have
looked
at
the
aku
dreams
difficulties.
So
what
happened?
Is
they
had
a
smart
contract
up
and
was
basically
an
nft
auction?
A
You
could
go,
buy
an
nft,
many
people
could
bid
and
the
way
this
is
done
on
ethereum
is
everybody
biz
one
person
wins,
but
they
all
have
to
lock
up
their
funds.
So
you
know
the
smart
contract
knows
they're
convinced
they're
actually
putting
their
funds
in
and
then
everybody
who
didn't
get
the
nft
has
to
get
their
funds
out.
If
you
have
a
bug
in
the
refund
code,
the
money
is
staying
inside
the
contract.
That's
what
happened.
A
A
There
was
something
called
infinite
spending
approval
on
ethereum
earlier.
I
think
that's
that
doesn't
doesn't
exist
there
anymore,
but
you
could
approve.
You
could
give
rights
to
smart
contract
to
to
ask
your
ask
your
wallet
for
money,
and
so
there's,
there's
parity.
There's
compound,
there's
all
sorts
of
other
examples
right.
So
so
there's
there
is
this!
This
problem
exists.
What's
what's
the
algorithic
idea,
how
do
how
to
help
with
this
write
contracts
and
restricted
version
of
javascript?
A
That's
hardened
and
that's
that's
a
technical
means
to
help
the
language
be
sort
of
more
conducive
to
producing
an
object
that
says.
Okay.
This
object
now
is
describing
a
value
of
place
150
and
make
sure
nobody
else
can
change
this
object
in
transit.
So
it's
a
lot
of
freezing
and
you
know
reducing
the
mutability,
but
what's
more
important.
What
I
feel
is
really
really
key
here
is
agora
doesn't
actually
just
provide
a
vm.
A
It
provides
a
set
of
services
like
zoe
and
ertp
that
your
contract
gets
to
interact
with
and
they
do
a
lot
of
the
heavy
lifting
for
you
and
that's
actually
the
point
of
this
talk.
I
want
to
explain
why
so
so
you've
seen
in
the
previous
slides
why
these
things
exist,
and
I
want
to
go
through
these
and
show
you
what
sort
of
services
they
provide,
how
you
can
work-
and
there
are
two
big
things
I
want
to
focus
on.
One
is
electronic
rights
transfer
protocol.
A
So
this
is
a
whole
infrastructure
about
that
that
works
with.
That
allows
you
to
define
and
and
mint
sort
of
payments
tokens
of
different
kinds
and
work
with
them
and
then
there's
another
big
subsystem.
That's
called
zoe
and
zoe
is
a
a
a
system
that
enforces
what's
called
offer
safety
which
we'll
go
into
when
you
write
this
stuff,
but
the
idea
is,
as
a
user
you
can
say.
I
would
like
to
give
this
contract
a
and
in
return
I
want
b.
A
You
can
say
that
when
you
are
starting
your
interaction
and
zoe
when,
when
the
when
you
interact
with
the
smart
contacts,
zoe
is,
is
there
in
the
middle
and
she
escrows
the
assets
and
if,
for
whatever
reason,
the
smart
contract
wants
to
keep
your
aim
but
doesn't
want
to
give
the
back
give
you
the
b
in
return.
Zoe
will
not
let
this
transaction
go
through
and
this
is
regardless
of.
Why
is
it
malicious?
Is
there
a
bug?
Is
there
a
mistake?
Well,
it
doesn't
matter.
A
So
if
you
structure,
if
you
structure
a
transaction
as
an
offer,
that's
a
pre
quid
pro
quo
and
the
contract
doesn't
give
you
the
quo.
It's
the
deal's
off
right
and
you
can
you
can
you
can
get
your
you'll
get
your
stuff
back?
The
other
part
of
algorithic
is
object
capability.
Why
is
this
so
this?
This
is
an
idea
where,
if
you
have
access
to
an
object,
you
can
use
it.
If
you
don't
you
can't
this
works
on
algorithm,
because
it's
by
default
everything
is
private.
So
on
ethereum
everything's
public.
A
If
I
deploy
a
contract,
you
can
go
through
the
blockchain.
Look
at
every
contract.
Right
so
the
agreement's
not
built
like
that.
So
as
a
creator
of
a
contract,
I
can
deploy
it
and
I
get
back
some
objects
and
I
can
list
some
objects
publicly,
but
I
can
keep
some
objects
for
myself
and
that's
important,
and
so
so
in
ethereum
you'll
see
all
this
like
function.
Calls:
where
is
the
message?
Is
the
message
sender,
the
creator
of
the
contract?
No,
is
it
the
person
who
is
in
the
governance
list
over
here?
A
Yes,
so
you
have
to
do
a
lot
of
access
control
inside
all
of
the
functions
here.
What
you
do
is
you
take
this
reference
and
give
it
a
person
a
to
person
b
and
that's
it
the
so.
How
is
this
accomplished?
This
was
also
being
discussed
today.
I
guess
all
of
you
have
seen
this
slide,
so
it
switches
very
quickly.
There's
a
cosmos
tendermint
base
that
allows
that
gives
a
gorge
the
benefit
of
ibc,
which
is
really
great
interact
with
other
cosmos
zones.
A
Then,
on
top
of
this
there's
an
agoric
vm,
which
is
which
is
a
version
which
is
a
hardened
virtual
machine
that
provides
a
javascript,
runtime
environment
and
agorik,
as
dean
said
today
is,
is,
is
the
team
that's
been
helped
helped
create
this
create
the
vm
on
top
of
that
sits
ertp
electronic
rights
transfer
protocol,
which
is
a
unified
way
to
talk
about
value
and
on
top
of
that
is
zoe
and
that's
on
top
of
that
is
where
your
contracts
are
so
you're
using
all
these
services
there
below
you
right.
A
So
how
does?
How
does
this
work
just
very
high
level
concepts?
Interaction
with
a
gorick
smart
contract
involves
invitations,
and
this
is
really
the
the
keys
of
not
having
addresses
you
can
I
can.
I
can
go
to
a
public
version
of
the
contract
and
say:
can
you
invite
me
to
go
so
to
interact
with
you
and
then,
if
it's
a
public
invitation,
you
get
an
invitation,
and
then
you
can
redeem
that
invitation
by
sending
an
offer
say.
A
I
want
to
use
this
invitation
and
this
is
the
offer,
and
I
want
to
give
this
whole
thing
to
the
to
the
smart
contract.
The
offer
contains
what
we
give
and
what
we
want.
These
are
actual
keywords
in
the
structures
we'll
see,
and
then
we
attach
if
there
are
any
payments,
we're
making.
We
attach
any
of
those
payments
to
the
offer
and
this
whole
thing
gets
sent
and
that's
where
zoe
picks
it
up
after
so
so,
smart
contract
starts
running
and
then
there,
when
it's
finally
done,
there's
an
offer
result.
A
We
can
get
the
offer,
result
back
and
examine
what
happened.
So
this
whole
thing
looks
complicated
if
you're
used
to
ethereum,
where
it's
a
call
function,
rpc
call
function
comes
back,
but
the
point
of
this
whole
infrastructure
is:
it
protects
the
user
and
the
developer
and
we'll
see
exactly
how
so
that
was
high
level
concepts
and
if
you're
already,
then
we
can
just
start
coding.
A
So
I've
got
my
visual
studio
here.
As
I
said
in
the
beginning,
don't
really
worry
about
you
know
clone
this
github
repo
and
at
your
leisure.
You
can
type
in
some
code
or
or
whatnot,
but
I'll,
be
coding
about
stuff
that
I
talk
about
so
the
first.
The
first
contract
is
called
contract
zero
and
it
focuses
exclusively
on
the
ertp
layer
we're
going
to
try
to
build
these
concepts,
one
on
one
from
the
base
layer
that
that
we
talked
about
so
the
repository.
A
So
the
new
concepts
that
we'll
be
talking
about
on
in
algorithic
are
issuers,
brands
amounts
payments
and
purses
which
is
sort
of
the
infrastructure
to
work
with
with
value
and
amounts
and
there's
test
driven
contract
development.
So,
on
this
very
contract,
I'd
like
to
show
you
a
a
good
way
to
work
and
actually
develop
your
contracts
write
your
contracts
because
agorik
has
this
nice
thing,
which
is
a
test
framework
built
in
that
you
can
use,
and
you
can
use
this
to
experiment
with
agorik
and
see
what
works
and
what
doesn't
that's?
Actu.
A
That's
actually
really
powerful
and
very
nice,
so
contract
zero.
What
I
like
to
do
is
I'm
going
to
write
a
terminal,
I'm
going
to
run
a
terminal
here
and
I'm
going
to
go
to
contract
0
and
then
I'm
going
to
say,
npx
ava
and
start
testing
my
contract,
all
right.
So
there's
always
a
source
code
for
contract
and
then
there's
your
test
code
for
the
contract.
A
I'll
start
up
the
the
watcher
and
here's
the
thing
in
the
very
first
part:
I'm
not
even
going
to
have
a
contract.
This
contract
is
a
basic
stump.
It
doesn't
really
do
anything.
It
just
shows
you
what
the
contract
form
sort
of
is.
I
won't
spend
any
time
on
this
now
because
what's
interesting
is
what
we're
gonna
do
with
with
the
tests
here,
so
I
can
still
use
the
testing
framework,
even
though
I'm
not
developing
any
contract
and
I'm
going
to
use
it
to
work
with
these
mints
and
and
issues
etc.
A
To
show
you
what's
what's
going
on,
so
let's
look
at
how
we
can
talk
about
amounts
in
ethereum.
You
have
stuff
called
safe
math,
so
you
have
to
be
very
careful
when
you're,
when
you're
changing
amounts,
adding
things
subtracting
things
dividing
things,
there's
fixed
point
math,
and
you
know
it's
it's.
Maybe
it's
maybe
not
super
easy
to
to
work
with
that.
You
have
to
be
very
careful
so
here
there
is
a
unified
way
to
work
with
amounts.
A
So
what
do
we
do
if
you
want
to
define
some
sort
of
token
that
we
want
to
work
with?
Well,
we
need
to
create
a
kit,
make
a
sure
kit,
so
I'll
make
a
sure
kit
and
it's
going
to
be
for
mula,
and
the
kind
of
the
kit
is
going
to
be
asset
kind.
Nat,
so
nat
is,
is
the
type
of
asset,
that's
fungible,
so
you
can
have
20
mula
10
mula,
you
can
add
them
together,
get
30
ml
right.
A
This
is
fungible,
so
I'll
just
go
ahead
and
import
this
from
agorik
ertp,
as
promised
it's
the
ertp
layer.
Now
this
kit
gives
me
a
issuer,
a
brand
and
a
mint
like
it.
So
the
issuer
is
the
object
that
understands
this
currency,
it's
the
keeper
of
the
type
and
it
can
verify
whether
some
payments
belongs
to
the
currency
and
can
tell
its
various
things.
The
brand
is
actually
something
that
denotes
the
name.
It's
it's
this
type.
The
brand
is
a
unique
object.
That's
that
identifies
moolah
inside
the
system.
A
The
mint
is
the
only
object,
that's
allowed
to
create
value
right,
so
I
can
mint
a
payment,
so
I
can
mint
20
mula
only
using
this
mint
anybody
that
doesn't
have
this
mint
they're,
not
making
any
any
payments.
So
let's
look
at
amounts.
So
how
do
I
define
20
mula
well
amounts
in
in
the
financial
system.
It's
a
good
idea
to
have
them,
coupled
with
with
with
the
type.
A
So
the
the
the
way
to
work
with
the
mounds
in
category
is
called
amount
math
and
I'm
going
to
make
what
and
right
away
the
code
intelligence
suggests.
I
need
a
brand
and
a
value.
So
the
brand
is
the
brand
I
got
from
from
the
muller
kid
and
the
value
is
going
to
be
20..
So
I
append
this
n,
because
this
is
supposed
to
be
a
big
number.
It's
not
just
to
make
sure
there
are
no
overflows,
no
difficulties
with
with
numeric
precision.
So
this
is
an
amount
of
of
20
mula.
A
So
I'm
going
to
ask
the
mint
and
the
mint
is
super
simple
you
can
see
here.
You
can
ask
the
mint
which
issuer
do
who's
your
issuer
and
then
you
can
win
the
payment,
that's
it.
So
it's
really
a
simple
object
and
I
need
to
give
it
an
amount
that
I
just
defined
in
the
in
the
in
the
previous
step
right,
I'm
going
to
just
fix
the
type
over
here.
A
So
what
we
can
do
in
this
very
first
test,
gonna
make
it
really
simple.
We
can
test
whether
this
payment
actually
contains
the
right
amount.
So
for
this
we'll
have
to
use
a
test
called
deep
equal.
So
this
is
part
of
the
testing
framework
eva.
So
I
get
a
t
object
which
I
can
use
to
verify
things
inside
the
test
and
actually
expect
it.
So
actual.
Is
I'm
going
to
ask
the
issuer
to
tell
me
the
amount
off.
A
The
amount
of
the
payment
that's
contained
in
payment
noi
and
I'm
going
to
see
if
this
is
exact,
it's
actually
20.
and
first
I'm
going
to
make
the
test
fail
by
the
way
I'll
write
this
now,
you
guys
can
see
that
oh
yeah
give
me
one.
Second,
the
import
needs
to
be
here
up
top
so
code.
Intelligence
helps
me
by
getting
by
giving
me
by
importing
automatically,
but
it
imports
at
the
top,
and
you
need
to
have
the
test.
The
test
test
import
needs
to
be
up
top,
so
I
fixed
that
now.
A
What
I'm
getting
is
a
difference
like
one
thing
is
a
promise
and
the
other
thing
is
action
object.
So
what
needs
to
be
here
is
an
await.
So
writing
this
in
tests
can
tip
you
off
that
you've,
somehow
you're
supposed
to
be
awaiting
something
and
you're
not
right.
So
I'm
going
to
save
this
and
rerun
the
test
again,
I'm
still
getting
a
failed
test
and
here's
what
here's
the
difference,
I'm
actually
the
the
get
amount
off
is
returning
to
me
an
amount,
that's
20,
and
it
tells
me
it's
of
the
moola
brand.
A
So
this
tells
me
already
I'm
pretty
sure
that
if
I
write
this,
my
test
is
going
to
start
to
pass
right
all
tests
passed.
So
what
the
only
thing
I
want
to
show
here
is:
if
I
want
to
talk
about
some
tokens
that
are
fungible,
I
need
an
issuer
kit.
That
gives
me
a
few
objects
that
I
can
work
with,
and
the
most
important
is
I
can
define
amounts.
The
amounts
always
have
like
a
numerical
value,
but
they
also
have
the
type
so
so
the
brand.
A
What
what
are
you
talking
20
of
what
20
20
mula?
So
this
always
goes
together
and
amount
math
gives
us
other
functions
that
we'll
that
we'll
use
later?
Okay.
So
let's
move
to
the
next
test,
I'll
just
save
this,
so
the
test
fails.
So
now
we
have
a
failing
test.
Let's
talk
about
purses,
so
I'll
just
copy
this
over,
so
I
don't
have
to
type
the
whole
thing
again,
but
what's
what's
the
new
thing
I'm
going
to
do
so?
I
minted
the
payment
of
20
moolah
and
now
I
want
to
deposit
it.
A
The
the
agoric
system,
a
purse,
is
part
of
your
wallet
or
it's
it's
an
object
that
can
hold
value,
but
only
of
one
type,
so
the
purse,
the
person
that
I
define
as
a
person
for
rule,
I
can't
hold
you
as
dt
right
so,
and
this
is
all
again
a
part
of
the
the
the
a
part
of
the
construction
that
sort
of
separates
these.
These
concerns.
So
I'm
gonna
say
this
is
where
the
issuer
comes
to
come
comes
in
very
handy
issuer
make
empty
purse.
A
So
I
have
an
empty
purse
that
I
can
deposit
the
payment
into.
So
I'm
going
to
say,
purse
deposit,
the
payment
and
what
I'd
like
to
do
now
is
check
inside
my
test,
whether
the
purse
actually
has
the
the
worth
and
the
the
value
in
it.
So
I'm
going
to
say,
t
deep,
equal
and
I'm
going
to
say
purse.
How
much
do
you
have
in
you
and
is
this
the
same
as
the
amount
that
the
payment
corresponds
to
and
the
price
was
empty
before
I
deposit
the
payment?
A
So
now
you
can
tell
me
what
I'm
going
to
check
brand
50
n
we're
gonna
see
if
we
add
those
first
two
amounts
if
that
comes
out
as
the
rule
of
50.,
so
I'm
going
to
say,
t
deep,
equal
amount,
math
and
here
look
at
this.
We
get
a
lot
of
useful
functions,
is
greater
than
or
equal
is
equal.
Is
the
amount
empty?
Add
I'm
going
to
use.
Add
I'm
going
to
add
move
of
30
rule
of
20
and
compare
this
to
50.
A
So
obviously,
tests
work.
If
I
change
this
amount
over
here.
Obviously
tests
fail
right,
so
it's
actually
testing
whether
I'm
getting
I'm
getting
the
right
50..
Now.
The
question
is:
how
does
amount
math
work
for
things
that
model
non-fungible
assets
like
think
of
this
like
nfts?
So
what
happens
right?
It's
very
easy
here
to
think
about
how
ad
works,
but
how
about
we
build?
We
create
an
issuer.
A
I'm
going
to
call
this
my
awesomes,
it's
a
new
nft
collection,
not
financial
advice,
but
if
you
want
to
buy
it
will
make
me
happy.
I'm
gonna,
I'm
gonna,
I'm
gonna
float
this
on
the
test
and
it's
totally
legit
make
issuer
kit,
I'm
gonna,
say
awesomes
and
it's
an
asset
kind,
and
if
I
want
to
talk
about
different
non-fungible
things
that
are
not
interchangeable,
it's
the
asked
kind
of
set.
A
So
now
again
it's
it's
the
same
object,
though
it's
the
same,
it's
a
kit,
so
I
can
get
an
issuer
out
brand
out
mint
out
and
that's
my
awesomes
and
I
can
remain
awesome.
Skit
right,
you
can
remain
into
my
awesome
skit.
Now.
How
do
I?
How
do
I
define
values?
So
it's
an
asset
kind
of
set,
so
every
individual
value
has
to
be
a
set,
so
I'm
going
to
make
an
nfta
and
I'm
going
to
use
amount
math
to
make
a
type.
A
A
I'm
going
to
introduce
a
typo
here
just
so
my
tests
failed
initially
and
I'm
going
to
say.
Okay,
let's
see,
if
I
add
these
two
nfts,
so
there's
an
nft
workshop
after
this
and
they're
doing
composable
nft.
So
they
need
to
be
able
to
combine
these
values
if
t
combined
right.
So
this
test
should
fail
now,
because
why?
A
Oh
that's
the
first
failure,
so
the
we
talked
about
a
hardened
virtual
machine,
javascript
and
part
of
that
and
and
right
now
what
you
have
to
do.
You
have
to
assure
that
the
objects
that
you
want
used
to
describe
amounts
are
what's
called
hardened,
so
the
the
vm
that
runs
agora
provides
a
function
called
harden.
A
The
harden
function
actually
chops
off
functionality
from
this
array,
so
this
array
has
a
string
in
it
and
if
it's
a
strand
of
javascript
object,
I
can
go
into
that
array.
I
can
swap
the
string
out.
I
can
change
it
and
do
whatever
I
want
with
it.
Harden
takes
away
some
of
those
capabilities
to
make
sure
the
object
is
it
can
be
tampered
with
later.
So
what
I
was
told
here
is
you
can't
pass
non-functional
objects
like
awesome,
so
the
harden
function
performs
a
freeze.
It
freezes
the
object,
so
it
can't
be
manipulated
with.
A
This
is
again
use
tests
for
this,
because
it'll
tell
you
where
your
mistake
is
that
you
haven't
used
hard
like
you
get
you
get
a
hint
here,
you
likely
won't
get
a
hint
if
you're
deploying
a
contractor
or
not
necessarily
now
so
now
I
have
now
that
we've
hardened
things.
A
What
happens
now
can't
pass
non-frozen
objects?
Of
course
I
haven't
hardened
everything,
so
here
very
nicely
tests
warned
me
or
the
the
system
warns
me
now
that
I've
hardened
everything.
The
only
reason
the
test
is
failing,
because
I
have
a
typo
here,
so
I'm
gonna
make
those
amounts
the
same.
A
And
here
we
go
test
pass
right,
so
you
get
out
of
the
box.
So
if
you,
if
you
haven't
developed
any
blockchain,
this
doesn't
seem
strange
to
you,
but
on
other
blockchains
you
don't
really
get
frameworks
that
allow
you
to
abstractly
talk
about
amounts
and
how
to
combine
things
together.
So
these
are
all
libraries
or
frameworks
that
you
have
to
have
to
develop
outside
here.
You're,
given
this
out
of
the
box
in
algorithm,
so
this
this
contract.
A
So
so
this
these
tests
allowed
me
to
explain
how
ertp
works,
how
you
can
mint
payments,
how
you
can
move
them
to
purchase
how
you
can
talk
about
amounts?
Are
there
any
questions
at
this
point?
Did
you
guys
wanna?
Ask
yes.
A
So
that's
a
great
question,
thank
you
and
the
so
the
the
question
is
who
owns
the
mint
after
you
make
it
right,
so
the
in
the
next
smart
contract,
which
is
a
like
a
faucet
contract,
the
mint
is
going
to
be
owned
by
smartcon,
it's
going
to
be
in
it
and
nobody.
It's
we're
not
going
to
export
it.
Nobody
else,
but
functions
inside
the
smart
controllers
can
access
it.
So,
in
this
scenario,
what
you
could,
what
you
could
do
is-
and
the
faucet
actually
means
to
anybody
who
asks.
A
So
in
this
scenario,
the
mint
can
be
can
be
used
by
smart
contract
to
make
new
payments
and
move
them
out
of
the
contract
to
to
the
user.
That
can
then
do
whatever
they
want
with
them.
You
could
pre-mint
a
specific
amount,
so
you
could
open
a
purse
in
your
smart
contract.
You
mint
the
initial
amount
and
you
throw
away
the
mint.
If
I
show
this
open
source
code
to
somebody,
I
can
prove
to
them
that
the
mint's
lost
aft.
A
So
so
you
can
you'll
spawn
the
contract
in
the
beginning
in
the
start
function.
What
we're
going
to
do
is
we're
going
to
run
the
mint
and
then
we
would
we'll
just
set
the
mint
to
null
and
lose
the
loose
limit
right
and
then
you
know
you're
not
using
it
anywhere.
You
have
to
throw
away
the
issuer
kit
as
well
just
be
careful,
but
but
it's
it's
possible
to
to
signal
that
this
mint
has
been
used
and
now
we're
not
going
to
make
it
accessible.
A
None
of
the
functions
use
the
mint
at
all
once
the
contracts
deployed.
That's
it
make
sense,
perfect,
any
other
questions,
because
we're
moving
one
layer
up
right.
Anything
you
want
to
ask
about
mounts.
This
is
the
this
is
the
best
place
because
then
we
have
to.
We
have
to
talk
about
smart
contracts
as
well.
It's
all
good,
perfect,
okay,
so
now
I
can
move
and
by
the
way
one
last
thing
we're
filming
about
this
is
a
bonus
problem.
A
Agorik
is
actually
interested
in
rewarding
anybody
who
shows
some
effort
in
studying
this
by
themselves.
So,
at
the
end
of
the
workshop,
I
have
some
qr
codes
here.
If
you
photograph
them
and
solve
or
try
to
solve
any
of
the
bonus
problems,
you
can
take
a
shot
off
with
qr
code.
Send
them
a
screenshot,
and
you
know
if
you
pass
kyc
if
you're
willing
to
show
your
paperwork
they'll,
send
you
100
because
you've
solved
because
you've
solved
or
tried
to
solve
some
of
these
bonus
problems.
So
this
is
one
of
them
right.
A
Try
to
see
what
happens
if
you
try
to
add
two
identical
nfts,
so
let's
say
you
mean
two
amounts
that
are
the
same
enough
to
try.
I'm
not
going
to
do
it
here,
but
if
you
guys
want
to
try,
regardless
of
when
you
solve
or
don't
you
can
then
screenshot
this
to
to
work
okay.
So
let's
move
on
to
the
to
the
next
smart
contract
to
the
to
the
next
exercise.
A
So
that's
contract
number
one
by
the
way,
as
I
promised
you
know,
there's
always
a
contract
solution,
so
the
test
contract
is
empty
inside
the
github
repo.
But
you
have
the
contract
solution
and
it's
commented
so
at
any
point
you
know
you
can
go
back
and
refer
to
this
and
use
this
as
a
starting
point
for
whatever
you
guys,
whatever
you
guys
need:
okay,
so
smart
contract
and
test
contract.
A
So
this
in
this
exercise,
we
will
develop
our
first
smart
contract
and
it's
going
to
be
a
faucet
contract.
So
it's
going
to
contain
a
mint
and
anybody
who
asks
it
will
mint
them
some
samula,
some
some
molar
currency,
I'm
very
interested
where
these
names
come
from,
but
moolah
is
used
all
over
the
documentation.
A
I
thought
it
was
the
same
place,
safe,
safe
name
to
use
that
nobody's
using
as
an
actual
currency,
but
I
don't
know
what
the
story
is
with
these
with
these
names
so
when,
if
we
want
to
use,
if
you
want
to
when
you're
testing
an
actual
contract
inside
the
unit
test,
what
happens
is
we
have
to
make
a
fake
environment
and
deploy
the
contract
into
it?
And
then
we
can
test
it
out.
So
there
is
a
standard
set
of
boilerplate
that
we
use
for
this,
and
it's
here
for
your
convenience.
A
In
the
comments
right,
so
instead
of
the
pass
I'm
going
to
deploy
this
and
of
course
I
have
to
import
all
this
functionality
and
there
we
go
import
all
these
functions.
I'm
getting
you
know,
code
intelligence
support,
so
I
don't
have
to
do
any
of
these
manually.
I'm
going
to
move
the
test
up
here.
A
Let's
see
and
I'm
going
to
start
npx
eva
and
test
my
contract
all
right,
I
can't
find
modern
fight.
Yes,
so
code
intelligence
is
incorrect.
Here
I
have
to
fix
this
anyway.
The
solutions
contain
the
correct
the
correct
import.
So
I
already
have
a
test
failure
here
and
test
failure.
Is
you
didn't
run?
You
didn't
test
anything
right.
So,
what's
going
on
in
these
functions,
the
computation
inside
the
algorithm
runs
in
vats,
which
are
discrete
units
of
computation
which
are
isolated
from
each
other.
A
So
what
we
need
to
do
is
make
a
fake
vat
into
which
we
can
deploy
our
contract.
Then
we
want
to
get
access
to
the
zoe
service,
which
is
inside
the
vat.
We
will
bundle
the
source
code
of
our
contract,
so
this
actually
points
to
the
to
the
contract
we've
got
over
here
and
we
bundle
it
and
then
we
install
the
bundle
using
the
zoe
service
and
we
get
back
an
installation.
So
this
is
now
the
code's
been
uploaded.
A
That
also
happens
in
deploy
scripts
when
you're
working
with
the
hd
solo
processor
we're
working
with
test
testnets,
so
you
get
back
an
installation
handle
that
says
look.
This
is
a.
This
is
a
reference
to
the
code.
That's
already
been
uploaded
to
the
process
and
you
can
now
work
with
it.
A
So
the
first
thing
that
we're
going
to
do
is
we're
going
to
run
a
test
that
asks
hey.
Is
this
installation
actually
the
installation
of
the
code
that
we
wrote
so
I'm
going
to
just
going
to
say
t
is
so.
This
is
another
way.
This
is
another
testing,
primitive
and
I'm
going
to
say
a
weight
e,
hello
installation.
A
So
I'm
going
to
ask
the
installation
give
me
the
bundle
that
was
it
that
you
were
installed
with
and
I'm
going
to
see.
If
that's
my
hello
bundle
right
so
super
simple
test:
let's
see
what
happens,
five
tests
pass,
meaning
my
test
passes.
So
all
I
did
now
this
this
is.
This
is
doing
nothing
useful.
What
I
did
was
I
instantiated
the
I.
I
moved
the
contract
code
to
the
chain
and
then
I
simply
asked
the
the
the
the
zoe,
the
installation
hey
tell
me
what
code
is
deployed
here
and
is
it
my
code?
A
So
that's
all.
I
did
right.
So,
let's
move
to
the
next
test,
which
is
start
to
be
a
little
more
interesting
and
we're
going
to
start
using
this
sort
of
test
driven
development
style.
So
we've
got
this
installation
and
copy
this.
We
know
already
works
from
the
from
the
last
time,
and
now
we
are
going
to
get
a
obj
we're
going
to
actually
start
the
code
inside
the
process.
A
We're
going
to
get
back
an
object
that
we
can
then
use
to
call
functions
and
the
first
function
that
we
want
to
implement
is
actually
super
simple.
It's
a
function
called
say
hi
and
it's
going
to
return
to
us
the
string
high.
So
we
have
to
install
a
contract.
We've
done
that
now
we're
going
to
instantiate
the
contract
right
so
called
cost
instance
is
a
weight
e
z
start
instant,
so
start
instance
is
how
he
asks
zoe
to
take
this.
The
code
that's
been
uploaded
and
started
for
us.
A
So
hello
installation,
so
this
is
this-
is
now
a
running
instance
and
the
instance
is
actually
a
an
object
which
I
can,
which
I
can
do,
which
I
can
deconstruct.
So
I'm
going
to
say
and
let
me
create
a
facet,
so
I'm
going
to
say
give
me
the
creator.
Facet
so
facet
is
is,
is
a
term
you
may
be
unfamiliar
with.
I
think
it
goes
back
to
a
long
time
to
when
dean
was
talking
about
when
they
were
working
on
smart
contracts.
A
They,
I
don't
think
it's
very
popular
in
any
language
today,
but
the
idea
of
a
facet
is
simply
think
of
it,
as
if
you
have
a.
If
you
have
an
object,
that's
got
a
bunch,
it's
got
a
large
interface.
Let's
say
it's
got
50
functions
I
can
I
I
model.
The
term
facet
is
I
can
take.
10
of
these
functions
build
a
new
object
that
only
provides
access
to
these,
and
this
is
like
one
aspect
of
the
of
the
original
interface.
It's
just
like
one
facet.
A
Then
I
can
create
another
one
I'll
pick,
another
five
functions
and
that's
a
new
facet,
so
we
use
the
term
facet
to
describe
different
parts
that
are
then
transferred
to
different
parties.
I'll
give
you
the
creator
facets,
you
can
mint
and
I'll
give
you
the
public
facets,
so
you
can
buy
right
so
so
this
allows
us
to
sort
of
separate
out
this
functionality
and
goes
back
to
this
is
very
interrelated.
With
this
idea
of
objects,
object
capabilities,
so
I'm
going
to
deconstruct
the
instance.
A
I'm
going
to
say
t
is
say
hi
and
it
has
to
be
I'm
going
to
ask
for
a
we're
going
to
write
the
function
to
just
return.
The
string
high.
So
this
function
doesn't
do
anything
useful
right,
but
the
idea
is
to
show
you
what
what
does
it
mean
to
start
an
instance?
What
do
you
get
back
and
how
can
you
work
with
this
right?
So
we've
got
this.
The
instance
actually
can
be
deconstructing
creator
faster
than
the
say,
hi
function.
So
what
am
I
saying
by
this?
A
The
person
who
deployed
the
contract
is
the
only
one
that
gets
to
access
to
the
creator
fast.
So
this
is
just
for
me.
The
creator
facet
is
where
I
place
functions
that
I
want
me
the
creator
to
be
able
to
use
so
then
I
I
just
grab
this
function,
because
it's
again
it's
an
object.
It's
a
javascript!
I
can
grab
this
function,
just
call
it
right,
so
this
test
fails
now,
obviously,
because
the
contract
doesn't
actually
contain
this
function.
A
So
here's
how
we're
going
to
code,
let's
start
slow
and
simple,
so
the
creator,
it's
albert,
prepared,
the
creator
facet
here,
let's
go
through
this.
The
start
function
is
has
to
be
declared
for
any
contract
that
you
want
to
deploy.
The
system
is
going
to
look
for
a
start
function
and
run
it.
The
start
function
gets
a
zoe
contract
facet.
Now,
just
explain
what
facets
are.
So
this
is
the
part
of
zoe
that
the
contract
needs.
A
So
it's
it's
a
facet
of
zoe
that
the
contract
is
typically
typically
uses,
and
I
can
use
this
zcf
to
make
new
mints
for
myself
and
I
can
use
a
whole
lot
of
other
services,
but
we're
not
going
to
use
it
right
now.
What
I'm
more
interested
is
this
creator
facet-
and
you
know
a
lot
of
these
things-
are
just
simple,
javascript
objects
which
are
which
are
transferred
by
convention
to
different
locations.
So
it's
it's
like
it's.
Actually,
some
of
the
reality
may
be
simpler
than
you
know.
A
We
think
that
you
think
when
I'm
talking
about
all
this
infrastructure,
so
I'll
just
define
a
say,
hi
key
here
and
it's
gonna
be
a
function
that
returns
the
string.
I
think
we
said
it
has
to
return
high
right,
so
this
gets
wrapped
in
a
creator
fast
as
a
normal
object.
The
object
is
hardened,
the
start
function
is
also
hardened
and
then
it's
exported
right.
So
if
I
save
this
now,.
A
And
I
rerun
the
test.
All
my
tests
pass
what
happened
so
now
I
actually
wrote
into
the
smart
contract.
This
function
say
hi,
I
put
it
into
the
creator
facet,
it's
all
being
moved
through
to
my
test
code
after
I
deployed
after
I
inst
start
the
instance.
I
get
the
instance
back.
I
can
open
up
the
instance
to
get
the
creator
facet.
I
open
up
the
career
faster
to
say,
hi
function
and
I
can
use
it
right
now.
This
is
a
really
simple
example,
because
this
say
hi
function.
A
I
can
call
it
locally,
but
stuff
gets
hairier
a
little
bit
when
we
when
we,
when
we
build
more
functionality.
So
the
next
thing
that
I
want
to
explain
is
how
to
use
invitations.
So
right
now,
there's
no
information.
There
are
no
invitations
involved.
This
I
deploy
the
contract.
I
get
a
function
back,
I
can
call
it,
but
the
way
you
really
want
to
interact
with
smart
contracts
is
using
invitations
and
when
a
user
has
an
invitation
or
another
smart
contract
has
an
education.
You
can
use
the
invitation
to
talk
to
the
contractor.
A
That's
really
what
gives
you
this
sort
of
address
saying
you
can't
send
something
if
you,
if
you
need
an
invitation
to
send
something
somewhere,
you
can't
exactly
send
something
to
an
empty
address,
because
there's
nothing
giving
you
the
invite.
There
first
needs
to
be
something
that
gives
you
an
invitation.
So
you
already
know
that
thing
exists
right.
A
A
I
could
have
copied
that
as
well,
but
I
just
love
typing
when
I'm
talking
so
and
then
there
will
be
another
function
which
says
make
hello
invitation
and
that's
part
of
the
creator
facet
again,
and
I
can
so
what?
How
would
I
like
to
do
this?
I
want
to
make
myself
an
invitation
by
calling
this
function
and
then
I
would
like
to
redeem
this
invitation
by
making
a
contract,
and
this
is
where
our
first
interaction
with
zoe
is
right.
A
So
I'm
going
to
have
to
say
seat
is
await
e
zoe
dot
offer
I'm
gonna
use
up
the
invitation
and
my
proposal
is
empty.
Now,
I'm
not
I'm
not
actually
providing
any
value,
or
I
don't
want
anything
back,
we're
just
showing
how
to
use
invitations
right,
and
this
is
so.
This
is
the
flow
I
get
an
invitation.
I
send
an
offer
to
zoe,
and
then
I
get
a
seat
at
the
table.
So
this
seat.
A
It's
really
like
think
of
it
like
a
chair,
so
when
you're
in
track
with
a
smart
contract
in
your
head,
think
about
the
smart
contract
being
a
table
and
they're
in
chairs
around
this.
If
it's
a
swap
contract,
then
one
person
sits
on
one
side
of
the
table.
Another
person
sits
on
the
other
side
of
the
table.
One
of
them
is
a
seller.
One
of
them
is
a
buyer.
A
They
have
seats
inside
the
contract,
they
actually
have
objects,
called
seats
and
those
seats
that
can
then
transfer
value
into
the
contract
or
extract
it
out
and
they're
the
the
they
are,
your
handle
to.
What's
what
your
role
is
inside
the
smart
contract.
So
so
I
get
a
seat
back
and
then
what
I
I
have
to
wait
until
a
smart
contract.
So
I
entered
into
this
offer
and
I'm
waiting
until
the
smart
contract
concludes
when
it
does
I'm
going
to
get
an
offer
result
from
my
seat.
A
A
Hello,
so
this
is
the
offer.
Result
is
actually
a
way
you
can
pass
messages
back
to
the
user,
so
you
can
say
you
haven't
provided
enough
money.
I
don't
want
to
talk
to
you.
Contract
is
shut
down
or
whatever
you
can,
you
can
send
an
object
backwards
and
somebody
can
extract
it
using
the
offer
result.
So
here
I
just
you
want
to
use
this.
Very
simply.
I
want
to
say
hello,
but
I
want
to
do
the
using
invitations.
So
now,
of
course,
if
I
save
this,
my
tests
are
failing
because
make
hello
invitation.
A
Isn't
a
function?
We
have
to
go
back
and
write
it.
So
I'm
going
to
copy
this,
so
I
get
it
right.
So
there's
a
new
function,
but
now
this
function
doesn't
just
return.
The
string
it
has
to
go
through
this
whole
offer
infrastructure.
So
I'm
going
to
say
whenever
somebody
calls
make
hello
invitation,
it's
going
to
call
zcf
and
it
will.
It
will
create.
A
Make
oh
what's
the
function,
so
this
slipped
my
mind,
zcf
make
invitation
yeah.
So
that's
right!
Okay,
so
I'm
going
to
ask
you
to
make
an
invitation
and
the
invitation
is
going
to
be
has
to
be
handled
by
an
offer
handler,
so
we're
gonna,
we're
gonna,
give
a
say,
hello,
handler
and
there's
a
there's,
a
name,
that's
useful
in
debugging
that
you
can.
You
can
give
this
like
a
description.
A
So
this
is
the
seat
and
I'm
going
to
I'm
not
doing
anything.
I'm
just
saying:
okay
exit
the
seat,
because
we're
not
doing
anything
in
the
smart
contract
we're
going
to
terminate
our
our
work
immediately
and
I'm
going
to
return
hello
and
hopefully,
if
everything
everything
has
come
out
right,
the
test
should
pass
all
right.
So
this
is
the
this.
Is
the
flow
go
back
into
this
test
contract
in
order
to
interact
with
a
smart
contract
in
the
way
that
is
safe
to
exchange
value?
A
We
need
to
use
invitations,
we
get
an
invitation
and
that's
the
invitations
are
also
key
to
access
control
right.
So
as
a
creator,
I
can,
for
example,
get
an
invitation
to
mint
new
mula's,
but
I'm
not
going
to
give
this,
I'm
not
allowing
anyone
else
to
do
that,
so
this
invitation
is
going
to
be
just
for
me,
but
then
I
can
somebody
can
trade
mullis
for
something
else.
So
I
can
have
another
facet
which
I'm
going
to
return,
which
we're
going
to
see
later,
that
I
can
use
that
somebody.
A
Anybody
else
can
use
to
say:
hey
here,
are
some
mula
and
give
me
something
else
in
return
right,
so
this
invitation
is
is,
is,
is
key
to
access,
control
and
and
and
and
also
to
offer
safety
when
I'm
a
user.
When
I'm
when
I'm
adapt,
I
want
to
use
this
invitation
redeem
the
invitation
by
sending
an
offer.
A
So
now
I
am
sitting
at
the
table
and
the
smart
contract
is
running
and
the
offer
handler
is
running
right
because
I've
redeemed
the
invitation
and
I'm
waiting
waiting
until
whatever
gets
whatever's
in
the
smart
car
gets
run,
and
this
inside
the
smart
contract
could
be
an
auction
and
it's
waiting
until
10
people
bid
or
it's
waiting
for
a
week
or
it's
you
know
so
this
this
is.
A
This
is
very
so
you
can
be
inside
this
await
for
a
while,
but
once
this
weight
resolves
you're
going
to
get
back
an
an
offer
result
and
then
the
offer
result
tells
you
what's
going
on
and
then
later
on,
we're
going
to
see
how
to
extract
things
from
from
offer
result.
So
at
this
point
there's
a
lot
of
new
concepts.
So
these
tests
look
very
short,
but
there's
a
bunch
of
things
we've
shown.
So
does
anybody
have
any
questions
that
you
you
guys
want
to
clarify
at
this
point?
A
A
So
it's
persistent
for
the
duration,
the
seat,
that
this
is
a
seat
that
we
are
we're
giving
given
from
the
outside.
Like
imagine
my
user,
I
imagine
I'm
a
user
interacting
with
a
smart
contract.
I
get
the
seat
after
the
invitation
is
redeemed
and
then
the
seat
is
valid.
While
the
contract
is
running
and
then
you
can
see
inside
the
contract.
What
actually
did
is
I
exited
this
seat,
so
what
I'm
signaling
is
whatever
I
wanted
to
do
as
a
smart
contract
with
this
seat.
A
Yeah
you
just
hang
is
it
a
way
that
a
smart
contract
can
keep
assets,
so
you
can
actually
do
that
in
the
next
smart
run.
It's
a
good
question.
You
can
define
seats
inside
the
smart
contract
and
they
can
hold
assets
so
yeah,
so
they
can
so
ins
you'll
define
them.
That's
right.
You
can
define
them
in
the
start,
function,
whatever
you
define
here
and
make
here
we're
going
to
make
stuff
here
right.
A
If
the
instance
is
killed,
then
that's
that's
that's
different,
but
while
the
instance
is
running
it
this
these
these
objects
over
here
are
going
to
be
live.
So
it's
an
instance
of
the
contract
as
an
application,
or
like
I
mean
when
you
deploy
the
contract
yeah.
When
you
deploy
the
code,
you
deploy
the
code
yeah
it's
a
deployed
code
and
then
the
instance
right
exactly
because
because
you
can
deploy
a
code
for
let's
say
you
want
to
you
want
to.
A
You
want
to
auction
off
nfts,
so
what
what
some
of
the
example
contracts
is
where
this
is
we're
not
going
to
do
that,
because
I
think
that's
that's
really
complicated,
but
if
inside
my
handler
here,
I
can
actually
create
an
instance
of
another
smart
contract
and
return
back
an
offer
right,
so
we
say:
okay,
I
want
to.
I
want
to
start
an
auction
for
this
nft
you
can.
You
can
have
an
auction
contract
that
lives
already
it's
deployed,
and
then
you
just
start
and
then
start
a
new
instance
of
that.
A
Just
for
my
nft
that
I
just
hold
right
now
you
dump
it
into
it
and
then
you
you
allow
it
to
you
know
to
work.
So
so
you
can
do
this
with
covered
calls.
You
can
do
this
with
whatever
right
so
and
there's
a
library
of
smart
contracts,
that's
available
inside
the
argoric
sdk,
but
then
you
can
also
do
this
with
your
user
contracts.
A
Okay:
let's
continue
it's
all
clear
and
easy.
That's
great.
A
So
now,
let's
talk
about
mints
and
and
how
we
can
actually
so
this,
so
the
first
contract
is
actually
a
faucet
contract
right.
So
what
I
the
capability
that
like
to
give
it,
is,
if
I'm
not
too
greedy,
maybe
some
moola's.
So
the
idea
is
very
simple:
if
I'm
asking
for
less
than
1
000
mulas
it
will,
it
will
create,
it
will
meet
the
payment
inside
the
contract
and
then
transfer
it
to
me.
So
you'll
see
how
value
transfer
through
the
seats
actually
works
and
we'll
test
whether
we
can
deposit
this
into
the
purse.
A
So
now,
but
I'm
going
to
change
some
things
around
here,
so
it's
going
to
be
a
mint
moolah
invitation
and
I'm
going
to
use
this
invitation,
I'm
going
to
make
myself
an
annotation
and
then
I'm
going
to
use
it
over
here,
but
I
need
to
structure
this
offer
differently
so
now,
for
the
first
time
we're
introducing
one
keyword
into
the
offer.
That's
want.
A
A
What's
the
brand,
so
the
contract
is
actually
going
to
be
minting
the
moolahs,
so
the
mint
and
the
in
the
issuer
and
the
brand
are
built
inside
the
smart
contract.
So
what
I
actually
need
is
to
get
it
out
so
I'll
have
to
write
another
function
inside
this
creator,
facet,
that's
called
get
issuer
and
that
function
is
going
to
move
the
issuer.
That's
inside
smart
contract,
I'll,
sorry,
not
move.
A
It
it'll
give
me
a
reference
to
the
issuer,
so
I
can
use
it
to
talk
about
amounts
right,
because
when
I
want
to
make
an
amount,
I
have
to
say
I
have
to
say
what
brand
it
is.
So
issuer
is
get
issuer.
I'm
going
to
use
the
issue,
get
issuer
function
in
this
way
and
then
I
issuer
can
give
me
a
brand.
So
I
can
use
get
brand
on
issuer
and
where
was
it
80,
and
I
want
to
make
myself
18
more
right,
so
we're
going
to
have
to
write
these
functions
right.
A
These
are
not
for
free,
obviously,
but
but
if
we
have
them,
we
can
then
talk
about
80ml
and
I'm
going
to
say
here.
I
want
tokens,
I'm
going
to
call
this
tokens
80.
A
So
and
so
I'm
sending
so
I'm
sending
an
offer
to
the
faucet
contract.
That
says,
I'm
not
giving
you
anything,
but
please
give
me
80
of
this
moolah.
So
not
all
smart
contracts
are
as
nice
as
that,
but
this
one
is
we're
going
to
write
it
that
way.
So
it's
going
to
give
me
the
80
ml.
So
again,
I
have
to
wait
for
an
offer
result.
A
E
is
the
way
you
have
to
call
objects
that
are
remote.
So
whenever
you
get
something
a
good
rule
of
thumb,
whenever
you
get
something
from
zoe,
it
actually
lives.
Some.
It's
like
a
remote
sort
of
version
of
this
object
and
when
you
call
functions
on
it,
what
actually
happens
is
under
the
hood.
The
system
has
to
do
a
remote
call
somewhere
else,
so
get
they
get
the
result
of
the
competition
and
then
send
it
back.
A
That's
why
you
have
to
use
e
and
the
weight
so
this
instead
of
you
doing
really,
there's
simply
just
wait
a
promise
locally,
but
in
fact
what
it
does
is.
It
goes
and
comes
back
so
sometimes
you'll
get.
If
you
make
a
mistake-
and
you
don't
use
this,
the
test
will
usually
warn
you
that
you
know
you
can't
you
can
call
this
object
or
it's
just
going
to
fail
and
then
you'll
realize
that
you
need
to
use.
You
need
to
use
e
okay
back
to
this
back
to
this
contract.
A
So
first
first
thing
we're
going
to
check
is
that
the
offer
result
is
here
is
eddie
moolah.
So
now
the
contract
has
to
return.
This
right,
if
it
doesn't
return
that
the
tests
are
going
to
fail
here
and
now
we're
going
to
extract
the
value
from
the
seat.
So
we
say
payment
is
rate,
seat,
get
payout
and
get
payout
of
tokens.
A
So
I
use
this
keyword.
Why
do
we
have
these
keywords
when
you
are
sending
something
to
the
contract
or
getting
out?
These
can
be
different
things.
So,
at
the
same,
let's
say
I
say
I
want
to
swap
a
thousand
usdt
and
I
want
to
get
back
10,
adam
and
50
of
something
else.
How
do
you
do
that
inside
an
offer?
A
Well,
you
have
different
keywords
that
you
can
send
in
and
different
keywords
that
go
out
and
those
can
refer
to
different
to
different
brands
and
also
by
the
way
you
can
have
multiple
keywords
that
denote
the
same
brand
right.
Let's
say
I
buy
something,
and
then
I
get
two
different
sort
of
moola's
out.
I
get
a
moola
for
my
transaction
fees
and
I
get
another
move.
It's
for
convenience.
I
can
have
two
different
keywords
here
that
say:
tokens
a
and
tokens
b
and
you're
getting
80
here
and
50
here.
A
Just
for
clarity
right
just
because
you
want
to
separate
these
things
out
or
you
can
have
completely
different
things,
you
can
tokens,
then
you
can
have
nfts
and
then
you
can
have
token
a
token
b
token
c
and
all
this
comes
out
in
a
very
nice
structured
way,
so
that
you
can
say,
given
the
response
to
tokens,
give
me
the
payout
that
corresponds
to
whatever
else
right.
So
it's
very
nice
and
clean.
I
get
all
these
values
out
separately.
A
So
now
we
already
know
how
to
test
payments
right,
so
hopefully
the
payment
that
I
got
and
we
know
how
to
how
to
test
for
amounts.
So
issuer
get
amount
off
payment.
Because
at
this
point,
when
I
got
the
payment
out,
I
don't
know
what
it
contains.
I
asked
for
eddie
moula.
The
question
is:
does
this
thing
contain
a
value
that
corresponds
to
80
or
not?
So
I'm
going
to
test
that
here
right,
80.?
A
There
we
go
so
once
we
write
everything.
If
we
do
it
right,
this
test
should
start
passing.
So
the
first
problem
we
have
minimal
invitation
is
not
a
function.
So
now
that
we
wrote
the
test
and
we
we
see
what
the
interaction
is
supposed
to
look
like,
let's
write
the
contract,
that
does
that
so
make
an
invitation,
mint
moolah
invitation-
and
this
is
usable
multiple
times
what
happens
if
I
only
wanted
to
allow
use
of
this
one
time.
A
That's
that's
that's
a
key
point,
because
an
invitation
is
actually
a
payment
and
a
payment
can
also
be
used
once,
and
we
can
actually
test
that.
I
didn't
write
that
up
as
a
bonus
exercise,
but
one
thing
we
could
do
in
the
very
first
contract
that
we
built
when
you
create
a
payment
deposited
in
a
purse,
go
ahead
and
try
and
deposit
into
a
purse.
Again
it's
going
to
fail
because
the
payment
is
not
live
anymore.
It's
been
spent
you
can.
A
The
payment
is
a
value
that
you
that
that
you
can
build,
and
then
you
can
use
it.
It's
not
live
anymore.
You
can't
clone
this
clone
the
value
and
you
know
have
multiple,
have
multiple
users,
it's
just
like
a
one
one,
ten
dollar
bill,
that's
it
so
I
could
make
this
invitation
to
be
to
be
usable
than
once,
but
I'm
going
to
make
it
a
closure.
I'm
going
to
allow
many
to
use
this
many
times
so
mint,
moolah
handler.
A
So
this
is
again
an
offer
handler.
So
what
we're
doing
is
we're
writing
this
out.
The
standard
weight
is
going
to
grab
a
seat
and
what's
the
seat,
it's
the
seat
of
me,
the
user
who's
running
inside
the
test
and
is
asking
for
the
mula
right
so
now.
What
is
it
that
that
I
want
to
verify?
A
A
There
are
some
helper
functions
inside
zoe
that
help
you
work
with
offers.
So
you
don't
have
to
do
all
the
manual
checking
yourself.
So
I'm
going
to
say
assert
proposal
shape
so
first
takes
the
seat
and
then
says
hey.
What
would
you
like
me
to
verify?
So
all
I'm
interested
in
is
that
the
proposal
contains
a
want,
and
I
want
the
want
to
contain
tokens
and
there
should
be
an
amount
associated
in
there
right.
A
Of
of
of
the
tokens
call,
so
I'm
going
to
say,
const
want
and
I'm
going
to
deconstruct
seat
get
proposal.
So
the
proposal
again,
it's
it's
a
simple
nested
object,
you
know
and
we
can
work
with
it
as
such.
So
I
get
the
proposal
I
already
know
the
proposal
contains
want.
Otherwise
this
would
fail,
and
I
also
know
it
contains
tokens.
So
I'm
going
to
say,
moola
amount
requested,
moolah
amount
is
want
tokens
all
right.
So
tokens
is
a
key
inside
the
dictionary
and
and
the
value
is
the
request
amount.
A
A
So
I'm
here
I
have
the
requested
mobile
amount,
and
now
the
task
is
if
this
is
less
than
a
thousand
or
let's
say
including
a
thousand
we'll
we'll
go
ahead.
Do
that
and
we'll
go
and
mint
it
if
it's
more
we're
going
to
return
an
error
message
say
you're
asking
too
much
right.
So
how
do
I
do
this?
I
can
use
amount
math
and
I
can
actually
use
assert
here.
A
I'm
asserting
inside
the
contract
that
amount
math
is
gte,
is
greater
than
or
equal
and
I
have
to
import
amount.
Math
is
greater
than
or
equal,
so
so
what
has
to
be
greater
than
or
equal,
so
amount
math
make?
And
now
again
we've
got
this
problem
of
brands
right.
You
have
to
make
an
amount
of
a
certain
brand.
We
haven't
talked
about
how
we're
going
to
create
this
money
at
all.
A
Yet
so
what
I
need
to
do
here
is
create
a
mint
so
for
convenience
purposes
or
just
because
zoe
contract
facet
gives
you
a
different
kind
of
mint.
That's
synchronous
that
you
can
use
inside
the
contract
so
as
ccf
make
zcf
mint
and
it's
called
gonna
be
meant
for
for
moolah,
and
then
I
can
get
a
issuer
and
a
brand
by
asking
the
the
mint
get
a
sure
record.
A
So
if,
when
I
was
in
the
test,
I
used
make
issuer
kit
and
it
gave
me
the
mint
issue
on
a
brand
as
one
object.
It's
different
inside
the
smart
contract,
but
not
that
much
harder.
Okay,
it's
just
different
functions
and
they
gave
us
a
little
bit
different
functionality.
But
now
we
have
an
issue
and
a
brand
so
we're
in
business.
A
So
I
can
go
here
and
say
this
is
the
brand
I'm
talking
about,
and
this
is
the
value
I'm
talking
about
so
1001
and
more
we're
going
to
say
you're
too
greedy,
if
it's
less
than
that,
we're
going
to
be
good.
So,
if
requested,
let's
assert
that
1001
is
greater
than
or
equal
to
actually
1000
more
greater
than
or
equal
to
the
requested
rule
amount.
So
we're
going
to
accept
a
thousand.
A
If,
if
we
put
one
thousand
one
here,
this
asserts
going
to
fail
and
just
say
you
are
too
greedy.
Are
you
asking
too
much
so
if
we
pass
the
assert?
That
means
it's
all
good.
The
requested
amount
is
makes
sense,
so
let's
actually
go
ahead
and
use
the
mint
to
now
create
this
value.
So
I'm
going
to
say
mint
mint
gains-
and
this
is
a
this-
is
again
a
convenience
function.
A
So
what
this
does,
and
actually
let's
go
back,
let's
see
like
when
I'm
developing
this
and
I'm
looking
at
this,
I
like
to
use
the
agoric.
No,
not
the
team,
interesting,
ccf,
mint,
canes,
sorry,
contract
faster,
okay,
that's
better!
So
it's
usually
very
easy
to
go
and
find
whatever
whatever
you
need,
the
the
docks
are
evolving
quickly
and
the
system's
pretty
pretty
fast,
but
the
docs
tend
to
be
helpful.
So
I'm
going
to
mint
gains
and
I
have
to
say
what
are
the
gains
and
what
and
which
seats.
A
I
actually
have
this
the
wrong
way
around
right.
I
would
be
warned
about
this
inside
the
test:
let's
fix
it
right
away,
so
what
I'm
saying
is
mint
gains
using
my
mint
over
here
straight
into
the
seat.
So
now
inside
the
contract,
I'm
saying
this
seat
is
going
to
get
this
value
and
the
want
is
just
a
dictionary
remember,
and
this
dictionary
contains
tokens
and
the
amount
I
want
to
emit
and
the
mint
understands
this
and
it
will.
A
It
will
deposit
into
the
c
tokens
with
under
the
key
tokens
this
amount
and
then
I'm
going
to
say,
seat
exit
and
I'm
going
to
return
here
is
requested.
Moolah
amount
dot
value.
A
A
Yes,
but
so
that's
using
that's
a
good
point
using
the
get
issuer.
I
haven't
written
that
function
yet,
but
this
error
is
already
inside
the
contract.
It's
not
it's
not
inside
the
test.
It's
telling
me
if
you
go
back
here.
Mint
get
issue
records,
not
a
function,
and
I'm
using
that
over
here.
So
I'm
doing
something
wrong
with
this
mint,
and
I
think
maybe
this
is
an
awaitable
object,
so
make
ccf.
Mint
is
returns
a
promise
here
we
go
my
bad
await,
and
now
this
should
work,
get
issuer
record
all
right.
A
So,
let's
see
what
happens
inside
here
and
I
get
a
failure.
Get
issuer
is
not
a
function.
Now
we
get
to
your
issue
right
because
I
didn't
define
this.
This
other
function
that
I
promised
to
define
so
let's
say
get
issuer,
and
now
that
I
have
the
min
and
amount
and
the
issue
created,
it's
really
easy
now
right,
so
I'm
just
going
to
say,
send
the
issuer
out
and
that's
it.
A
So,
let's
see
what
we
get
here
is
erimula
tests
are
failing
because,
instead
of
an
exclamation
mark,
I
asked
for
a
period.
I
need
to
fix
that.
Typo
here
is
a
and
we're
going
to
be
happy
about
ediemul
there
we
go.
A
So
value
80
and
a
promise.
So
here
again
my
test
is
failing
and
it's
failing
at
this
line
over
here
and
the
reason
is,
I
forgot
on
a
weight,
so
it
says:
oh,
I'm,
seeing
a
promise,
but
you
were
supposed
to
see
a
value
right,
so
let
me
fix
that
tests
are
passing
right.
So
again,
I
come
back
to
this
idea
when
you're
developing
your
smart
contract,
do
yourself
a
favor
and
use
the
use,
the
ava
testing
framework,
because
it
really
gives
you
a
super,
fast
feedback
cycle,
and
you
can
correct
your
thing.
A
Your
your
errors
very
quickly,
so
now
we're
at
deep,
equal,
okay,
and
what
we're
going
to
do
now
is
test
whether
our
other
functionality
works
when
we're
too
greedy
we're
actually
not
getting
anything
out.
So
if
I
just
copy
this
test
over
here
that
we
wrote
and
I'm
going
to
say,
5000
instead
of
80.,
so
what
should
happen?
A
Given
the
contract
that
we
wrote,
what
should
I?
What
should
I
change
here
to
make
sure
that
the
test
passes
like
here's,
the
contract,
that
we
wrote
right?
Here's
the
handler!
So
that's
what's
running
when
I'm
when
I'm
sending
the
offering
so
there's
there's
two
things
that
need
to
that
need
to
change,
and
for
this
to
run,
the
return
string
is
different.
Yes,
and
I
think
we
said
you
are
the
offer
result.
Is
you
are
too
greedy,
so
that
already
should
signal
to
us
that
we're
doing
that
wording?
A
Oh
there's
a
full
stop
here,
though,
what's
with
me
in
the
exclamation
marks,
okay,
so
you're
too
greedy.
So
if
I
write
that
I
fix
that.
A
A
A
But
if
I
use
this,
if
here
I'm
just
exiting
regularly,
what
I'm
saying
is:
I'm
not
minting
you
anything,
I'm
just
exiting
your
seat,
I'm
going
to
return
the
ur2
which
is
what's
running
now,
but
why
my
test
is
failing
now
is
because
there
is
no
payment
of
5000
in
there
right.
So
what
actually
happens
to
fix
this
test?
What
I
have
to
do
is
say:
amount
math,
make
empty
and
use
the
issuer
get
brand
right.
A
So
what
I'm
saying
is
compare
what
I'm
the
payment
that
I
got
with
with
a
zero
value,
and
I
can
verify
that
I
have
not
been
giving
anything
by
contract
right.
I
asked
for
too
much.
I
got
the
result
you're
asking
for
too
much
and
also
the
payment
that
I
can.
I
can
still
extract
the
payment,
but
doesn't
contain
anything.
A
A
And
here
I'll
fail
the
test.
If
I
get
to
here,
then
the
test
is
failing.
The
test
should
fail
here
because
an
exception
should
be
thrown,
and
if
is
this
the
last
test?
Obviously
this
works
better
and
here
I'll
say:
t
pass.
Okay,
I'm
going
to
comment
this
stuff
out
so
now
that
the
assert
is
in
there.
A
My
test
passes:
why
does
it
pass
because,
instead
of
when
this
line
gets
executed,
an
exception
is
thrown
this
never
gets
executed.
The
fail,
never
is
never
seen.
Instead,
I
pass
to
this
exception
handler
and
we'll
say
the
test
is
passing.
So
that's
one
way
you
can
test
like
assertions
through
inside
a
contract,
so
there
are
two
ways
you
can
you
can
you
can
you
can
sort
of
like
kick
a
user
out,
one
is
or
you
can,
you
can
terminate
the
the
contract
one.
A
Is
you
just
assert
something,
and
that
throws
a
hard
exception
that
goes
and
that's
propagated
across
the
remote
boundary
all
the
way
to
the
test
or
you
you
do
you
just
do
a
standard
if
you
exit
the
seat
yourself
and
and
extract
it,
and
also
by
the
way
I
can,
I
can
fail
the
seat
right.
I
can
say
to
indicate
that
something
is
wrong.
I
can.
I
can
write
seat
fail
here.
A
A
All
right,
so
that's
us
at
at
this
contract,
so
here
I
want
to
go
back
and
say
we
we
we
covered
the.
We
first
touched
on
this
zoy
functionality
right
so
in
the
contract
zero.
This
was
no
contract.
Just
understanding
issuers
amounts
payments,
purses
this
sort
of
infrastructure
to
define
tokens
so
the
the
the
second
contract.
A
That's
where
I
want
or
contract
one
hacker,
counting.
Second
contracts,
contract,
one,
the.
What
I
wanted
to
show
is:
how
does
this
invitation
lifecycle
work?
So
contract
exposes
objects
which
in
some
cases
can
extend
invitations
I,
as
the
user
or
as
adapt.
I
go
to
the
contract,
say:
hey,
can
you
if
I
have
access
to
some
invitation
infrastructure?
I
say
give
me
an
invitation
when
I
have
that
I
can
then
talk
to
the
contract.
So
this
is
like
this
means
that
there
is
a
contract
deployed.
A
A
The
offer
can
contain
keywords,
something
I
want
something
I'm
giving
and
then
the
contract
gets
to
see
this
examine
the
offer,
decide
whether
likes
it
or
not,
and
then
send
it
back
to
you.
We
haven't
shown
yet
how
zoe
protects
the
user
we
haven't.
We
haven't
done
any
of
that
and
by
the
way,
if
you
here
just
want
to
point
out
the
what
offer
safety
means
or
how
it's,
how
it's,
how
it's,
how
it
works.
A
A
So
I
I
asked
for
80.,
I'm
getting
back
40,
but
since
I
didn't
give
anything
in
return,
there's
nothing
violated
in
the
sense
of
hey.
You
know
I
wanted
to
sell
you
this
for
price
a,
but
you
gave
me
half
and
kept
it
right.
So
zoe
won't
stop
this
transaction.
If
I,
if
I
actually,
if
I
say
if
I
build
a
new
amount
here
instead
of
this,
the
test
should
still
pass.
A
If
I
do
tokens
amount,
math
make
and
I'm
going
to
use
the
brand
and
say
20.,
so
actually
the
test
will
fail
on
testing
the
amount
right,
but
the
offer
went
through.
I
sent
an
offer
to
the
contract.
I
asked
for
80.
the
contract.
Only
minted
me
20.,
the
offer
result
was
successful
here
you
go
but
the
payment.
When
I
checked
the
payment,
the
payment
didn't
contain
80.
It
only
contained
20.
A
and
again
I'm
saying
zoe
is
not
going
to
stop
this
because
you
I
haven't
given
anything
to
the
contract,
so
there's
no
protection
that
I
need
here
right.
I
can
be
unhappy
and
if
I
did
something
offline
off
chain
in
you
know,
you
said,
I'm
gonna
give
you
80
and
then
I
went
in
something
often
that's
a
problem,
but
on
chain
I
didn't
give
anything
into
the
contract.
So
I'm
not
losing
anything.
That's
why
it's
always
not
protecting
me,
but
in
the
next
smart
contract,
we'll
see
we'll
see
how
that
works.
A
So
I
think
we're
doing
really
well
on
time.
I
want
to
do
a
short
break
because
I
think
it's
really
so
do
you
guys
want
to
come?
Shall
we
go
again
in
10
minutes
all
right?
So,
let's,
let's
continue.
I
want
to
go
just
for
a
second
back
to
this
very
first
contract
called
contract
zero
because
I
was
asked
about
invitation,
so
invitations
can
only
be
used
once
and
under
the
hood.
A
Invitations
are
actually
payments
and
we
talked
about
payments
right
here
in
these
one
of
these
first
tests,
and
I
didn't
make
the
point
which
I
want
to
make
now-
that
the
payment
can
only
be
used
once
so
when
the
payment
is
minted,
it's
live
in
the
system.
So
what
happens
is
I
can
once
this
payment
is
minted?
I
can
ask
t
and
verify
if
it's
true
that
the
issuer
get
is
live
of,
the
payment
is
true
right,
so
this
this
part
should
this
part
should
pass,
and
actually
I
think,
it's
an
awaitable.
A
So
this
the
execution
passes
passes
through.
So
once
I
mint
the
payment,
it's
live
once
it
gets
deposited.
What
actually
happens
is
this
turns
to
false
all
right.
So
if
I,
if
I
deposit
this
out,
the
test
should
pass
now
because
I
minted
the
payment
it
was
live
then
I
then
I
deposited
it
in
a
purse
and
it's
not
live
anymore,
so
the
issuer
can
actually
so
I
said
it
was
a
useful
object.
The
issuer
for
that
that
connected
to
the
mint,
can
tell
me
if
a
payment
is
actually
already
spent
or
not.
A
If
it's
live.
If
it's
live,
it's
not
spent
yet
so
what
happens?
If
I
try
to
deposit
this
again
into
a
purse,
I
deposited
it,
payment's
not
live,
and
now
my
tests
fail
and
what
I
get
back
was
this
alleged
mobile
payment
was
not
a
live
payment,
so
I
ca
it
can
be
used
up
payment
or
a
payment
for
a
different
brand
or
it
might
not
be
a
payment
at
all
right.
So
so
I
can't
deposit
this
thing
twice.
A
The
way
I
can
make
this
test
pass
again
is
I'm
going
to
use
the
tri-fill
I'm
going
to
choose,
use
a
try
filtering
here
now
my
test
pass
right,
so
I
can't
deposit
this
payment
twice.
An
indentation
is
also
a
payment,
so
once
you
use
up
the
invitation,
that's
it,
and
this
also
means
you
can
transfer
these
invitations
right.
Let's
say
I
interacted
with
a
with
a
protocol.
A
That's
like
an
option
call,
so
it
gives
me
the
right
to
buy
something
at
some
price
at
a
later
date
and
I
paid
a
premium
for
it
and
I
got
the
contract
as
a
result.
The
offer
result
is
another
invitation,
that's
possible,
so
I
can
then,
what
do
I
do
with
this
invitation?
I
can
use
it
and
interact
with
it,
but
I
could
also
sell
it.
A
So
an
invitation
is
actually
a
payment,
so
I
can.
I
can
sell
the
invitation
to
somebody
else
and
that
person
can
use
the
invitation
because
it's
it's
a
value
invitation
is,
is
value
like
it's
your
ability
to
talk
to
the
smart
contract
and
it's
it.
You
might
have
gotten
this
invitation
at
cost.
So
you
can
then
trade
it
with
somebody.
You
can
you
can
you
can
invitation
for
me?
Then
they
can
use
the
option
right
so
just
wanted
to
make
sure
we're
all
clear.
So
sorry.
A
That's
a
good
question.
I
don't
know,
I
don't
know
where
you
can
so
so.
First
of
all,
if
you
you
mean,
if
I'm
the
user,
then
yeah,
I
don't.
If
I
don't
share
the
invitation
object
with
it,
that's
that's
it,
but
if
I'm
the
contract,
if
I'm
the
contract,
you'd
somehow
have
to
verify
the
identity
of
the
person-
and
I
don't
know-
if
that's
if
that's
currently
possible-
it's
a
great
question.
A
So
let's
move
to
this
next
smart
contract
here
so
initially
we
talked
about
just
this
ert
infrastructure.
Now
we
talked
about
zoe
invitations,
seats
offers
etc,
but
we
only
live
inside
one
smart
contract.
But
this
selling
point
of
blockchain
is
like
this
stuff
is
composable.
I
can.
I
can
move
objects
between
and
connect
contracts
together.
So
how
does
that
work
if
we
want
to
accept
some
sort
of
currency,
so
in
this
in
this
third
contract?
A
So
now
he
went
through
contract
number
one
and
if
we
go
through
contract
number
two,
the
idea
here
is
or
or
what
I
want
to
present-
is
how
to
connect
two
contracts
together
using
by
connecting
their
issuers,
so
that
one
of
them
knows
about
the
currency
or
or
token
or
the
asset
type
that's
emitted
by
another
contract,
and
I
can
I
can
use
this.
I
can
connect
them
and
what's
what
the
contract
is
going
to
do?
Is
it's
going
to
allow
these
in
exchange
for
moulas?
A
So
what
I'm
going
to
say
is
I'm
going
to
I'm
going
to
inside
my
tests,
I'm
going
to
mention
this
and
then
I'm
going
to
be
I'm
going
to
use
those
to
go
and
buy
an
nft
right,
so
the
nfc
is
going
to
be
minted
for
me
and
I'm
going
to
send
the
moodles
into
the
contract.
So
contract
is
empty
again.
A
Here,
what
we're
interested
in
is
here's
what
we
want
to
do
we'll
create
a
moola
issuer
kit.
So
we
we
ourselves
the
right
to
mint
these
tokens,
and
then
we
want
to
instantiate
a
contract
that
we're
going
to
tell
about
what
this,
what
and
then
that
contract
is
going
to
know
about
mulan
can
accept
it
and
check
whether
you
know
it's
actually
mula
and
then
issue
nfts
in
exchange.
So
let's
start
by
look,
it
create
a
sure
kit
and
the
asset
kind
is
going
to
be
nat,
so
these
are
fungible
again.
A
And
that's
my
okay!
So
I'm
naming
these
more
carefully
now
because
I'll
have
multiple,
multiple
issuers,
I'm
going
to
instantiate
contract
number
two
into
a
vat
just
like
I
did
with
contract
one
I'm
going
to
go
ahead
and
copy
that
code,
because
I
want
to
write
it
out
again.
Oh
no!
That's
not
that
okay.
A
And
I'm
going
to
be
in
the
world
of
contract
number
make
fake
that
I
don't
have
to
import
all
these
things
just
like
before
so
import
zoe.
A
A
A
The
key
thing
here
start
instance,
start
instance.
A
A
Okay,
so
the
it
accepts.
Actually,
the
the
the
function
accepts
two
other
two
other
arguments,
and
one
is
so
I'm
going
to
use
code
intelligence
over
here.
A
That's
the
wrong
test:
contract!
Apologies!
Here
we
go,
I'm
going
to
use
this
object,
to
show
you.
It
says:
I'm
accepting
an
installation
so
we're
sending
the
installation,
that's
the
the
code,
that's
been
deployed
and
then
it's
then
it
accepts
a
issue
or
keyword
record
and
terms.
So
what's
an
issuer
keyword
record.
So
if
you
recall
in
offers
we
are
using
these
keywords
and
with
an
issuer
keyword
record,
we
can
tell
the
contract
what
issuers
are
going
to
be
used
and
connected
in
connection
with
what,
with
what
keywords.
A
So
now,
I'm
going
to
say
tokens
are
going
to
be
and
anytime
an
offer
comes
in
with
tokens.
It's
supposed
to
have
this
asset
in
it.
So
this
has
to
fail
right.
You
can't
use
your
user
canadian
dollars
in
in
place
of
the
us
dollars
and
I'm
going
it's
easier
for
me
to
use
use
terms
since
I
pick
up
this
issuer.
So
I'm
also
going
to
say
that
I'm
going
to
repeat
the
same
thing,
I'm
going
to
send
into
the
contract
into
the
terms.
A
So
now
then,
so
we
haven't
written
the,
but
we
have-
and
the
instance
already
knows,
about
the
mullah
stuff
we
just
created
now
here
we're
creating
them
inside
the
test,
but
they
could
be
created
in
another
contract
somewhere
else
right.
A
get
issuer
function
that
we
wrote
for
the
contract,
so
I
can
deploy
the
first
contract
and
I
have
the
the
mullahs
that
are
in
the
in
the
original
contract.
I
got
the
issue
in
my
hand,
and
I
can
tell
another
contract:
hey.
A
You
start
up
and
you're
going
to
accept
the
moolah
that
I'm
just
providing
you.
This
is
the
issuer,
that's
going
to
issue
the
moves
right
and
everything's
going
to
be
run
through
here.
So
this
is
what
we're
doing
here,
but
we've
just
created
the
molecule
ourselves
right
because
it's
a
this
is
a
test.
This
is
a
test
environment
and
now
here's
what
we'd,
like
we're
gonna,
say
we're
gonna,
create
a
public
facet
here.
A
A
So
imagine
we
have
a
first
contract,
which
is
a
faucet
which
makes
us
move
us.
Then
we
were
telling
another
contract
you're
going
to
accept
mulas
and
you're
going
to
meet
nfts
for
me,
but
the
nfts
are
gain
they're,
going
to
be
there's
going
to
be
a
mint,
a
brand
and
an
issuer,
and
I
need
to
be.
I
need
to
have
access
to
the
issuer
to
be
able
to
verify
if
this
is
the
right
kind
of
nft.
So
I'm
going
to
ask
to
be
also
able
to
update
the
issue
and
by
the
way.
A
A
This
is
the
yes
exactly.
This
is
a
want
and
give
this
is
a
proposal.
So
I'm
sending
a
proposal-
and
I'm
saying
I
want-
and
let's
say
I
want
this
to
mint
for
me
and
nft
of
a
certain
type
so
to
be
able
to
describe
to
actually
grab
that
issue
here.
Right,
nft
issuer
is
get
nft
issuer
and
now
I
can
describe
what
I
want
mount
math
make.
I'm
going
to
use
nft
issuer
get
brand.
So
give
me
the
brand
and
I'm
going
to
say,
harden
remembering
my
lesson
here
and
it's
going
to
be
awesomes1.
A
A
I
need
to
use
the
keywords
remember
I
said
we
need
to
use
keywords
to
describe
the
different
parts
of
the
want
different
parts
of
the
gif,
so
I
forgot
that
here
right,
so
I
want
to
give
tokens-
and
this
has
to
be
the
keyword
that
is
here
connected
to
the
issuer.
So
this
is
the
link
right
when
I
send
the
tokens
I'm
going
to
send
something
here,
I'm
going
to
send
it
I'm
going
to
send
an
amount
that
amount
has
to
correspond
to
what
I
told
the
contract
earlier
to
accept.
A
So
I
can't
I
can
swap
this
and
make
my
fake
money
and
put
it
in
here.
Contract
knows
what
it
wants,
so
amount
math
make,
and
he
this
is,
and
the
the
offer
is
a
description.
The
offer
contains
whatsoever
of
any
type.
It's
a
description.
It
says
I
am
proposing
to
to
take
for
you
to
give
me
this
in
return
for
you.
I
want
this
and
I'm
going
to
give
you
this,
but
there's
no
values
here
there
are
no
payments.
These
are
all
amounts.
Amounts
are
just
descriptions,
so
I'm
going
to
make
of
the
now.
A
A
A
A
A
A
Make
moola
brand
100
n,
so
I'm
saying
make
me
a
100
moolah
and
I
have
access
to
the
mint
ain't,
a
lucky
guy,
so
I'm
going
to
submit
this
money
for
myself
now
moolah100
payment,
100.
and
now
I
can
send
this
here-
and
I
say
you
know
I've
said
I'm
sending
you
this
offer
this
proposal
and
please
for
tokens,
use
this
payment
that
I
have
so
this
is
inside
the
test.
If
this
was
on
a
chain.
A
What
actually
I'd
have
a
purse
with
moolahs
I'd
say
earlier,
we
deposited
into
a
purse,
I'd
say:
withdraw
100
from
the
purse.
This
gives
me
a
payment,
we
only
create
a
payment,
but
I
can
actually,
if
I
made
payments
put
them
in
a
purse,
I
can
withdraw
something
and
that's
something
is
going
to
be
another
payment.
So
let's
say
I
withdrew
this
for
my
purse
and
I'm
attaching
it
to
this
proposal.
That's
key
right!
So
I'm
sending
the
proposal,
but
I'm
also
sending
the
value
along
with
the
offer
right.
A
Okay,
then,
what
happens?
What
I'm
expecting
is
an
offer
result
again:
wait
e-seat,
get
offer
result
and
the
offer
result
better
be
here.
Is
your
nft.
A
Offer
is
it
I'm
just
going
to
swap
this,
because
the
actual
is
this:
unexpected
is
over
here,
okay
and
then,
if
that
works,
what
I
want
to
do
is
extract
the
nfc
out.
I
want.
I
want
my
payment,
so
const,
my
nft
payment
is
going
to
be
all
right.
E
c
again
get
payout
and
pay
out
of
what
I'm
expecting
this
to
be
under
the
key
awesome.
So
that
was
part
of
my
offer.
A
A
All
right
here
we
go
so
and
I'm
going
to
check
whether
the
nft
that
I
got
is
actually
this
right,
so
t
deep,
equal
and
what
which
issuer
can
verify
this
nft
for
me.
Well,
the
nft
issuer
that
I
got
over
here.
So
I'm
going
to
say,
nft
issuer
get
amount
off,
nft
payment,
I'm
going
to
wait
this
here
and
what
I
also
want
to
do
is
check
it
against
the
amount
that
I
initially
specified
right.
So
when
we,
when
we
finish
writing
this
contract,
this
this
test
should
check
out.
A
A
So
this
is
the
issuer
keyword
record,
and
these
are
the
terms
I
use
the
same
keyword
it's.
I
can't
decide
if
it's
more
confusing,
to
use
different
keywords
to
show
you
that
it
doesn't
have
to
be
the
same,
but
it's
actually
the
same
issuer
or
use
the
same
keywords,
but
those
are
two
different
things.
So
one
is
the
issue.
Keyword
record
and
these
are
these
are
issuers
that
are
recognized
as
sort
of
like
valid
forms
of
payment
by
the
contract.
A
The
second
one
is
the
terms
I
can
add
anything
else
here
I
can
say:
deadline,
seven
deadlines,
seven
days,
seven,
something
times
inside
days
and
seconds
right.
I
can
add
anything
else
one
here.
I
can
extract
it
inside
the
start
function,
so
this
is
a
way
to
pass
actually
parameters
into
the
contract
and
they're
called
terms
because
frequently
they'll
be
actually
contractual
terms.
A
So,
if
I'm,
if
I'm
starting
an
auction
contract,
I
can
the
terms
is
a
great
place
to
say
this
auction's
going
to
run
for
two
days
because
it
can
be
as
a
parameter
inside
the
contract,
and
I
can
set
this
parameter
right
here
inside
the
terms.
So
anybody
else
can
see
that
you
know
how
this
runs.
So,
let's
go
back
into
this
contract.
I'm
going
to
extract
the
terms
inside
the
terms
is
a
keyword
called
tokens
and
I
know
there's
there's
a
moola
issuer
there,
because
that's
where
I
placed
it.
A
So
what
do
I
need
to
do
here
so
here
I've
actually
created
a
public
facet
and
the
name
public
facet
is
interesting
because
there's
actually
a
function
that
can
that
can
get
the
public
facets.
So
there's
a
get
public
facet
function,
which
you
can
call
on
any
installation
that
you
have
access
to
and
that's
where
this
sort
of
this
sort
of
object
capabilities
access
control
comes
from.
So
if
you
define
something
in
public
facet
implicitly,
anybody
who
sees
the
installation
can
can
get
a
handle
of
that
public
facet.
A
A
A
Make
ccf
mint
and
it's
going
to
be
for
awesomes
and
then
I'm
going
to
say
brand
nfd
brand
issuer
nft
issuer
is
nft,
mint,
get
a
sure
record
okay,
so
this
is
boilerplate.
We've
done
this
before
I'm
creating
the
nft
brand
that
I'm
going
to
use
to
issue
those
nfts,
and
here
I
picked
out
from
the
terms
the
the
emulator.
A
So
I
can
use
it
in
in
talking
about
the
payments
and
this
function
again
the
get
and
if
the
issuer
that
just
exposes
the
issuer
to
everybody,
there's
no
danger
in
exposing
the
issue
or
the
issuers
object.
That
can't
really
create
any
value,
but
it
can
verify
payments.
It
can
tell
you
what
the
brand
corresponding
to
the
issuer
is
so
and
if
the
issuer
will
just
return
this
and
get
mini
annotation
is
is
going
to
return
anytime.
A
I
call
this
it's
going
to
say,
zcf
make
invitation
and
for
my
mint
nft
handler
and
I'm
going
to
save
it
nfts
all
right.
So
the
objective
for
us
is
now
to
write
a
mint
nft
handler
that
accepts
a
seat
and
does
this
whole
job
for
us?
So
it
should.
It
should
look
at
the
offer,
examine
whether
what's
being
offered
is
good
enough,
and
I
think
the
condition
that
we're
what
we're
saying
is
we
want
to
accept.
A
A
The
seat
is
sending
a
proposal
and
it
should
look
like
give
tokens
and
that
there
should
be
amount
here
and
it
should
want
awesomes
if
it
wants.
Something
else
can't
help
you
right.
This
contract
can
melt,
it
can
can
mint
awesome's
collection,
not
anything,
not
anything
else.
So
if
this
passes,
then
we
know
there
is
a
give
and
want.
A
That
the
seat
is
proposing
get
proposal,
and
now
what
do
we
want
to
do
here?
So
we
want
to
actually
check
I'm
going
to
use
assert
again
that
we
are
being
offered
at
least
a
hundred
moolah.
So
I'm
going
to
make
my
test
amount.
Const,
moolah,
100
amount,
math,
you've
seen
this
100
times
make,
and
I
have
the
issuer
here,
moolah
issue,
which
will
give
me
the
brand
and
I'm
going
to
say,
100
n,
so
assert
amount.
Math
is
greater
than
or
equal
the
user
gif
tokens
then
moolah100.
A
At
least
100
moolah
required
right.
So
here's
when
we
check
that
you
know
we're
getting
at
least
at
least
at
least
100
mula
for
for
our
contract.
Okay,
then,
let's
say
this-
this
has
happened
right
with
the
test.
Now
we're
going
to
want
to
mint
whatever
the
user
wants,
but
here's
how
we're
going
to
do
this
we're
going
to
create.
A
We're
going
to
for
the
first
time
this
is
the
first
time
in
introducing
this
we're
going
to
create
a
seat.
That's
inside
the
contract.
Somebody
here
asked
about
like
how
we
can
use
multiple
seats,
so
we
can
actually
create
seats
inside
the
contracts,
a
special
type
of
seat,
called
the
zcf
seat
and
make
empty
seat
kit.
I
think
that's
what
the
function
is
called:
I'm
not
getting
any
cold
intelligence
help.
So
let
me
quickly
make
mtc
get
yes
make
mtc,
so
this
should
work
ccfc
and
what
I'm
going
to
do
is
now.
A
A
So
now
I
minted
the
nft
into
my
internal
contract
and
now
what
I
want
to
define
this
trade,
so
user
sent
me
a
proposal,
so
I'm
going
to
say
and
I'm
going
to
want
to
honor
that
proposal.
So
the
mint
now
has
the
nft
that
I
want
to
get
to
the
user,
and
the
user
has
hopefully
sent
me
a
payment
of
100
mula
right.
So
I
want
to
say
nft
mint
increment
by
I'm
doing
this
in
detail,
there's
a
swap
function
that
can
do
it,
but
I
want
to
do
this
in
in
detail
just
so.
A
A
A
A
A
A
Yeah
paul
just
made
a
mistake
here.
So
what
what
the
user
wants
is
is
an
is
is
awesome
right,
so
I
want
to
mint
those
gains
into
this
and
probably
without
the
keyword
again.
A
So
it's
going
to
mint
awesomes
into
the
nft
seat
and
now
I'm
saying
okay
remove
the
new
loss,
tokens
from
the
user,
give
them
to
the
nft
seat,
take
the
nft
from
the
nft
seat
and
give
it
to
the
user,
and
this
is
now
what's
called
like
a
like
an
allo
get
stage
allocation
right.
So
I'm
saying
this
is
the
change
that's
going
to
happen
and
please
zoe.
A
A
A
A
The
amount
brand
awesome's
brand
did
not
have
as
it
the
of
of
type
nat
rejected
promise
written
by
test
reason.
So
why
is
that
a
problem?
Where
are
we?
Where
are
we
getting
this
error?
Make
get
issue?
Oh
wait!
A
minute.
Did
I
say
here?
No,
I
did
not
so
the
default
asset
kind
is
nat,
but
we
need
to
tell
this
person.
We
want
to
use
a
set,
because
these
are
the
nft,
so
asset
kind
set.
A
A
A
So
again,
my
tests
warned
me
two
tests
passed,
so
my
test
now
passes
what
this
means
is.
Let
me
go
back
into
the
test
contract
and
actually
violate
this.
Just
to
so,
you
guys
see.
What's
going
on
so
what's
happening,
is,
as
users
send
a
proposal,
I
defined
a
currency
somewhere,
a
a
a
fungible
token
somewhere.
I
explained
to
the
contract
the
fungible
token
that
it's
supposed
to
accept
these
mulas
that
I
minted
myself
some
was,
I
send
a
proposal
that
contains
a
want
and
a
gif.
I
used.
A
I
got
an
invitation
I
sent
out
the
offer
with
the
payment
and
I'm
getting
I'm
getting
my
nft
back
right
and
the
nft
actually
is
correctly
defined
as
awesomes
one.
So
if
I,
if
I
actually
change
this
back,
this
should
start
working.
So
now
we
have
a
whole
working
contract.
So
what
happens?
A
A
A
It
survives
multiple
runs
of
the
mint
nft
handler
right,
so
the
ccf
seat
is
built
here
and
if
I
mimp
multiple
multiple
times,
the
reallocation
keeps
allocating
the
money
into
the
ccf
seat,
allocating
providing
this
allocation
to
the
to
the
zcfc
and
it's
moving
those
every
time
an
nft
is
minted
into
the
into
the
nftc
that
I
have
inside
the
contract
it's
reallocated
to
whoever
is
talking
to
me,
but
their
funds
are
moved
into
the
nftc.
So
this
this
is
like
a
seed.
A
That's
that's
that's
keeping
a
track
of
how
much
money
I
got
interested.
I
can
later
extract
it.
That's
actually
a
bonus
bonus
exercise
that
you
guys
can
ask
about
later,
if
you're
interested
in
the
yeah
in
the
reward,
but
now
so
what
I'm
doing
here
is
I'm
saying
the
contract
has
a
bug
or
it's
malicious
and
me
as
the
contract
developer,
I'm
not
going
to
give
the
user
the
nft,
so
I'm
not
going
to
increment
it,
and
I
got
a
failure
here.
A
This
is
what
dean's
talk
was
about
right
offer.
Safety
was
violated
by
the
proposed
allocation
tokens
brand
value,
zero
et
cetera.
So
it
shows
you
what
what
what
happened
what's
actually
happened
and
it
and
what
the
proposal
was
and
the
gist
of
this
is
hey.
The
user
said
it's
going
to
give
you
a
hundred
new
laws
and
it
wants
to
set
up
t
back
and
you
you
want
to
keep
the
hundred
moves
and
you're,
not
getting
the
user
anything
else.
A
So
the
moment
you
call
this,
the
the
reallocation
function
is
actually
moving
stuff
around
and
resolving
these
proposals.
It's
going
to
say,
nope
offer
safety
was
valid,
and
this
is
like
a
core
piece
of.
It
looks
easy.
It's
it's
like
a
it's.
It's
a
line
here
in
the
test,
but
this
is
the
one
of
the
core
value
propositions
of
algorithm
this.
This
doesn't
really
exist
in
in
other
chains,
so
the
contract's
gonna
the
test
is
gonna
run
just
fine.
A
If
I,
if
I
actually
provide
the
nft,
but
I
just
rerun
the,
but
if
I
don't
the
test,
fails
right
and
here's
the
thing
like
this
fails,
regardless
of
if
I
was
a
user
so
inside
this
test,
I'm
actually
talking
this
contract
as
a
user.
This
is
a
public
facet.
I
can
actually
go
get
that
on
the
chain
and
talk
to
this
contract
and
what
happens
is
zoe
will
stop
this
for
me,
regardless
of
whether
whether
whether
I
audited
this
contract,
even
anybody
says
ever
already,
it
doesn't
matter.
A
Yes,
give
and
want
and
deadline
is
another
another
reserved
keyword
over
here.
So,
for
example,
this
is
an
if
this
is
like
a
proposal
for
an
option.
If
you
say
I
will
sell
you
this,
if
you
for,
for
a
hundred,
if
you
buy
within
two
days,
so
you
can
use
the
keyword
deadline
that
says
two
days
and
then
after
the
deadline
it
offers
automatically
stop.
A
Yes,
yes,
you
need
to
use
uppercase
uppercase
letters
here,
but
you
need
to,
but
you
need
to
use
them
yeah,
but
for
tokens
you
have
this.
You
have
to
use
this
right
brand,
which
you
already,
which
you
said
here.
You
said,
okay
for
tokens,
we're
going
to
have
to
use
using
us
right,
but
then
you
can
define
these
keywords
any
way
you
want
right.
So
this
is.
A
A
I
want
to
buy
an
nft
for
the
wrong
currency,
so
let's
say
I'll
do
I'll.
Do
this
entire
thing.
Let's
say
I
want
to
replicate
this
test,
but
now
I'm
going
to
make
myself
another
kit.
A
Of
asset
kindness,
so
I
made
a
new
fungible
token
right
and
now
let's
say
I
as
the
user
I
want
to
swap
in.
I
want
to
swap
in
like
a
different
amount
here.
A
Test
failed,
the
brand
that
I'm
trying
to
the
amount
that
I'm
trying
to
send
here,
isn't
really
the
isn't
really
the
brand
that
I
said
is
going
to
be
associated
with
the
word
token,
which
means
I'm
going
to
I'm
trying
to
slip
a
different
currency
into
the
offer.
But
the
contract
says
no,
that's
not
going
to
work
right,
so
you
can't
buy
this,
so
the
contract
knows
about
which
currency
it
wants
to
accept
which
tokens
it
wants
to
accept
right.
It's
15
27.!
A
I
didn't
really
get
to
deploying
these,
and
I
didn't
expect
to
to
be
honest,
like
it's
we're
lucky.
We
got
through
both
all
of
the
contracts,
but
there's
other
code
in
this
repo
that
I
can
very
quickly
run
now
for
those
that
are
they're
interested
in
a
few
minutes
and
vm
use
16,
which
deploys
both
of
those
contracts
to
a
test
chain
that
I
have
that
I'm
going
to
start
here.
A
And
I'm
going
to
I
like
to
run
it
this
way
that
I
have
three
windows,
so
I
run
the
chain
over
here
and
then
I
run
the
16.
I
deploy
the
wallet
so
and
the
contracts.
I
can't
go
into
detail
anymore
about
how
this
is
done.
What
I
want,
what
I'm
going
to
do
is
I'm
going
to
deploy
both
contracts
to
the
chain,
start
up
the
wallet,
so
you
can
see
what
the
wallet
looks
like
and
then
start
the
react.
A
A
So
this
is
called
essentially
local
chain
deployment.
It's
actually
also
possible
now
to
connect
to
the
agorax
test
net.
So
you
can
use
the
very
same
algorithic
start,
but
you
have
to
give
it
different
arguments.
It's
going
to
go
and
connect
to
the
current
test
net,
but
then
we'd
have
to
go
to
discord
and
say:
hey.
You
know,
faucet
give
me
some
run.
That's
actually
accepted
for
an
issuer,
that's
accepted
on
the
testnet
as
for
fees
and
then
there's
a
whole
shenanigan,
and
we
don't
really
have
time
for
that.
A
A
So
you
could
write
this
functionality
right
I'll,
give
out
invitations
for
money,
but
right
now,
so
if
you
write
a
smart
contract
and
you
you
you
need,
you
definitely
need
tokens
to
to
deploy
the
contract.
A
I
don't
think
if
I
I'm
not
sure
if
you
need
a
server
currency
to
interact
with
the
contract,
not
not
100
sure-
and
this
is
going
to
change
right,
so
they're
going
to
go
main
at
one
at
the
end
of
the
summer
and
then
maintenance
is
going
to
come.
So
while
it's
deployed,
this
is
what
the
agoric
world
looks
like.
So
it's
got
a
bunch
of
money
in
it.
It's
not
exactly
real,
so
don't
rush
to
spend
the
usdc,
but
something
to
work
with
I'm
going
to
run
agorik
deploy.
A
This
is
all
by
the
way
in
the
github
report.
If
you
want
to
do
this,
all
these
commands
are
in
the
github
repo.
You
can
just
copyright
them
and
this
is
going
to
deploy
both
of
those
contracts
that
we
just
wrote
and
it's
not
deploying
the
contracts.
I
wrote
now
it's
deploying
the
contract
solutions
that
were
already
in
the
repo
just
you
know,
because
I
changed
things
around.
I
didn't
write
it
exactly.
It's
the
way
it's
there,
but
to
work
with
the
dap.
A
I
need
this
to
work
just
like
the
contracts
and
what
happens
now.
There's
a
question
about
this
on
during
break
when
you
deploy
the
script
when
you
deploy
the
contract,
the
script
itself,
this
deploy
script
is
a
javascript
script
and
it
grabs
the
ids
of
where
the
contract
is
on
the
chain.
It
stores
them
in
a
javascript
file.
It's
like
a
dot
js
file
and
that's
picked
up
by
that
dap
by
the
application.
A
So
it's
running
see
and
it's
it's
moulin
interconstance.
Both
contracts
are
deployed
and
I'm
going
to
start
the
so
I'll
move
to
the
react.
Ui
and
we'll
go
to
yarn
start
right.
So
we
build
a
very
simple
application.
It's
going
to
start
up
here
and
now
it's
telling
me
waiting
for
inference
to
be
activated.
So
first
thing
that
happens.
Is
you
have
to
approve
the
this
this
in
your
in
your
wallet
so
and
that's
also
how
offers
work
in
in
practice?
A
So
we've
only
looked
at
this
in
tests,
but
I
want
to
show
this
one
run
through
to
to
show
what
this
happens
like
what
works.
If
you
deploy
to
change
so
I
say
accept,
and
now
this
app
can
actually
talk
to
the
talk
to
the
chain
right
this.
So
this
is
initializing
it
in
a
bit.
It'll
show
me
that
I'm
allowed
to
mint
I'm
allowed
to
mint
in
the
moment.
So
this
actually
talks
to
the
contract
number
one
and
I'm
going
to
say
mint
me,
60
mla
get
me
samola
and
again.
A
Another
interesting
thing
offers
get
shown
inside
the
wallet
right.
So
there's
we've
added
a
lot
of
helpful
sort
of
console
messages.
So
even
if
this
interface
told
me,
I'm
minting
you
600,
it
doesn't
really
matter
because
the
offer
is
shown
to
me
the
wallet,
parses
the
offer
and
shows
me
what
the
offer
says.
Not
what
the
ui
told
me.
So
actually
I
asked
the
user
because
I
have
access
to
this
wall.
I
don't
need
to
even
trust
what
the
app
is
showing
me,
because
I
can
examine
this
inside
my
wallet
when
the
offer
comes
through.
A
I'm
saying
add
this
offer
to
your
queue,
and
this
wallet
picks
up
the
offer
that
I
sent
from
the
dap
and
then
I
can
say
yeah.
I
approve
this
offer
as
a
user.
I
like
this,
it
says
want
so
it's
parsing
the
one
keyword-
and
this
is
all
this
is
all
stuff
that
that
you
know
moolah
has
a
certain
name
here.
A
I
won't
go
into
detail,
but
I
want
to
approve
these
new
purses
and
again
these
are
the
wallet
you
already
know:
concept
of
purchase
purchases
holder
only
one
type
of
currency,
so
I've
been
given
four
persons
in
the
beginning,
but
I've
my
d
app
has
said:
hey.
Could
you,
as
the
wallet
add
two
more
purses
for
these
issuers
right
and
that's
the
mulizure
and
the
awesome
nft
issuer,
so
they're
both
added
to
the
wallet
now,
because
I
suggested
it
from
the
dap
they're
added
and
now
the
offer
is
already
talking
about
this.
A
A
I
didn't
expect
everybody
to
come
back
after
the
break
honestly,
so
I
hope
this
has
given
you
sort
of
like
a
starting
place
like
this
is
the
very
very
beginning
of
working
with
agorik,
but
I'm
hoping
you
have
the
absolute
baseline,
that's
necessary
to
even
like
begin
to
read
the
documentation
and
understand
like
what's
going
on.
So
thanks
very
much
for
coming.