[Music]
uh yeah let's talk about mix my name is
aradan um and mix is an IDE for
developing distributed applications on
ethereum platform it started about a
year ago we've been working on it in
ifdf Berlin I did some work on it a few
months ago but nowadays it's been mostly
programmed by Young
lro wouldn't be here today so still um
credit should go to Y and of course Utah
and alar for providing
design yeah
this will be a live
demonstration just a sec make it
work okay this is inconvenient I can't
really see what's going
on okay hope you can see it
so the idea behind mix is to provide
an environment for developing
distributed applications and to
support a full life cycle for the
application development starting from
the smart contracts and then moving to
user interface and then to testing to
deployment and to
updating
okay so mix is a desktop appliation a it
doesn't require any network connection
to
work and yeah
let's take a look at what features we
have
here um so the basic is this simple
editor we have for
contracts it has all the features you
would expect from code editors such as
syntax highlighting a
completion now it
also highlights errors in the code so
let's say I would make an error
here yeah it would would show the error
immediately I can navigate between
errors fix errors and other completion
also works
here so let's the first step I did here
is I enter this contract now this is a
basic token contract the very same idea
was mentioned in the previous talk and
this this is the simplest form of the
token contract you can have it only has
the send function
which transfers tokens from one account
to another right
here now
after I've done writing my contract The
Next Step would be to test
it
and for that I have
this scenario panel here
now scenario is basically a sequence of
transactions executed in the same way
they would execute on an actual
blockchain so this is in fact and
sandbox blockchain very much like in the
eer camp ID you we've seen earlier but
there are some key differences
here so I can set up a number of
transactions to test my contract I can
have multiple scenarios and to test
various aspects
now let's see what we can configure
here so this
particular testing blockchain has a
Genesis state which can I can import
from adjacent file which I can generate
from an actual
blockchain or I can just list accounts
here with some
balances so yeah have
four accounts here and I also
have two
transactions here each of them goes into
a separate block so the first
Transaction what it does it deploys my
contract on this
sandbox
blockchain here I have a UI to specify
transaction parameters and that includes
to this as you can see here my contract
has a Constructor which accepts a single
argument and I can provide a value for
this argument right
here it also it allows to set basic
transaction parameters such as gas and
gas
price okay so I have this and the second
transaction just sends some tokens from
current account to another account
so have the send function here
and it also accepts two parameters the
recipient for the transfer and the
number of tokens to
transfer here it
is now with a click of the button I can
execute these transactions and get
result so this is my current state
displayed here it shows contract storage
and configurate accounts as well
okay so this is a simple contract but
I've seen people writing really complex
contracts in solidity and what if
something goes wrong and we might want
to debug things and what mix supports
is building debugger for
solidity let's take a look at that so I
have
this debu trans
ction
yeah and I can I'm debugging this sand
function now I can step through the code
and see how it gets executed this
operates on an Expression level so I can
step not over the lines but individual
solidity expressions and as I go I can
see how much gas the function the
transactions consume so far as you can
see it's slowly grown
here and notice how
steep it went from 300 to 5,000
something that's because
storage rights are expensive in theum
yeah so I can step forward and backwards
so basically I can navigate to any point
in time here during transaction
execution and examine the state of the
contract at this point of time so it
shows me here my walk
variable
and contract storage as
well so yeah this allows contract
debuging basically you can figure out
what's going wrong with your contract
here and if it's not enough you can go
deeper to this um evm assembly level
debugging you
can view which instructions are executed
and step
in and out of functions and over
instructions and also
shows the place in the code which
corresponds to current
instruction as you can see here so
that's also great tool to study how
solidity compiles into evm
here
okay let's get out of it
so I can have multiple of these
so-called scenarios here and I can have
one for example the tests if the fonts
are stand correctly and another one
which tests
if this condition is checked correctly
for
example
yeah um okay let's move on so after I'm
done testing my solidity contract I
would probably want to create a user
interface for my dab so that actual
users could interact with this simple
stuff
and oh yeah one one more
stuff where
it yeah so as in regular IDE this has a
notion of a project so I can have a list
of files here which
essentially form my dab and I also have
this
little web page which acts as an
interface let's hi
that so this works basically in the same
way it would work in mist
or regular web browser it communicates
with
the with etherum network using web free
API in this case the API is implemented
by mix so it works with this particular
sandbox blockchain as
well oops
sorry now here the
preview of this little web
page yeah it has web 0.0
design so let's test how my dab
Works through the user interface I
can fck an account oops see that's
weird fck an account to sent to and
enter the
value okay that's
okay my S send button disappeared
somewhere let me restart
it anyway whatever I do in the user
interface also ends up in this
transaction list so I can let me check
if I can see it
here yeah so here's a call made from
JavaScript this is a call to request of
balance for this account
here if I change an account it makes
another call
and I can see these cloes here
right I can save them as a part of my
testing scenario and I
can addit the parameters or I can even
debug them the same way now there's
nothing to debug here since it's just a
single
line so
yeah that's weird
again after I'm done testing my web
interface I can package and deploy my ad
to real Network and this has this
deployment wizard I'm not going to
demonstrate it now because it requires
an actual network
connection but the idea is it packages
your dab and pushes it to
to uh swarm
or ipfs or whatever it's not supported
yet but for now it can only deploy to
regular HTTP server and it also
registers a URL for the da
in the registry contract which is
already on Main ethereum Network
there so this allows pretty complex
deployment
[Music]
scenarios you can have multiple
contracts depending on each other you
can set up a sequence on how these
contracts are deployed and which
transactions are called for deployment
and so
on another little cool feature I can
demonstrate here
is gas estimation
yeah for
solidity so I can basically see which
statements and which expression
consume the most and the least amount of
gas and it also shows the estimations
for functions this is a l bound estimate
of how much gas this function can
consume which can be pretty
useful okay so as you can see the focus
so far has been on solidity features so
we don't support web debugging yet and
stuff like that and if you would like to
use web framework such as metor for
example this would be complicated here
but the goal is to support that as
well so yeah you can use this tool for
prototyping your dep really quickly I
mean it should just work
okay what else do we have here let
me just a SI
now there was a number of features we
want to add to this program including
JavaScript debugging and so on you can
use your regular browser for now to
debug JavaScript things and you can use
Chrome development tools for
example um another thing we want to
add is
um test driven development so we want to
use JavaScript to provide a way to write
the unit test for your contract both
solidity contracts and a JavaScript web
interface in in JavaScript
itself
yeah now this been we've been over this
so
far uh yeah
so and that's basically it so
we really need feedback from developer
now and you can
get binary releases you can visit our
EAB page or viser chat and let us know
what you think of
it yeah that's basically thank you very
much
[Music]