stellar / soroban-examples

Example Soroban Contracts
Apache License 2.0
65 stars 68 forks source link

Rewrite the auth example to be based on the increment example #143

Closed leighmcculloch closed 2 years ago

leighmcculloch commented 2 years ago

What

Rewrite the auth example to be based on the increment example

Why

So that all the smaller examples are similar and tell a story for how to add a feature to a contract. This was a suggestion from @tomerweller. I've tried it on a few examples and it seems to work pretty well I think.

leighmcculloch commented 2 years ago

@sisuresh Wdyt of this? If you think this is good I'd like to also update the advanced auth example so it does auth for incrementing a value, but as features on the incremental example. I'd probably remove the admin feature and just make it so there's a user who is authenticated. Here's what the docs will look like once updated:

sisuresh commented 2 years ago

Yeah I think this makes sense, and the docs for this look great. Thanks!

leighmcculloch commented 2 years ago

Thanks for reviewing. I'll do the same to the advanced auth example too.