►
From YouTube: Mathias Baumann & Erik Kundt - what's new in Solidity
Description
Berlin Ethereum Meetup - February 2020 Edition
B
A
A
A
B
B
You
know
them
probably
from
other
languages,
C++,
etc.
Here
you
see
a
code
written
in
the
pre.
Oh
six,
oh
version,
there's
nothing
special
to
see
here.
You
see
we
overriding
the
contract
three
times
to
the
total
supply
function.
We
always
call
the
base
function
of
the
previous
one
and
yeah
nothing
special
here.
This
changed
in
the
new
version
to
look
like
this
basic.
So
you
see
we
have
a
virtual
keyword.
Would
you
need
to
specify
if
you
want
to
override
a
function?
B
Otherwise,
you
can't
override
it
and
similarly
have
to
specify
override
in
the
punch,
plain
writing
and
virtual
if
you
want
it
to
be
over
aidable,
so
it's
not
implicitly,
virtual
again
and
and
the
final
inheritance
here
we
didn't
specify
a
virtual
because
we
don't
attend,
intend
to
override
again,
yes
and
so
far
we
have
multiple
inheritance
and
306.
Oh,
it
looked
like
that.
B
There
is
again
nothing
especially
exciting
to
see
about
this.
We
have
the
RSC
seven,
seven
seven
contract,
which
implements
also
IRC
twenty.
We
just
show
the
total
supply
function
here,
with
one
implementation
and
in
the
new
version
you
now
have
two
yeah
again
hold
on
a
second
I'm,
slightly
confused.
B
Right,
ok,
so
you
see
it's
it's
an
interface.
That
means
you
don't
need
to
specify
virtual,
because
it's
an
interface,
it
can't
have
an
implementation
and
it
must
be
overridden
so
no
virtual
required
in
the
deriving
function.
You
need
to
specify
all
the
contracts
or
interfaces
that
you
want
to
override.
If
you
leave
out
one
here,
it
will
be
an
arrow
and
the
compiler
will
yell
at
you.
Also.
If
we
were
inheriting
from
two
contracts
with
their
own
implementations,
then
you
still
need
to
override
it
explicitly.
B
If
you
leave
out
the
whole
implementation,
the
derived
class,
it
will
also
be
in
error.
So
we
want
you
to
be
explicit
and
to
know
what
you're
actually,
which
based
implementation,
you're,
calling
or
doing
your
own
implementation,
then
we're
moving
on
to
abstract
contracts
and
3:06
Oh
again,
it
simply
isn't
a
simple
example:
here
we
have
total
supply
to
find
but
not
implemented,
and
this
well
it
compiles.
It
gives
you
no
error.
B
No
code
is
generated
for
the
total
supply
function
because
there's
none
and
you
will
get
an
error
if
you
try
to
new
this
contract,
but
not
before
so
you
might
have
silently
not
working
code
in
your
engine.
Compiler
would
not
tell
you
and
then
your
code
dies.
You
wouldn't
notice.
Now,
with
after
o6o,
we
introduce
the
abstract
keyword,
which
you
can
see
at
the
top,
and
now
you
will
get
an
error
as
shown
here,
because
you
haven't
implemented
that
function
and
you
must
specify
abstract
if
you
have
an
abstract
function
like
without
a
body.
B
So
it
tells
you
here
that
you
should
either
make
this
contract
also
abstract,
or
you
provide
an
implementation,
this
propagates
more
safe
code
and
you
catch
mistakes
earlier
in
the
whole
process,
then
a
small
new
thing
regarding
interface
inheritance.
You
can
now
inherit
from
interfaces
which
wasn't
possible
before
so.
You
can
easily
show
that
the
interface
for
ers
b777
is
also
an
interface
for
IRC,
20
and
yeah.
Those
are
so
far
the
inheritance
features,
moving
on
to
fall,
Bank
and
receive
split
thanks.
A
Yes,
so,
in
the
fashion
of
being
more
explicit
in
your
contracts
or
in
contracts
in
general,
we
also
decided
for
a
fallback
and
receive
split,
so
I
will
show
you
what
that
means.
So
this
is
a
pre
oxo
contract
with
a
fallback
function
defined,
and
this
is
called
for
both
so
for
non-existing
function,
signature
or,
if
there's
an
ether
received.
A
The
function,
signature
of
the
receive
function,
looks
kind
of
similar,
but
without
the
function,
keyword
and
receive
is
being
called
if
you
send
any
ether
to
the
contract
via
sent
or
transfer,
and
this
contract
reverts,
if
you
call,
if
you
call
a
non-existing
function
and
to
handle
this
part,
there
is
the
Fulke
part
of
it.
So,
just
before
the
talk,
we
talk
quickly
about
like
the
proxy
pattern
and
so
I'm
quite
happy
that
we
have
this
example.
Here
I
mean
it's
the
pre
pre,
oh
six
version
of
it.
A
A
A
A
So
it's
a
little
bit
hard
to
come
up
with
a
good
example
here,
but
we
just
thought:
ok,
we
will
have
this
deck
yeah.
It's
a
contract
called
stack
and
you
can
pass
it
a
length
via
the
constructor,
and
this
is
the
pre
Dupree.
Oh
six
Oh
behavior,
and
then
you
would
have
like
a
push
and
the
pop
function.
A
Similarly,
in
this
code
we
hope
that
it's
more
explicit
because
you
would
see
the
cost
of
it
instead
of
just
exciting
to
the
length
you
would
use
this
loop,
for
example,
yeah
I
think
that's
about
it,
the
next
one,
it's
something
we
are
really
excited
about
its
try-catch
support,
so
just
to
give
you
an
example
how
this
could
work.
So
we
have
a
Prius
EXO
contract
here
and
we
have
the
contract
consumer
and
it
has
a
feet
and
a
rate
function.
A
And
now
the
thing
is,
you
want
to
react
on
the
revert
and
in
the
function
data.
But
how
would
you
do
that?
So
there
was
no
there's
no
way
of
doing
that.
So
we
decided
to
go
for
a
try-catch
pattern
that
you
probably
know
from
other
programming
languages,
and
this
is
a
oh
six
over
j'en
of
the
contract.
So
again
the
data
and
the
body
of
the
data
function
just
reverts,
and
here
in
the
rate
function
there
is
the
new
try-catch
pattern.
A
This
would
in
this
example,
then
return
the
value
and
flick.
The
call
as
successful
in
this
example
because
yeah
the
rate
function,
has
you
and
then
the
bool
has
a
return
value
so
for
the
actual
value,
and
if,
like
that,
states
a
success
for
the
of
the
call
and
in
this
example.
So
there
is
a
reason
given
for,
in
the
reverse
overt
reason
and
the
first
catch
block
that
you
put
implement,
reacts
on
that.
A
A
There's
another
branch
that
you
could
also
implement.
So
just
imagine
you
have
a
revert
without
the
reason
string
or,
like
I,
said,
an
assertion
that
fails.
You
could
define
another
catch
branch
here
that
reacts
on
the
low
level
data
and
then
here
you
could
do
whatever
and
it's
also
possible
to
use
both.
So
we
just
wanted
to
keep
it
out
because
then
the
example
would
have
been
too
big,
but
usually
you
would
implement
both
branches.
A
B
So
this
is
one
I
really
like,
because
if
you
wanted
to
create
a
new
contract
using
create
you
had
to
do
it.
Man
in
inline
assembly,
as
shown
here,
you
first
had
to
get
the
code
from
the
contract
you
wanna,
create
in
this
case
product.
Then
we
call
cry
2
and
local
low-level
assembly
with
10
way.
We
specify
the
code,
we
specify
the
length
of
the
code
and
we
specify
an
individual
salt
which
is
creatively
named
salt.
In
this
example,
we
check
if
the
creation
succeeded,
we
revert
if
it
doesn't
and.
B
B
That's
why
we
introduced
this
I
didn't
see
it
in
the
beginning
either.
So
here
the
new
syntax
really
just
call
new
in
the
contract.
You
use
the
named
argument.
Syntax
from
before
for
function
call
options,
you
specify
the
salt
and
the
way
you
wanna
send
and
the
difference
here
is
it's
easier
to
pass
arguments
to
the
constructor
which
we
didn't
even
show
in
the
previous
example,
but
you
notice
we
have
now
a
constructor
errors
payable.
B
We
actually
needed
one,
but
the
compiler
couldn't
check
it
before,
because
it
didn't
really
know
what
we're
doing
in
the
low-level
example.
Now
this
wouldn't
compile.
If
I
hadn't
added
this
constructor,
and
if
you
don't
specify
salt
here,
then
it
would
be
just
a
normal
new,
a
normal,
great
call,
basically
and
I
think
yes,
these
are
all
the
noteworthy
mentioning
of.
A
B
A
B
A
Yeah,
so
this
tool
is
called
slip,
T
upgrade
and
it
came
out
of
the
missus
and
missus
Edna
says
it
like
to
just
give
you
a
quick
look
in
our
testing
pipeline.
We
have
some
external
projects
and
therefore
contracts
that
we
always
our
new
compiler
versions.
So
one
is
how
changes
that
we
are
doing
actually
affect
this
existing
code
bases.
So
we
have,
for
example,
open.
Then
we
have
notes
and
the
thing
this
features
we
to
upgrade
the
contract
so
and
as
Matthias
already
o-net
clarifications.
A
We
need
a
lot
of
manual
updating
of
the
contracts
so
and
just
to
cut
this
a
little
bit
down,
we
decided
to
build
this
tool
on
our
own
and
then
it
turned
out
that
it
was
likes
internet
and
then,
with
that,
okay
yeah.
Why
should
we
make
this
like
kind
of
public
and
write
some
nice
documentation
on
it?
And
so
this
is
why
it
will
ended
up,
and
it's
kind
of
we
are
kind
of
simple.
So
it's
based
on
lip
solidity.
A
So
it's
a
C++
tool
and
it
just
parses
and
compiles
through
wiki
and
it's
a
hybrid
solution.
So
we
are
checking
the
errors
that
are
like
being
reported
by
the
compiler
and
then
we're
doing
like
a
simple
textural
source
manipulation
based
on
regular
expressions,
the
contract
itself.
So,
for
example,
this
is
a
prio
6o
version
and
just
like
three
contracts
and
there's
like
some
inheritance
in
it
and
compiling
this
with
the
newest
compiler
version
would
lead
to
several
errors
that
are
being
reported,
but
the
tool
is
able
to
upgrade
the
contracts
for
you
and.
A
A
So
we
left
that
out
and
we
also
experimented
a
little
bit
and
integrated
some
zero-five-zero
features,
for
example
the
default
latif
for
functions
and
yad.
Would
we
would
love
to
get
some
feedback
on
it?
So,
if
you're
interested
just
consult
the
documentation,
there's
a
sub
section
and
the
compiler
in
the
section
using
the
compiler,
yeah
and
yeah
we're
kind
of
interested.
If
this
is
like
useful
for
contract
developers,.
A
Next
one
compiler
features,
so
we
I
think
we
are
running
om
with
a
tail
here.
So
the
first
one,
which
is
also
an
interesting
feature,
is
the
Jason
import.
So
before
I,
don't
know,
I
couldn't
remember,
which
version
and
true
was
it
introduced.
I
think
it
was
introduced
in
0,
6,
0,
right,
I,
think
so
too
yeah
yeah.
A
B
The
ABI
encoder
version
2
is
no
longer
considered
experimental.
We
still
need
to
specify
the
same
old
pragma
experimental
instruction
to
use
it,
though,
so
that
you
don't
have
to
update
the
contracts,
mainly
not
considered
experimental
means.
There
are
no
warnings
anymore.
If
you
use
it,
and
there
is
no
experimental,
literally
in
your
bytecode
when
compiling
and
yet
otherwise
the
you'll
optimizer
you'll
is
basically
our
intermediate
and
assembly.
B
Language
is
now
also
no
longer
experimental
and
is
automatically
activated
when
you
specify
the
normal
optimized
flag
before
you
had
in
the
head
its
own
flag,
we
are
gonna,
have
a
short
look
into
future
things,
we're
only
working
on
starting
with
the
you'll
back-end,
which
basically
means
a
solidity
first
to
you'll
and
then
compile
that
to
the
EVM
or
whatever
backend
we
want.
Then
I
think
this
is
your
part.
A
So
we
also
looked
into
LSP
implementations,
so
language
server
protocol,
that's
quite
useful
for
IDE
integration.
It
just
started
looking
into
the
specification
that
comes
from
Microsoft
and
yeah
I
think
there's
a
prototype
and
because
we
have
the
feeling
that
the
community
is
quite
interesting
interested
in
this
feature
we
yeah.
We
are
also
eager
to
implement
that
and
then
yeah
there's
some
other
things.
A
Also
we
have
a
mailing
list.
I
think
was
heard
of
like
a
year
ago.
Right
now,
there's
not.
We
are
we're
trying
to
actually
open
up
discussions
there
and
it's
a
Google
user
group
and
there
are
like
some
posts
and
like
some
things
going
on,
and
we
would
really
love
to
see
more
people
participating
in
the
doctor
and
them
and
their
discussions
there.
The.
A
A
The
next
thing
that
we
are
like
very
excited
about
its
the
solidity
summit.
So
at
the
end
of
April
we
will
have
a
language
to
day
language
summit
here
in
Berlin,
it's
a
two
day,
friendly
sized
singletrack
event
with
talks
and
workshops.
So
if
you're
interested
in
attending
this,
then
just
navigate
to
the
URL
and
sign
up
for
it
and
yeah.
We
are
happy
to
receive
proposals
for
talks.
Workshops.
B
Otherwise,
we're
very
approachable
on
various
online
and
offline
resources.
You
can
post
issues
and
feedback
and
feature
ideas
on
github.
You
can
visit
us
on
the
Gator
chat
and
you
can
be,
can
participate
in
our
Google
Hangouts
meeting
twice
a
week
where
you
can
either
just
listen
in
talk
to
us
ask
questions
of.
If
you
wanna
do
stuff
yourself,
we
always
happy
to
help
and
direct
you
to
interesting
issues.
B
A
I
think
eight
to
nine
I
mean
there
are
people
also
involved
in
other
projects
in
the
foundation,
for
example,
and
they're
just
like
coming
in,
for
we
doing
some
stuff
there,
and
we
also
I
mean
we
have
some
external
contributions.
We
are
always
trying
to
see
how
in
Crete,
how
to
increase
that
yeah,
but
I
think
like
8
to
9
should
be
fine.