►
From YouTube: NEAR Certified Demo | Episode 6.1 -- Rocket Approval
Description
This demonstration was presented by the author(s) after just 1 week of working with the NEAR platform as part of the NEAR Certified Developer program.
You can find the source code to this demo here:
https://github.com/Learn-NEAR/NCD-06--rocket-approval
---
Follow the latest from NEAR Protocol on:
Website: https://near.org/
Discord: https://near.chat/
Blog: https://near.org/blog/
Twitter: https://twitter.com/NEARProtocol
GitHub: https://github.com/near https://github.com/nearprotocol
#Blockchain #FutureIsNEAR #NEAR #nearprotocol
A
B
Okay,
cool-
and
maybe
here.
A
B
Yeah,
the
idea
was
just
to
to
try
to
tweak
a
bit
the
contract
and
to
be
able.
So
at
the
moment
this
is
a
fake
data
I
would
say-
and
the
idea
was
that,
if
you
log
in
with
another
account
which
is
not
an
approver,
then
you
have
this-
that
you
can't
approve
mission.
So
here
it's
the
live
one.
So
the
contract
is
not
deployed,
and
here
let's
go
into
the
source.
Maybe
so
here.
B
Yeah,
so
it
was
like
it
was
a
bit
it's
a
bit
similar
from
multisig.
The
idea
was
just
to
yeah
store
data,
have
some
logic,
so
so
yeah,
let's
take
the
application.
So
what
we
wanted
to
do
was
to
retrieve
like
a
get
from
the
blockchain,
a
some
missions,
what
we
would
call
mission
with
the
approval
status.
B
So
at
the
moment
this
data
is
fake,
could
not
connect
that
yet
to
the
contract
and
anyone
could
create
a
new
mission,
say
hello,
but
only
axel,
and
I
would
be
able
to
approve
and
yeah.
So
that
was
the
idea
just
to
try
to
do
this.
Little
data
update
from
the
contract
so
the
front
end
and.
A
B
You
can
see
the
contract
is
a
bit
small.
We
had
some
some
issue
with
the
loop,
so
we
learned
that
doing
a
loop
is
not
an
easy
task
with
assembly
script
so
move
to.
We
are
using
not
a
set
but
a
vector
and
trying
to
have
a
more
better
data
structure.
A
B
For
the
contract
and
for
the
front
end,
it's
it's
very
close
from
the
create
new
app.
B
With
so
this,
this
is
not
up
to
date,
but
we
got
it
working
and
this
afternoon
yeah
nothing
fancy
here.
Just
you
know
loading
some
some
data
from
the
contract,
but
we
kind
of,
I
would
say,
40
percent
in
our
job,
so
yeah
there's
not
much
to
present.
Sadly,
but
yeah.
I
don't
know
here
if
it's
not
even
connected
to
them
to
the
contract,
the
contract
is
not
live
so
yeah,
so
yeah.
Sorry.
B
Yeah
sure
here
index.
A
B
B
Yeah,
so
we
didn't
go
with
an
init
as
we
could
see
in
some
other
contracts.
I
guess
there
would
have
been
step
two
with
a
proper
in
it
at
the
moment.
It's
not
using
this,
not
even
using
some
models
but
yeah.
The
idea
is
that
the
front
end
could
get
with
the
context.
A
B
The
person
that's
logged
in
is
a
valid
approver,
so
yes,
no
authorized
mission.
This
was
intended
for
here
so
to
have
a
click.
There
is
a
button
that
doesn't
show,
because
I'm
not-
I
can't
approve
mission
and
to
to
send
a
call
to
this
function
here
which
would
update
the
status
in
a
persistent
map.
So
it's
just
approver
plus
mission
id
so
set
key,
true,
false,
so
very
basic
and
then
the
last
one.
This
is
where
we
like
been
struggling.
B
Was
they
do?
The
goal
was
to
use
this
function
to
show
the
data
here,
so
we
send
an
mission
id
and
we
get.
B
Just
for
a
specific
yeah
here,
it's
for
specific
one,
and
in
that
case
the
front
end
will
do
multiple
call
in
that
loop
but
yeah.
Maybe
it
can
be
done
in.
A
A
You
would
need
to
know
which
mesh
which
missions
they
have
authorized,
so
there
should
be
a
way
to
just
return
if
it's
not
persistent
map,
maybe
there's
unordered
map,
it's
another
persistent
data
structure
and
from
this
you
can
just
get
all
the
keys.
This
would
give
you
the
list
of
all
the
approvers
and
their
mission,
combinations.
B
A
You
could
just
get
all
the
values,
but
that
you
know
that
wouldn't
tell
you
which
missions
are
there,
so
you
need
some
some
way
to
get
that
that
piece
of
data
off-chain,
which
is
what
you
know,
what
missions
are
even
registered
right.
B
Yeah
yeah
yeah:
it's
was
trying
to
to
find
more
with
the
oldest
persistent
set,
persistent
map
and
so
on
and
yeah.
That's,
I
think,
that's
the
main
thing
with
blockchain
development
is
that
you're
not
as
free
as
you
are
with
other
development
like
web
or
because
data
structure
is
very
limited.
Somehow.
A
Yeah,
so
so
all
of
all
of
these
data
structures
are
just
wrapping
storage,
there's
a
key
value
pair.
So
but
they're
just
somebody
wrote
them.
You
could
write.
Others
if
you
wanted
to
the
limiting
component
is
the
the
amount
of
time
that
you
have
for
the
for
the
compute
and
retrieval
because
there's
a
gas
cost
there.
So
you
know,
there's
only
so
much
work
that
you
can
do
when
you
return.
A
So,
if
you
have,
depending
on
the
size
of
the
data
structure,
more
than
100
missions,
you
won't
be
able
to
list
them
all.
You'd
have
to
paginate
right,
that's
your
biggest
limiting
factor,
but
you
should
be
able
to
loop
over.
Probably
the
thing
that
was
disorienting
for
you.
If
I
had
to
guess,
is
that
assembly
script
doesn't
have
closures
yet,
and
so
so
this
function
that
you're
writing
here
on
line.
23
is
likely,
assuming
that
there
is
access
to
the
outer
scope,
but
you
won't
have
that
outer
scope.
A
B
Yeah
indeed,
this
is
it's
not
committed.
Yet
that's
my
draft.
A
B
So
yeah
it's
not
much
wish
we
should.
We
could
present
more.