Get the Monday email →
Loading player…

Your First Core Solidity Smart Contract

DevconSat, Nov 7, 2026, 12:00 AM

Speaker

Jacob Czepluch

Transcript

[music]

Hello everyone. Nice to see so many of you here. Today we will be writing core smart core solidity smart contract for the first time for probably all of you almost at least. Quick intro to the language and myself. I I wrote my first smart contract back in 2015.

This looks like solidity and it was solidity, but a lot has happened since then as well. After that I've done some did an internship at the Ethereum Foundation, worked on payment channels 10 years ago, built hack prevention tools, and now I'm the developer relations at Argo for solidity. So core solidity, what is the current state of things? We have a prototype compiler. It's not ready for mainnet use yet.

The language is still changing quite a lot and there will be good amount of breaking changes until it's ready for production. We have a playground that runs in the browser. This is what we'll be using today where you could deploy and call contracts, run inline tests, etc etc. There are some contracts that have been ported from classic solidity and we are also formally verifying the semantics of the language. We just last week did the first like alpha pre release.

So it's like very early days still, but there are there is now binary you can download that has a language server, formatter, plugins for editors so you can actually start playing around with the language and classic solidity will continue to be maintained and developed as well. So don't don't worry about that, but this is a new front end to the Solc back end. So as you can see here it lowers to Yul and from on it's the same back end. Um yeah. Um why are we doing a new front end?

Solidity over 11 years has accumulated a good amount of technical depth. It's hard to add new features. So we wanted to start over and build a language that has [snorts] some features that are more modern so to speak and also has a core language that has like a small set of primitives and one type which makes it easy to build a standard library but also to formally verify the language. And yeah, just more modern features. Okay, I'm going to skip this.

It's not so interesting but yeah, there's still some things missing in the language. Some things we didn't decide yet if we want to do or not. But it also is very similar to and familiar to Solidity. So what will we be building today? We'll be building an ERC 20 style token.

And we do it like step by step in the playground. First we'll just build a transfer. This is going to be very similar to to what you do in classic Solidity to show that the syntax is very similar. Then we will introduce enums which is one of the new things we have like enums that carry data and pattern matching on those. Personally, this is my my new favorite feature.

Then we'll do some modules to show how we will have Solidity doesn't have any inheritance. So we'll show how that works instead. And then if there's time we will look a bit at comp time and if there's even more time we will have another exercise where you implement a hook. So open the playground on this link. The QR code leads to the link.

We can also type it out. And then once you're there, you can go to the run tab. I'll show it in a moment and there you can say run all tests and this basically compiles and downloads the compiler and once you've done that one time, you don't need internet for the rest of the of the session. So we'll just make sure everyone is on that level. I'll just give you all a moment and then jump over.

Is there anyone still typing the the URL or can I continue? Otherwise it will also be shown in the at the top of the next window. Huh? Yeah, I mean I I just asked people and someone said they're still doing it so I'll just wait. Maybe I should have made a shorter link for the sake of the playground or the the demo.

All right, I'll I'll jump over. You can still read it at the top of the of the screen here. So the first step I asked you to do is go to run and then you can or you can also just hit the compile up here and that will compile the the the first contract and it will download the compiler so that you don't need internet for the rest of the the session. Oh, sorry, I forgot. Is anyone still typing or is everyone Is there anyone who's not in the playground yet?

One person. All right. Do you need the the URL or you just no internet? Okay. Then I will do the brief intro of the the the playground here.

So throughout this workshop we'll have we'll be working on different examples. So we'll do them one by one. There is already there are already solutions to all the the the exercises. So if you feel like cheating, you can just jump ahead and and and copy it from there. But please try to to see if you can solve the the the the challenges yourself first.

I'll be explaining each exercise and also helping anyone who who needs help. If you are just interested in in solving things as fast as possible, you don't need to to wait. You can play around, do whatever you want. And there's a bonus task in the end as well. So yeah, don't feel obliged to to wait.

But yeah, of course it's nice if everyone keeps the same pace. Then we have on the right side here we have run where you can try out interacting with a contract. And we have run tests. And as you might see already, we have these inline tests here. This is currently just in the in the playground, but we will also add it to the come the the binary itself.

And it basically means you can run tests directly in your in your file here. And what it does is it will run each of these tests. So here we sent 100 tokens to this 0x 70 address. And it shows that the transaction succeeded. And the next one shows that it reverted because there's basically nothing in the the function that was run.

So this is these are designed so that when they're all green, a test or like an exercise passes. So yeah, feel feel free to to play around as you are writing the the code. And I've gone ahead and basically created the the the skeleton or most of the code is written. So you just need to implement one function or a couple of functions for each each task. Um, but yeah, if you look through this code, it is it readable from like for most people or should I make it bigger?

All right. Then oh, that looks so bad. Uh, okay. So first thing you probably notice that's difference is that we have the pragma sol core. So this that the files have the same extension as you're used to from Solidity, so .

sol, but we use the pragma sol core so that the compiler knows that it's a core Solidity file. You also notice that the imports look different. It's a it's a different syntax than what you're used to, and we have a standard library. So it's the STD um, which I think is really really nice compared to classic Solidity where every time we wanted to add a feature to the language, we had to do it in the compiler itself. And now we can separate the language from the compiler and you can add features to the language as you want.

Um, I have one example here. No. Yeah, here for example, this is how message sender is implemented. So it just uses the caller opcode and gives you and then we have the message sender. So this is an example of what you can do in the standard library, which also means that anyone can add features so to speak.

And the standard library for core Solidity will be a community process that anyone can contribute to. And another example would be for plus and minus which we are using in this first task, where you see that they are implemented like this. So it is just standard library code which yeah is nice. And I talked about the test comments already and here it's just a note that the playground uses uh 0xf39 to deploy and run all contracts to start with um and then we have 0x7099 which is just a second account that we'll use as receiver for transfers. The contract definition same as you're used to balances um the mapping is also fairly similar you'll probably notice that we have postfix type definitions rather than pre- prefix as in classic constructor also fairly similar to all of you I hope we just defined like initial balance of the message sender and set the supply to a thousand.

[snorts] And yeah then the task the first task here is to implement transfer it should be pretty straightforward to most of you who've written solidity before it is basically just the same as you're doing in classic solidity and I added added this to to show that there is a good amount of familiarities between the two languages so it doesn't seem entirely alien to solidity developer to start writing for solidity. So yeah please start implementing this one function body and you can as I said you can run the tests along the way to see if if your code is correct. Probably the the the the one thing you can do it's you you actually don't need this line for for this to to work but you can say let's it's what you use to define local variables so if you wanted to just have message sender called from you can do that you it it easily without and other than that, I think there's nothing new in this exercise. So yeah, please go ahead and try to solve it. You can put up your hand if you have any kind of issues.

I also start implementing it baby, but I would rather help people to do it themselves.

So there's still plenty of room here in the front. So there's a lot of people in the back. You probably don't see anything from the screen. So you should probably come and sit here in the front so

They also have it on the screen.

Yeah. But if you want, there's plenty of space in the front. And if you have questions, you can also go to the schedule to the talk and then click there to ask questions. And if you missed the URL at the beginning or the QR code, if you go to the questions, you can also see the address there and copy that to your browser. And if you open this address in your browser, in case anyone missed it, you will see the same thing Jacob has on the screen right now.

And in the comments is the the the task to do.

Okay, so I just started also writing the code for anyone who wants to follow along, but just to find the the the from as much as sender. And then we're doing a required to check that message sender has enough balance to actually send the amount. And the next thing we need to do, I guess if anyone is just not coding along, but you can tell me what would you what we do next? Would you decrease the the balance of the from or increased to or something else? Good idea.

Yes. I will I would also show that after I would remove the require and show that it still fails because or like the 5,000 at least fails. And of course there are still a lot of what do you want to call it like uh we'll still be doing a lot of nice sugaring and and syntax shortcuts. So right now it's still a little bit verbose what you what you need to do but all of this of course will be fixed eventually. Oh.

Would you

Hm?

Prefer to go through the questions at the end or in the middle

If they're relevant to the what we're doing I would like to do them now but

These are not directly about the code right now.

Maybe I'll do those later if they're not so relevant to the current state. Okay so I think this this should work unless I made any typos or um yeah looks like the tests are passing. Um so yeah someone asked if there's like check for overflow underflow we should be able to remove this require and it will still pass because there's a check if we're underflowing when we sent the Um yeah so as you see the the tests all pass because um we have the the check for underflowing the arithmetic ethics by default. Is anyone like is everyone somewhat following? If if you're totally lost it's it's it's fine we can you'll get the solution when we if you check workshop one transfer and then the solution um you basically have what I just wrote so you you're still able to to follow along.

Any questions so far or people with with issues that I can can help out? No? All right. Check the time. Great.

[snorts] Then the next thing we will do is we will implement so now we we start changing things up a little bit. We have this enum called change which has mint transfer and burn. So those are the basically representing the three operations that our token is able to do at this point in time. A mint just takes receiver a transfer takes from and to and a burn takes a from. Um and of course then the the we will have one function that takes care of applying these changes which also takes an amount.

So if we are minting we provide the the the change with um mint and then the amount that we are minting. And the the functions itself transfer mint and burn all call apply with the the the change that they represent. Um so as you see right now we won't even we can't even compile because the compiler is complaining that we are not covering all the the cases. So this is we have this check [snorts] that we can never have a case that we are not handling which is caught at compile time which is very useful to ensure that you don't forget to cover a specific case. And this ultimately rules out an entire class of smart contract box that we have seen in the past.

So if we hover on change here, it shows non-exhausting exhaustive pattern match and it says we don't have a case for change dot transfer. So this is what we need to implement. And should be pretty straightforward, but if anyone is not familiar with pattern matching, it might look new because it's one of the new features to to the language. The idea is that we take the match will take a change. So we have this change of type change and the changes like this enum up here.

And then change here represents any of those. So now right now we have a mint case that we are covering and we need to cover transfer and burn. So those two we need to implement and once that is done then the the the test tests should pass. I'll give you a moment to to do it yourself, but I'll also start implementing it here so that anyone who prefers just to look can follow. So we need to do the case transfer, yeah?

So just a quick technical check. Hands up anyone who has issues with connecting to the internet and thus is

But that should be fine like if if they loaded in the beginning, then they don't need

Yes, but hands hands up anyone who has internet issues. So you can maybe help these two. All right. And and there's still space in the front. So if you want to see what Jacob is piping on his screen, then feel free to come in the front.

Okay. So here we define the the the change type so the the transfer and then that one takes a from and two as I mentioned above. You can also see it here on Harbor that it takes two addresses. And then it's basically the same as before like we do the same require that it's [snorts] that the balance is higher than or equal to the amount that is being sent and say insufficient balance if not. So this is like just more or less the copy paste or it is a copy paste of before.

All right. So this basically should it will still fail because we are only covering two of the the three cases and now it will tell us that we are not covering the the burn case. So we would just have to implement that. I don't want to type it out right now but it will look similar to transfer. It will basically just not have the update here.

We can actually just copy it over then. Does Does have any questions about the concept of pattern matching or like is it is it clear what's what's going on at least I know to myself that when I was first introduced to it it was pretty different from what you're used to in in in classic solidity. I can't I don't have them open. Can we get what? Yeah so we also yeah that there's a there's a default case I'll I'll show that as well it's I think I got it I think we just this one right.

Okay so this should now good point. Someone is awake. Yes so this should compile and hopefully the all of the tests will pass. Yay they do and yeah below you see we just run like this these common tests they just run and show that everything works as expected. Thank you whoever it was that mentioned the supply and then for the default case we can do something like default which will catch any on like if we would add a new case or anything else than the default would match on that.

This can be useful in in in some situations. I would not use it in in in something like this where we want to make sure we cover all cases, but there are cases where default is uh is useful. So this is basically a a catch all. Uh yeah, that's exactly what I just mentioned now. Uh you can use both the default or the underscore uh syntax for for that if we added a new case.

So that would be like uh I don't know what a good example I can't think of anything uh interesting to do here. Um but uh you could do that. Yeah, so in in this specific case, I don't think it's a it's that good of an idea, but it could be that you had functionality to do I don't know uh two like there are two things that you can can like do and then maybe a default could be catching all if if someone just like send token to tokens to your address or Uh like it could be it doesn't have to be used only on these changes or like an enums like that, but you could also match on [snorts] Let's see. Could be that someone sends uh it could be anyone sends an amount uh like you could have amounts above uh a thousand would give you a premium subscription. Amounts above 500 would give you normal subscription and uh and then everything else we just do default and that just gives you a like free basic subscription.

It could be something like that so you do where you just know you care about two cases and everything else falls under a third case um and you don't want to you don't need to specify it. So it's a both both a shortcut, but also just uh anything else. It's it's it's quite quite nice, but uh it has its place, but here I wouldn't use it because I want to ensure that we cover all uh all cases. Yeah. Yeah.

[snorts] Um and this also means that if you wanted to add a new type of change uh could be a transfer from or something like that. You only need to do it in in this one place and then it will ensure that you are able to make sure the compiler will make sure that you have to address it throughout your code so you cannot forget it somewhere. Is everyone somewhat following along? Any questions? I mean it's a it's a good so the question is when writing our first contract what is the recommended way to handle custom errors and debugging within this environment?

So we we're [snorts] still early days we don't have like the the full tool stack yet but we do have like you you can kind of you can make it work so you just provide the the the the bytecode to Foundry for example and you can use that to test against so you can write write now you can write your test in classic Solidity and test it against core. I've done that a couple of times myself but we do need to of course build some of these tools out. Custom errors is being added or was added Yeah, there are custom errors. I just didn't introduce them here because I think it was fairly recently but you can do custom errors as well. Maybe there's time I can show an example in the end.

All right but then let's jump onto the to the next question. Is it from a keyword from the import statement? What import statement? I mean it worked. I think it's not a keyword not in in core right?

From I don't think from is a keyword in core Solidity. It it worked now with yeah. Sorry? Yeah?

All import Uh like here uh I mean it it that's a good question. It worked, but uh actually I I don't It's uh I don't think it's a key. I think yeah, I don't know uh it worked. Uh yeah, I don't know how you what you what what would you define what would you call this here like uh like it's not a keyword, but what uh how how how does it work here then?

Yeah, you can have an if you have an identifier that goes from here.

Yeah, okay. So it's okay. So it's here it's an identifier called from, but it's not a keyword keyword. Okay, then uh let's jump on to the next one. So now we will um checking this.

Okay. Um now we will see what it looks like to not have inheritance. So in this example, we're introducing a new file called ownable and uh you notice that it's not uh capitalized because it doesn't have a contract uh inside of it and uh this is just a module um that has uh bunch of functions and you can define what it exports. You still see that imports uh like the STD and generic and store generic um and then we have uh struct called ownable that has one field in it, which is an owner of type address and then a function owned by which tells you like returns an ownable of uh like um containing who the owner is. Um yeah.

Uh uh oh sorry, it's it sets the first owner. So you need to like initialize the owner and this one is what does that. Then um we have owner of uh which shows uh who is the owner and require owner is a little bit like a modifier. So it's something we can call to check um who uh is the owner uh or like to to to make sure that only the owner can call something, otherwise it reverts. And then transferred we used to return the state with two as the owner.

So this is a little bit different than than what you're used to as well. And then we export the functions that we want to interact with. And something that is nice here is that you can be explicit about what parts of a module you want to export and what you want to expose to other contracts. [snorts] So a contract only exposes things that it like has public functions for. So from inheritance you might be used to that if you inherit something that has a public function that that function is also exposed by your contract but here you have to be explicit about what you expose and only public functions in a contract are exposed.

So it means that there's one place for example for auditors to go and look at your code and see what is actually exposed and you don't have to dig deep into all the levels of inheritance to understand what surface of functions are exposed. So this is I think a nice feature as well. The task [snorts] now is to just import ownable and the functions from it that you want. So you just need to go like you have this line here uncommented and then go and import the the things from ownable that we saw it was exporting. And once you do that you will start to see that these errors go away.

And at the bottom once you have done the importing then there is function called transfer ownership which need to implement um and uh mint function that we want to have the uh only owner sorry require owner uh check on. So yeah if you're following along you can just do like import and then we need to get the what where it was we have uh owner of require owner. And now we should see that these errors went away so it should at least compile um but probably the tests are not passing not all of them at least. Um so yeah we go down here and we have uh the transfer ownership and we should be able to just set ownable um to be uh Sorry was that a question? Okay.

If I can spell um I what to do wrong here? True. Uh was it the first uh command? Yeah. Ah sorry this we should be So this is uh yeah this is how we will uh transfer or like change the the And in mint we wanted to do the file owner check.

So now only the only the owner of ownable can call mint. And now the test should pass. And we have yeah. Great. And one at the bottom you probably see there's a small example of a steal function.

So so what I want to show is that right now because ownable only exports ownable here in this way it means that it doesn't export the constructor of ownable. So we cannot make new instances of ownable outside of the module where it's defined. But if we if we do import export sorry with this this syntax then we are also exporting the the the constructor. And that basically means that now we are able to create a new oops. Now now we can create a new ownable outside of of the module.

So anyone can just steal so to speak the the ownership. So if we compile this and we try calls we should be able to say call the steal function now with any of these addresses and this will basically allow anyone to create a new ownable instance and update it to be the the owner of it. So this is something of course you don't want to to happen but it's something to be aware of that [snorts] you should not be like kind of showcase how modules can decide what is being exported and imported and that you can limit what you can or what users can can do with your your code outside of the the module it belongs to. So this can also be this is a pretty powerful thing because you have a guarantee that if you're not exporting the constructor then it's only inside this the module that exports it that you can actually update it and change it. So you could also we could have I don't know we we could have Uniswap style pool or something like that where whenever you interact with a pool it's only through the module that it can happen and then we can run a bunch of invariant checks every time a pool is updated.

Actually it's not updated but we create a new pool enum with the new numbers and we can check invariance on that which I think is a neat side effect. Any questions on on this step? Yes okay that's actually the next the next part is is covering events but right now we don't we don't have support for events yet. We're we're working on it. So right now we circumvented so to speak by using lock three.

Oh that's a solution we always saw that. Is anyone yeah go ahead. Yes there's also there was a question if people can use traits in modules and I will show an example a little bit later if it's time. I think I'll make it so yeah they can. All right then there was a question about events if the is it just if events are supported or what was the question Okay yeah the classic events or events will be supported.

Right now, they they are not. Um, but they will be. Right now, you can see here how we can kind of circumvent it is by having lock three that we just just use instead. And then this function kind of emits a transfer. It's it's not exactly how [snorts] it doesn't work exactly the same, but for now you can do it.

And this is an example of what it maybe would look like in the standard library when you would add something like emit of an event. But the next task is about comtime comtime compile time evaluation. So this is another great feature I think that we will have in the in Core Solidity where you can have things like you can provide the comtime keyword and then the compiler ensures that this is [snorts] evaluated during compile time. So instead of for example hashing the signature of like the of of transfer during execution in in the runtime, you will actually do it during compile time. And I think here yeah, this task is fairly straightforward, but we then have this lock that I showed before where you can emit the the transfer from event.

And a little bit I think below you can play around with it a little bit. I'll just skip ahead on this one a little bit so we can cover a little bit more ground. Yes, to to if it was possible to do the same with constants before. And to some extent yes, but I don't know if like maybe Martin, you want to add a little bit on on this one, but I think we can do more um.

So it is similar to constant, but it's the idea is much more powerful. We we're actually thinking about how powerful it should be, but right now it can even evaluate assembly. So you can write anything as a comp time, yeah, as long as as long as as long as sorry. [cough] As long as it really can be evaluated compile time.

We we had we had too much spicy food yesterday. Um yeah. So I just jumped ahead here um to to to solve this one. We just had to add this calc calc which already actually has the the the the comp time comp time requirement, but we just added here for for clarification. And when you compile this, then you'll basically be able to see if I can find here here.

So when we compile this, so this is the expected hash of of the the signature transfer address address U int. And if [snorts] we compile it, you should be able to see in the U this is the the U output for for this. You should be able to wrong to search for it and see that it is just here as a constant as this hash in the compiled code. And of course here this is maybe not the most interesting interesting example, but for example, the entire like a lot of things in the standard library, we have this dispatch part of the standard library that is used to dispatch like all the the the functions and it uses compile time as well. So all of it is calculated compile time instead of later on during runtime.

So you can do some optimizations here and the same if you were doing any kind of I don't know calculating any numbers and stuff like that you can do it just have it represented at the as the the the result in your in your bytecode. I am about to run out of time. I will just show a quick example. Someone asked about the the traits. So here we have a little bit more of a complicated example complicated but like adding some more stuff and we at a hook or hooks which has a trade transfer or it has two transfer hook no it has one oh sorry with two enums one is max transfer and one is blocked.

So for example if you wanted to say okay I want to have different checks running on my transfer one could be there's a maximum amount that you can send and the other is if we wanted to block a specific address to be the receiver then we can add these like trade for this where we have implementations for for the two of them. So one here we have for max transfer we have a function called check which is run on okay I'll go back to probably show it here. So you see at the beginning of of apply as we had before we now have transfer hook that has this check that it runs on different hooks with of the of each of these changes. So if we look at this one it takes the hook which we had defined oh I forgot where it was I am the the the max transfer enum [snorts] and the limit. So let's say the limit is 500.

And then we match on the change, which is the change from from before. Now we actually move change out into its own module just so it's a little bit easier to to to work with. And then we do a require that tests that the amount we're trying to send is below the limit that is set by the max transfer trade. And in the same way, blocked would check that the address you're trying to send to is not one of the blocked recipients. So this is a very convenient way that you can add features so to so to speak or checks to a function.

So here we'll make sure that you can't do any of this and then bottom we stack it. So this means that we can do both of them in in one basically. We could also and they're running the order you define them. So in this case if you try to to transfer more than the limit to the blocked account, it would fail already on the the limit and not on the fact that it's a blocked account. So this is one way you can add features without inheritance to your contract.

And I think ah yeah the I think that is basically it's you can see it's just one in the contract itself. It is just one line that we changed to get this functionality. And then the functionality is implemented. Okay, two. We also had to find the hook here.

But yeah, the and the hook here it was 500. That's the the limit of max transfer as you can see and then the the blocked address is this 3C44. But yeah, I think that's about wrapping it up almost. Any last questions for for the hook taught? All right.

There are some general questions here. You want to have them now?

Yeah, if there's time I'll just finish up here. Yeah. There are a lot more examples you can you can find on the on the playground right now. The playground is what you've been looking at is set to only show the the workshop, but if you go to the URL and remove the workshop dash one, then you'll get the full playground without the the workshop examples and you have to add the workshop dash one back if you want the the playground. We will be making the examples from from this workshop into a tutorial in a book instead, so you can find it there maybe two weeks or so once I'm done enjoying my vacation next week.

And yeah, if you have time there's a quick four question survey just to help me understand what to improve in this workshop and otherwise here's a link where you can continue playing around. There's also the release I mentioned and any contributions, issues or PRs are very very welcome. It's still early days, so any feedback or any ideas you have for useful standard library functions to to add or fun examples you end up creating, please share them. I'm very happy to to take a look and give some feedback or whatever. Come find me after or shoot an email to causality at argo.

org if you have any specific requests. And yeah, maybe we can do a question or two also if anyone has questions in the room, but Yes, so one question is about the slide you have open now basically asking about if people can run this playground locally and I guess anyone can clone that repository and then run everything locally.

Yes, if you yeah, if you go to solcore-rs on on GitHub, You will find a folder called playground and from within there it's just pnpm or whatever it's called command to run the playground locally. So yeah, that that works as well.

And then there's a question that in the AI era can we create common template which help to to write a smart contract in a faster way by having all the properties, rules and config unlike a standardized way that the AI then customizes.

I mean I think I think that's basically what programming language is already to some extent but in my experience LLMs have been very good at understanding and writing core solidity from from the get go. So I I don't even know if there needs to be a a more standardized way than what the the syntax dictates.

I I am guessing that the person asking about this has previously been like taking open zeppelin templates and then customizing them. Is is there some similar thing for

How you mean like the okay so like libraries I mean we hope now Adrian left unfortunately but I I know that like open zeppelin I would say they kind of have play and so lady have played the role to some extent of being a standard library. And one of the things of course we need to find out moving forward is is what what goes into the standard library. Should it be batteries included? Should we have like reentrancy? Should we have any ERC 20 token implemented for like supported in the standard library or or how is this going to look like but I'm I'm sure that open zeppelin solidity etc will be adding their own libraries too.

Or what saying to that like using the imports and the modules way to free

Yeah, exactly. So instead of the inheritance, the the modules will will allow you to to reuse code. And there are some other examples as well in the playground. One is called extensions where you see kind of how open Zeppelin style ERC 20 token could be implemented with adding in specific features like ownable and mintable, possible, etc. So yeah.

Also traits are a powerful way to abstract ideas.

Yeah, exactly. So the the last thing we saw with the hooks and traits, that's one way of doing it as well, but you we we're still working a little bit on what like finding out what our recommendation will be in in for composition instead of inheritance, but you can do different things depending on on what you're actually trying to achieve. And for those curious, one of the reasons to get rid of inheritance, I guess this is the most like the biggest criticism of like from some people. There's also a lot of people who are very happy about it. But it is because it is difficult to to understand when you go layers deep and the C three linearization can be hard to to understand.

So we want to get rid of this, let's call it vector or yeah, vector for for for vulnerabilities and and make things much more explicit throughout.

And related to traits, there's a question that since there are traits traits, how can dynamic dispatch be implemented like how it is in Rust?

So the the the non-technical answer is compiler magic. The technical answer is the instance multi-parameter type classes. The instance resolution is a I think biggest part of the the type checker and a large part of compiler and then there is the functions are specialized to to to monomorphic types because it's a polymorphic type system and then the the actual method implementations are specialized to to monomorphization.

[clears throat]

I could not have said it better myself. All right. Any more?

Maybe the last more philosophical question. Can you explain the background of why this is called core Solidity?

That's before my time, but I think the the the idea is because as I mentioned it it is just a small core language. It is actually eight primitives and one type in a [clears throat] language called we call it sale and that is what all the like what I showed is more or less just sugaring on top of sale but it can all compile down or lower down to to to this sale language which is just eight primitives and one type and the idea is that it's small enough to formally verify it for example and the fact that it is so small it's easy to extend on and build on whereas classic Solidity is just a big I don't know what to call it but like it doesn't it it's it's it's harder to kind of reason about classic Solidity and actually have a a spec as well. But here with since the language is so small the core where core Solidity comes from then [snorts] yeah we can actually have a a spec and we can

Is there some like consensus that classic Solidity will be phased out and unused stuff will be in core?

I also had a point about this here that a classic Solidity will continue to be maintained but mostly probably maintained. We we adding features is is a big quite a a challenge by now which is also one of the reasons we wanted to or why we're doing course solidity. Um yeah. So it's not going to be phased out and of course it will have we'll support any upgrades to to the admin etc etc um but there will be more focus on on on course solidity going forward.

All right that's for all the questions and I guess we're ready to wrap up here.

Yeah thank you very much for for joining and I hope it was somewhat useful and that you learned something.

Let's give a round round of You can find the GitHub repository link in the disc

There's also a line for it here. Sorry?

Sir link these are not open.

It's a GitHub problem.

Okay there's a problem in GitHub as a bad internet [snorts] and bad GitHub. It's not a good comp. Okay.

The URL is

So Jakob will be around here for additional questions and now let's give him a round

[music]

Automatic transcript — names and jargon may be misspelled.