[Solved] Where can I find Example contracts of Generalized accounts

At the end of this document: protocol/generalized_accounts.md at master · aeternity/protocol · GitHub, it shows:

Example contracts

Some mechanisms, that we had in mind, as motivation for GA:

  • spending limits (daily/weekly/…)
  • spending limits per transaction type
  • restrictions on transaction types that can be sent
  • (social) recovery options
  • multi-sig (e.g. phone + hardware wallet, or multiple people)
  • using different signature algorithms (i.e. other than EdDSA)

Does anyone know that where can I find these examples? Thanks!

Regards,

Liu Yang

1 Like

there is an example here: protocol/generalized_accounts/ga_explained.md at db9367f6addb1c2ac96f454cdb5c9234bcbfff54 · aeternity/protocol · GitHub

2 Likes

Thanks~I read time. Is there a spending limits contracts example?

I don’t think there is, but it shouldn’t be to hard to implement, maybe @hanssv.chain can give some hints

2 Likes

Thanks very much~ :grinning:

I don’t know of any concrete examples apart from the one I wrote on using EdDSA.

In the next protocol upgrade (a.k.a hard fork) there will be tools to introspect the transaction that is to be signed - this will enable advanced paying for Tx scenarios and various limitations on transaction type see Iris GA documentation.

Spending limits should be straightforward to implement, the GA contract has a state just like any other contract so keeping track of spending and time is just a matter of writing a bit of code.

2 Likes

Thank you~ Hope for more detailed and easy examples of GA.

GA is a very nice concept, but the learning curve seems a bit hard for me.

I tried to understand and use it, but failed :joy:

interesting thread =) love the idea of generalized accounts!

@hanssv.chain what about multi-sig contracts. is there any small example available? would that be a series of tx of multiple signers or would you rather provide multiple signatures within one transaction?

just asking because we plan to introduce support for GA in the next release of the java sdk :slight_smile:

2 Likes

Sorry, I have to admit I haven’t thought much about that use case and no, I don’t know of any example :disappointed:.

1 Like

I’ve read the protocol documents and a GA example in Python SDK , but still could not figure out how to play with it with advanced features :rofl:

Nice work!

1 Like