foreign
[Music]
we're going to be talking in English and
if you don't understand anything on the
slides please let me know no problem but
just focus on me
so on the layer one we had amazing
applications we got a lot of
applications very interesting for
example amms
that could let you transact with
different tokens but these were very
very very expensive right
we also had oracles that allow us to
introduce data of chain into one chain
right but it was also very expensive
moving data on chain is expensive
we also had gaming where you can have
nfts very cute nfts you can have your
sword for your game you're gone and so
on you can maybe move it to another game
but still the game was
was lit was directed by a single entity
that had the control over the game
so the game Logistics the game logic was
not on chain it was not Auto regulate it
yes because it's very expensive right
also we had both in apps but also again
writing in the storage right into the
blockchain is very expensive so voting
was also real expensive on layer one so
this is
very interesting applications that we
have in the layer one both that
introduces problems when we are talking
out costs so we know the states the
current state of things is either we
have a huge machine that is processing
everything we know this and for example
Banks Acorn apis companies startups and
so on very huge machines they can
process a lot of transactions very
quickly
and now we're looking at the blue Parts
where we are trying to create a
centralized system which is when a lot
of persons can verify the Integrity of
the system right this is what we're
trying to do
the problem is that this is very slow
and this is very expensive and the
computation repeated itself various
times at different points
so it's not optimal for scalability
of course this was a choice when we
decided to create theorem we wanted this
centralization we wanted security it was
a choice to sacrifice at that moment's
scalability
but now we know better and we can do
better stuff so the question is can we
head can we get the centralization
security and also scaling yes we can do
with your knowledge roles
and we are here today to talk about star
Nets
so we're talking about a platformer
layer 2 that is secure by ethereum
it allows you to create smart contracts
General smart contracts it's too
incomplete
the cost of execution is much lower and
you can create amazing things that are
not possible even imaginable in the
layer one so we can get much more for
each piece of gas
so this is a quote from Albion session
our founder
at Bangles in the 29th of July
he's talking about the objective of
starnet which is creating a solution for
scaling that is focus focus only on
scaling theorem and this is called Cairo
so our Star Wars are experts on both the
attribution machine and also creating
stock systems and there was a conscious
choice not to use the evm to scale
we created a new virtual machine called
Cairo this is this WhatsApp comes choice
because we believe this is a way to
achieve the biggest scale
and this scaling is going to it's going
to come from Smart contrast with them in
Cairo in Cairo is a virtual machine but
also language we have
so what is Cairo
currents are doing complete language
programming language that allows you to
create brewable programs in this case in
Spanish
you can execute your Cairo program and
then you can prove a smart contract on
the layer 1 on assume that this a
transaction was correct
this allows us to have much more
much cheaper transactions cost and
because Pro when the smart contract on
the layer one
Valley days that this proof is correct
it's much cheaper than running the
transaction itself so this allows us to
create more to get much more scalable
Solutions uh using the layer 2 in this
case with cat with Chiron starts
so this is our solution let's generally
follow-ups specifically talking about
Chiron starnet you can get extremely
extremely cheap computation thanks to
Cairo and
we can create and this is key we can
create interesting applications
that are only be that could only be made
using the layer two it's impossible
practically impossible to do on layer
one
this is an interesting data that we got
during the last week
a standard plus start startix blocks
stagnant so Star Wars the company has
different solutions one of them is star
trekx and the other one is started that
we're talking about right now and both
together had more transactions since
July than Bitcoin lining and all layer
2's this is something that is not very
well known whereas you can see coming
from July the blue line is the starcakes
plus Stark Nets
down is Bitcoin in Orange and under that
are other layer 2 Solutions
so as you can see Stark is an external
it's currently being very very used and
we have been live in Maine since June
yes June 2020. so we are not new at this
we know how to do it the Star Solutions
is very good and as you can see it's
very very it's been very used and very
interestingly also is that 70 percent of
that come from nfts
it's very interesting
for example with immutable
with sorare
interesting
so now thank you very much for coming
now we know that Stan has a lot of
potential
you can create needs whenever you want
you can deploy it currently and actually
today we'll be creating a boating
application that we're gonna be trying
on starnet
you can use it Cairo is a different
language we know it but it's also a
language that everybody can use it's not
hard at all
so my name is Marshall Hill I'm a
developer Advocate server and thank you
very much for coming today the golf
today is for you to get the resources to
start to start studying Cairo if you
want to go into starnet and also make a
small example of a boring application
so now we talk a little bit about what
is being done in layer one that is very
costly and we can improve
what now let's talk about what can we do
with all this power that chip
computation can provide us
for example we have a solution called
ckex it's a company that is offering
high frequency trading this of course is
impossible in layer one imagine having
micro positions and trading with them
I don't know it would be impossible
because of the course in the year one
makes no sense
we talked before about voting voting is
very expensive too so there are also
solutions for example snapshot X that
allow us to bolt much more cheaply yes
so there are a lot of applications that
have been already developed since I
started using all this power another one
for example is the government of Buenos
Aires create an application that allows
you to have an identity on the
blockchain as a user as a citizen they
show they chose starnet because it's
very secure it's highly highly secure
and also it's very scalable and very
quick
so these are only some examples but the
custom is growing by the day for example
we have tools
amazing tooling for example coming from
hard hat open sepulime and chain link
soon Alchemy those are well-known
companies
but we also and maybe more interesting
we have different applications on the
top as you can see that are being
created originally on the layer too
so this is very interesting because it's
at least my opinion is not for the
company overall but it is interesting
when a company comes from Lane one and
then puts its applications layer to it's
great they are using the the lower fees
and that kind of stuff
however I believe that the real power is
being used but those that are created
natively on Cairo in the layer two yes
it's a little bit like for example when
you have Windows in your computer
Windows 98 for example and you had this
nice and cute games and then comes for
example Windows XP right it's more
powerful you can do much more stuff and
these games can be can be passed into XP
okay so these old games can be passed
into the new software and they run well
it's okay they maybe could leverage some
of the power of the new operating system
but the real power comes from that that
is being built on top of XP that could
not be done in the previous operating
system right that's what we're talking
about here something that is completely
different and out of the leak of the
layer one we can create something very
very interesting that is impossible to
create for example we were talking about
the games that they didn't have the
logic on chain is now possible so
imagine that you can do operations
summations multiplications divisions
whatever you can do that because the gas
is much much cheaper so a company I
don't remember I know the num what is
the name of the project that was
creating this on chain reality
topology so topology created a game on
chain
and it's Auto regulated okay so do you
need a central limited to the sides if
you're allowed to play it or not so it
will stay forever as long as ethereum
exists this is something that is again
impossible layer one and for me those
the powers is going to come from that
part
so now the question is
um what can you create
that is completely different from what
has been created in the layer one using
all these new power
all these new potential that you can
find in the layer 2. that is so
completely different never done before
imagine you can do for example machine
learning on chain you can print models
on chain you can create any kind of
mathematical operations on chain
it's completely different and what we
need is people I start building these
applications that are eye-opening
so uh for the beginning you would need
to start installing Cairo starnet hey of
course I don't expect to expect you to
do it right now but you can follow these
QR codes for some instructions on how to
install Cairo and starnet so you can get
going
it's not difficult at all
and say while you scroll it we also have
a report that is called started edu
where you can find a lot of educational
material I will show you the link with
in a couple moments
and Inside Story du you can find a lot
of tutorials on different stuff for
example you can know how to
how the cowboy syntax look we're going
to look at it in a moment
you can for example create a token an
erc20 you can create your nft your c721
tutorials for even more interesting how
you can create your own Bridge from
layer 1 and layer 2.
Bridge
and for example how can you create your
own wallets so you can if you can scan
this QR code you will find all that
material inside and you can get
uh going by yourself without without any
problem those tutorials are amazing and
they have onboarded a lot of people into
the ecosystem
also we have a newsletter that is very
nice and you will have a lot of
educational material there too and also
some interesting projects happening on
the on the on the ecosystem it's also
there you can subscribe it's a soft
stack newsletter
and finally what we're going to be doing
today is a voting application
they will allow a person to either vote
for one or zero one for yes for example
zero for no and deploy it on the test
Nets if you have any question until now
you can tell me this is the report that
we're gonna be using so if you want to
have the report you want to clone it you
want to copy the code or just look at it
feel free to scan these QR codes
any questions comments well we'll start
with the coding parts
oh okay and I have a question actually
how many of you know how to code in
solidity can you raise your hand how
many of you have ever coded in Cairo
oh a few of you cool
coming from so late into Cairo is very
simple yeah really really simple and
it's great that you're already working
with solid
perfect
you want to go to Tesla and see away and
interact with with this contract feel
free also to scan these QR codes the
test Nets already working with this both
team contracts
foreign
here if you want to come also and I
don't know guys do you want to add
something else before we start going
oh perfect
okay
do you need another QR codes uh do you
have already the the one with the
contract will win we're going to use is
this one remember please
so let's go
to the counts
so this is our boating contract
again the goal is to create a contract
that allows certain predefined addresses
for example me as the admin of the of
the of the boat I can tell okay this
address can vote this or address can
both these are the Rescue Bots because
we don't want everybody to be able to
post only certain participants of of a
project I don't know
and they will be able to vote Yes or no
just with one no with zero and yes that
will be all
so for this let's review the
structure and how Carol looks
here we are importing our packages very
similar to how it looks in python as you
can see it
then we Define its drugs
as you would for example in Rust
flush the grain are both counting
structs where you will be able to store
the boats with yes or no
so for example we'll have 10 volts with
yes zero bolts with null something like
that the counting of the boat
secondly we have border info where we
store information about the Border in
this case I only very simply allowed I
simply added an allowed
member that it will have a one if it's
allowed to vote or zero if not if if
this person has already vote it will
have a zero
now coming to the storage
this is storage variables
uh allow you to know if you're not solid
already these are very similar to you
they allow you to map from when
um from one expression to the other in
this case for example the first one now
let's go to the third one here
I am able to map
and address
to to a is register Bible that in this
case is a field so Cairo is type it's a
type language
now you might ask yourself what is a
felt
everything is a fell inside Cairo
conversion to Felts
and basically for our purpose right now
if you want we can get a little bit
deeper in a moment both for now in order
to
to get to make the most of the time I
felt it's like a big interview
a huge interior number okay
so in this case as you can see the
address
has not address type as in solidity it's
a field okay
so we're mapping an address there is a
failed to a field called is register
that will have a one or zero or whatever
we haven't defined it yet
and on the other ones we are mapping our
information and interestingly in the
first one we are mapping nothing yes
nothing
to a structure about Counting
so this allows us to read or write into
the memory that's as simple as that I
can read this
or I can write into the memory using
these ones
so using the storage variable boat in
status and if we read it and if I I will
go right now to the deploy contracts
so this is the deploy contract I'm using
right now boilinger which is a Blog
Explorer for starnet
if I go to the read part of the contract
I can see
what both in his status is doing
using a getter function that we will see
in a moment you can see the status of
developing right now because nobody has
both Jets we have zero codes with this
three boats would know so that is the
storage we are reading right now this
storage variable will I get our function
that we'll get to that in a moment
and also we have the boring info and
it's the same everyone goes into this
but basically we're storing information
into the uh in this into the storage of
the
of the blockchain
now let's go to the Constructor looks
very similar you know we're doing an
initialize your your contract with your
deploy it you have to Define certain
inputs
as insulated exactly the same name
so this Constructor will ask for three
different input Bibles as you can see
now we can we can view how the a
function looks into Cairo
it's very simple very similar also to to
Python and what is important here is
this part these are the inputs the
explicit inputs to this function in this
case the inputs for the Constructor that
we have to provide it when we deploy
this contracts
so I'm asking for an admin address the
person that's going to be able to to
manage this contracts with a felt again
then the number of addresses that will
be able to vote
and finally
the
disappointed
so it's important to know that Cairo is
a low-level language so here we can
manage the memory we have to manage it
so the register addresses is basically a
vector with a different addresses
arrival to both I can add five six seven
eight whatever
and this pointer felt
points to the start
of that Vector but you would even notice
that this the logic behind it is that
this is pointing to the start of this
array
of different addresses but you won't you
will notice this do as you will see
then we're basically using a contract
because we have open simply on top also
of stone it so you are able to use a
very secure contracts thanks to open
sampling and we're using the owner will
contract from our principaline before
I import them here
so I imported The Honorable a contract
and the possible contract libraries from
openstepperling owner will basically
defines who the owner is of something
and possible it allows you to post a
contract in case of an emergency say
that for example my application is being
hacked so I can pause it as simple as
that but also we have erc721 Logics and
erc's 20 so you can use it with open
supplement that's very very useful very
very useful
any question until now we have seen the
Constructor we can see in the storage
variables Strokes how to import how are
you finding Cairo too difficult or is it
nice
any questions yes
have you
sorry what was the question
yes for example we have in this case we
will be using addresses
that are in an Excel in hexadecimal
format right it will simply be converted
to a field
behind it will be
we will actually deploy right now our
control using hex hexadecimal values and
you will have to convert two Fields but
you also could compare it to a field and
also you play with this no problem right
now we can think of it like big integers
and we can get deeper into that
any other question right now we have
seen Constructors towards variables
Strokes
well perfect okay so here our
Constructor and with this we can deploy
our contracts
also this
um as you can see
the structure of the contract is very
similar to solidity we're trying to
follow the guidelines of smart
conducting solidity you have Getters you
have the Constructor and the format is
very similar also if you go to this
contract is very well commented so you
can know what is happening
because
foreign
I think you guys can yeah sure so
there's no inheritance in Cairo you
don't inherit your contract what you do
is you import your function so if you're
looking at the the top of the uh of the
contract up there here is importing a
templates developed by open the printer
is importing the full contract which is
called audible so it means that he
Imports all the functions that are
inside of this contract and inside of
this contract you know it creates it
creates a few variables that can be
initialized and
um one of them is called the initializer
which is supposed to be called during
this Constructor does that make sense
yes I was just curious because usually
that's
thread
so it's not explicitly it's not
automatically initialized because
um because it's not like the contract is
not ownable it Imports some function and
it has no way to know that this is the
specific context of the Constructor so
you need to initialize it explicitly
regarding the question on felt earlier
um I'm not sure what confuses you but
when you're looking at variables in
solidity you know at the bottom of it at
the end of the day it's a number and
Cairo is a fairly new language it will
get better in the next few months but
right now it treats everything as a
number so if you want to perform actions
when you need strings you basically need
to assume that you receive them as
numbers you convert them you do your
operations and you do all this kind of
stuff make sense
sort of
yep
yeah so a felt is as you mentioned
earlier I think I heard you say it it's
a field element so Cairo is like
the felt you can't think of it as a big
end but it's basically a number over a
big film The Field that is a prime that
does indeed uh
um field integer mathematics and
arithmetics that makes sense so it's
really like you can treat it as modulo
operations the only time where it gets
weird is for divisions division sucks I
don't like them
no problem with that
so for example we were talking about the
honorable contract this is the one that
were important so we have it here
locally and we're importing for me this
is the owner which comes in a namespace
so we're importing these functions
yes
there are no inheritance in Cairo
perfect so going back to
I can't read
two
so we import these functions honorable
and possible from functions inside the
ownable namespace and inside the
possible namespace you can yeah
and
there's a question
[Music]
foreign
[Music]
yes open Zeppelin is working to create
the standard implementation so any kind
of contract you have on solidity you're
used to have
that is done by open Zeppelin we're
walking towards having that that being
said I mean it takes time to develop
contracts that are secure and everything
so if you want to develop them you
should it's worth it it's fun and you
know you may develop stuff that gets
used by other people which is great
this actually principally the contracts
incredible principling they have a lot
of contributions from people outside the
community so that will be where it also
if somebody manages to write a Cairo
contract that is the equivalent to this
taking contract in synthetics which is
used by everyone I'll buy you a beer
more than a view
[Music]
[Laughter]
it will eventually happen it's very if
you it's one of you
okay
so we got our Constructor
and then we can get to the here we're
using the initializer function inside
the ownable namespace
and then we go to the Getters is very
simple functions by definition in Cairo
are private not like solidity so here if
we want to have Getters functions to
read information we have to explicitly
tell that they are getters so and
something that I forgot to mention
before but this is the way
like very similar to how you do it in
Python
how do you define that this has a
particular set of properties this
function that that is coming in this
case with view we are defining get our
functions functions what you can read
from
so right now we're creating this admin
function that as you can see is exactly
the same format as it comes in open
sapling for example in erc20 or erc721
simply reading who the owner of the
contract is so for example if I go again
back to the contract deploy control here
I can
read
who the admin is as you can see this is
a field
but if I convert it to hex this is the
owner of the contract that is myself
is this same direction so talking about
wallets it's a good opportunity right
now
you can use right now RDM X which is
this one
and also Bravos that is this other one
very recommended you can use the
Standard faucets you can simply put in
Google started faucet and you will be
able to send yourself some fake it so
you can start making some interesting
things using girly or more interestingly
you can also Bridge your own it from the
girl testnet in in the layer one into
the layer to start it for example here
we're using program I can I can ask for
some fake it send it to my metamask for
example
and then using the bridge I can connect
my meta mask which is currently my my
wallet in layer one and connect for
example RDX here as my wallet layer 2
and I can reach these fake it from girly
layer 1 to layer 2. so this is also very
interesting it's the same thing as
asking for it in the faucets
so going back to the contracts
we have another gear function here it's
also a very typical open setting style
function where you what we are posting
we're asking when we think if this
contract is currently post
very simple
and then more interestingly here we have
a view function to know the boring
status is the one that I showed you
before it will let us know how many
people voted this how many people bought
it now
as simple as that again you can see in
this function that we have an explicit
argument and by now you are already
asking yourself what is this
what is this inside these keys
these are implicit arguments
this is something that is different from
other languages you might not seen that
before but basically uh these repeat
themselves all the time
Cisco pointer person pointer and Rich
check Pointer while interacting with the
memory here so we are talking that these
are Pointers actually into a felt and to
a stroke Circle has built it no problem
no we will need to get that that is
something that we're repeating in each
function
it doesn't matter
the real use is here so we ask in here
for an explicit argument that is about
Counting
sorry sorry we're asking for nothing
here it's empty the inputs and the
output is this a status a variable
called status that is about counting
structure that we saw before again
Kairus type is a type language this
helps for security
any question until now for this function
for example yes
yes
this is
again you can read it
you can read from the gates boring
status this is the one that I was
showing before
and currently the votes are yes or no
this is practically in the structure we
have and Define here
this one both yes both know
it's exactly the same here
Okay so
foreign
[Music]
explicitly telling these functions that
you have passed them
so they for example when we are reading
from the from the storage you have to
provide these functions that the sorry
the pencil pointer and the Cisco pointer
you have to provide them and they go
into the read function so inside here
our implicit function implicit arguments
you don't see it because they are
implicit but
yes
exactly this input functions if I take
them off they will have an error
no problem
it's it's not hard to to to get used to
them and also you can see each function
that I adding here has them repeated so
no problem with that
okay
also we have an overview function where
we are getting the status of a motor and
just if you were simply reading into the
voter info
a storage variable that we have before
using the argument reads so now going
deeper into this we can read and write
from this storage function
in this case we are reading
and as you remember this search function
asks us why do you surround device and
it was precisely a failed so if we
provided a field then it will return us
let's see once does it return
yes if we provide an RIS it will return
us about our info structure okay
so here I'm reading from it
and then we're returning it simply as
that status equal status because the
name of the variable here is a status
and to see an example of how to write
exactly the same
the same storage variable that we saw
before motor info we were able to read
from it if we are imputing with the
address
and we know we now know that it returns
an instructs okay so now we can write
using the argument right we can write on
it
so we're writing on the storage of our
contract
and right now this is basically an
address we will go deeper in the moon
over it but this is an address
for this address please map
this instruct okay
very similar to how you
look at it in solid
yes
sender is a
I think we have it here get code address
with this you're getting the address of
the of the contract that is calling this
this contract so for example in this
case this is the most important function
is the both function
so what it does is simply it's getting
the address of the color
is turn it and then
we'll reviewing the information of this
person to see if this person has already
bought or not because we can only allow
them if they have bought it
and just in a moment we'll go into that
um
could you repeat the question a little
bit louder please
value
like an address there's no notion of
msg.value in stock net because there's
no native currency everything's in near
C20 so there's no value attached to a
call there's no
um and there's no payable function
that answer your question
Okay so
yes
[Music]
um
so let's go quickly into the most
important function the two most
important functions the register voters
and this will help me to
and talk a little bit more about
recursion that we use in Cairo
so again as you can see we have the
implicit arguments as always and then we
are asking for two explicit arguments
the register address Lane this this is
the the length of an array
and the second value is the array itself
so first argument is the length of the
length of this array the second argument
is the the array by itself
then what we're doing here is
and again you can see all these
contracts in the report I showed you
before isn't started with you
in case you are
you want to follow it closer in your
houses and
then what we're doing here is simply and
this is a at least a classic function of
Cairo that is using recursion so right
now we don't have Force
in Cairo you have to use precaution and
this is a classic function for it
when we review here is that uh it is the
end of the recursion so if we have
already passed to every each of these
different members of the array that is
if the length is zero then we can return
and the recursion is finished
then he will create a small a small
struct the water info do you remember we
defined the stroke called motor info
here we are creating this butante
info where we have this new motor info
so empty anything here that allow is
equal one it could be zero for example
so this function what it's doing is that
each of the address that I'm providing
it will register them as voters and we
tell we tell us that they are allowed to
vote okay
and then continue a little bit with the
recursion
what we're doing here is writing into
storage into the storage variable
register motor
yes this one we're mapping as you
remember before we mapping an address to
a number so this is an address what we
have here
is this is the array as very similar as
you would do it in Python for example on
all languages you have that right and
you can index to it using the square
brackets okay so I am indexing in the
inside this array for this could be a
number like one or two or five
depends on the number of address that we
are adding
and then we say that the value for that
address is one we are simply mapping it
here
and then we become the recursion part
here
we are reading again the same function
and providing the length but this is a
lower length as you can see if we have
for example five different voters that
now we are providing it with four okay
and we are sending it with the register
address and then it will repeat it will
repeat until it passes through each of
the different addresses and it is
starting for from the last one up to the
first ones
I know what this looks a little bit
crazy here using caution Bots
it's no problem you you can get used to
it and I think that this will improve in
the near future right
yes well that's a good question
the question is that what happens if you
get into an infinite recursion
um you
okay so there's there is the there's an
answer for today and an answer for
tomorrow but basically there's a form of
gas metering in starknot just like in
ethereum and if we reach a match maximum
number of steps the sequencer will
recheck your transaction
today you're not you don't pay for this
kind of transactions they're just
rejected tomorrow
um you will be it will be like a fake
transactional ethereum you will pay fees
for the execution that led nowhere
good
perfect any other questions for a moment
okay so simply we have a recursion
function here again it's not that hard
and it will improve we're talking that
Cairo is a low level language and we
have to be very honest and conscious
about that
and finally let's go to the last
function that is the Boating function
this will allow us to call a function as
as you can see here it's an external
function
external function simply means that we
can write on the storage using it okay
not only reads but we can hear right
into the storage
again we have our implicit arguments
we have an explicit argument called both
and here
don't mind this part simply telling the
memory that we will be using the
compiler that will be using local
variables
we don't need to go through that we're
called the possible function from from
open sampling contracts specifically the
function called assert not pause
it checks that if if this control is
false or not if it pause this person
cannot vote as simple as that
then you get the caller address this was
a question from before with this
function we can get the address of this
color we're storing it inside the color
function
then we can read the information of this
color of this address using the reads
argument from this touch variable that's
already the nympho
and then we are simply reviewing is this
person can vote or not
if they have a low zero then they cannot
vote
then we're creating a new bullet border
info extract that it says that this
person has already bought because we
wanted to vote again
we are writing on the storage here
everything here we already know that
and finally we are updating the status
of the boats with the vote of this
person if this person voted yes or zero
in this case then it will update that
with zero
the count with zero and if they bought
it yes in this case one for example then
it will be updated the count will be
updated with a sum that we have here
and finally we are updating the final
status of our update the story of our
voting and storing it into the storage
as you can see this function is scheme
and if we go to the deploy contract we
go to the right contract
and then I can vote in this case this is
the function
I don't remember where I say and that I
think
so I will go to my Bravos wide in here I
was in my origin before and let's see if
it allows me to vote
so I will vote with that one
and I will be able to sign this
transaction because this address is
registered to both
I did when I deploy it
and right now what it this is the
transaction hash and we have to wait for
a test to process this and we will have
our bolts
now how can you deploy these contracts
you can deploy it using the command line
tools by its targets or also and my
preferred ways to use protostar
protostar is a tool created in the image
of Foundry
it has the best practices from Foundry
and also some from haircut sorry from
profile so it's very interesting it
helped us to to test but also to deploy
so if I go right now to my command line
[Music]
this is how deploying this contract
looks like so basically I'm saying
entering protostar deploy this a
contract that is already compiled by
this moment and what I want you to
notice here is the part of the inputs
it took before about the Constructor a
setting for three different inputs first
one is the owner the admin of this
voting second is the number of persons
of register addresses that can vote and
finally the actual addresses so this is
how they look this one as you can see is
a hexa a hexa value and this is the
address that is the owner of this
contract then only one person or one
address can vote
this one
and we can simply deploy it run it like
like this
photo store is very good it's very
usable it has amazing testing
functionalities but you can also deploy
your contracts and that is simply the
content that we deploy here
and as we as we can see we already
bought it if I go to read contracts we
should get
a boat in status where we had a boat
with yes we're number one it updated and
zero is still no I could note both again
because
uh directly theoretically I should not
be able to vote again
let's see what happens
oh it should be it should it shouldn't
pass right now but let's wait for it
so that would be the the main part of
the workshop you we have three minutes
two more questions
yes
[Music]
the implicit right now here I don't have
any but they can change depending on
what you're building
can you think of a scenario and when do
implicit arguments change
every time they're used basically
um it's a it's a bit of a deep question
the workshop is about to finish so if
you want let's meet outside and we'll
we'll give you a a more definitive
answer
yes
I think I have another message here
hey will I look for it any other
question in the meantime I have a
question for the audience before we wrap
the the workshop up can we get just get
a quick show of hand who learned
something during the workshop
cool who thought this was too difficult
who thought this was too easy
okay fine so it's great this means this
was spot on those of you still are
hungry don't estate ask us question come
on our Discord go on our resources look
at what we do as also as Omar mentioned
like most of these things the Paradigm
you're used to that you're used to how
you write smart contracts how you deal
with Scholars and stuff like that this
syntax is a bit different the tooling is
a bit different but you can and will
Master Cairo it's just a matter of just
like trying and this will give this tool
will give you extreme power in your
blockchain applications so if you're
looking to go more to do more and go
beyond what you can do with the evm I
invite you like do take a look it really
is powerful and will let you build super
cool stuff and again this is the QR to
the educational resources you want to go
look at them we'll have a boots on
Thursday and Friday you can ask ask any
question come with us
and finally regarding the question the
the error messages this is how they look
so if this assertion true or false
fails then it will print this mistake
motor info
well thank you thank you very much
well it depends on the on the wallet uh
let's see for example this case a
certain Lounge
yeah so what your question is what does
a narrower message look like from the
browser perspective essentially you'll
get a failed transaction like you do on
ethereum and the trace like the way it
shows up is kind of ugly to be honest
it's still very rough around the edges
there's a lot of info that is not
necessarily relevant to you but the
message the error message will appear
somewhere and you'll be you know able to
know where the error is from
in general this thing works and this
feels scale this thing scales ethereum
right now it's a bit rough around the
edges meaning that it's not all pretty
there's a lot of info or not enough but
uh but it works and that's cool that's
cool though
this is how the error looks like
as you can see that's the message that
we saw before in there
yeah explore info your address is not
allowed to boot
then we will have a boot please feel
free to ask any questions and thank you
very much for coming
[Applause]