Lesson 2: Distribute shares
Difficulty: low.
These Aira DAO Modules will be used:
Lesson Description
Some shareholder tokens were emitted when DAO was created. Now you need to distribute them to your team members.
You can do that in 2 different ways:
- Send the tokens directly;
- Call an
Aira BuilderShareholderbuilder to create aShareholdercontract. When theSignfunction is called, it will automatically withdraw a specified number of tokens from thefounderto therecipient(specified during contract creation).
The main difference is that, in the first case, the recipient becomes a shareholder automatically, without any approval. The second option requires explicit approval. The function sign is used for that.
Notice: do not forget to call the
approvefunction (seeShareholder tokencontract) to enable token withdrawal byShareholdercontract.
Skill test
Complete this lesson and get 50
ABTtokens!
Instructions:
- Allow the
Airalab learning centeraddress to withdraw 1 share of theShareholder token. - Call the
Execute()function from theLesson 2contract.