Polkadot-Blockchain-Academy / Academy-PoW

PoW blockchain node to gain hands-on experience starting a real network together
The Unlicense
21 stars 42 forks source link

Upgradeable contracts #34

Closed fbielejec closed 1 year ago

fbielejec commented 1 year ago

Demonstrates upgrading ink! contracts with a set_code

fbielejec commented 1 year ago

I've taken a quick look and I get the general idea. I definitely support teaching the concept of upgradeable contracts. I actually didn't know pallet contracts allowed that. I'm excited that students will first encounter this at the smart contract level so they are better prepared to understand runtime upgrades which are really the same thing, but sometimes feel harder to understand or more "mind bending".

Overall, I'm fine with it being merged, but all this ink content still feels out of place to me in this repo that is mostly about a PoW node.

I understand that you want to test this stuff against the node, so, again I'm fine to have it all here especially for the upcoming wave. But ultimately I wonder if the ink content should have a separate loosely-coupled home.

My plan for the contract writing workshop (at least for now) is to take some of the contract ideas covered here and reduce them to starter code for students to implement on their own.

Exactly, the idea is to have it tested against the node, and then create a submodule in the contracts repository. None of it is production quality code, far from, and there is plenty of improvements and extensions possible for the student to hack on - happy to list them.