Skip to content

Commit

Permalink
changes in chapter FA12, multisig
Browse files Browse the repository at this point in the history
  • Loading branch information
OCTO-FRAH committed Nov 23, 2020
1 parent 14514b1 commit 9fc418d
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,5 @@ let main (action,store : parameter * storage): return =

<!-- prettier-ignore -->1- Write the _compile-storage_ command and the LIGO expression for initializing the *Sol* system containing planet "earth" with coordinates (2,7,1).

<!-- prettier-ignore -->2- Write the _dry-run_ command and the LIGO expression for adding a planet "mars" with coordinates (4,15,2) in our *Sol* system. Reuse the *Sol* system of step 1.
<!-- prettier-ignore -->2- Write the _dry-run_ command and the LIGO expression for adding a planet "mars" with coordinates (4,15,2) in our *Sol* system.
<!-- prettier-ignore -->⚠️ Remind that the _dry-run_ command expects a parameter "<entrypoint(p)>" and a parameter "<storage_state>" as shown in Simulating section. For this _dry-run_ command you must write the "<entrypoint(p)>" parameter and reuse the *Sol* system of step 1 as "<storage_state>" parameter.
15 changes: 13 additions & 2 deletions src/frontend/src/pages/Chapters/Camel/ChapterFA12/course.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ERC721 is the standard rule set for non-fungible tokens.
This Fungible token standard provides basic functionality to transfer tokens, as well as to allow tokens to be approved so they can be spent by another on-chain third party.

Possible actions :
_Appove_ - Sender can specify an amount of token that can be spent by someone else (from his account)
_Approve_ - Sender can specify an amount of token that can be spent by someone else (from his account)
_Transfer_ - Transfer an amount of tokens from an account to another account (or third-party on-chain smart contract)
_GetAllowance_ - Return the amount that can be spent by someone from sender's account
_GetBalance_ - Return the sender's account balance
Expand Down Expand Up @@ -167,7 +167,7 @@ Let's assume that the _TezosAcamedyToken_ has been deployed.
Consider your account is _me_ (at address tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ) which has been granted 1,000,000 tokens.
Consider alice's account (at address tz1NiAGZgRV8F1E3qYFEPgajntzTRDYkU9h7)

<!-- prettier-ignore -->1- We want you to simulate the transfer of 2 TAT (Tezos Academy Token) to *alice*. Write a ligo command line for preparing a simulated storage where you (tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ) possess 1,000,000 tokens and no allowance.
<!-- prettier-ignore -->1- We want you to simulate the transfer of 2 TAT (Tezos Academy Token) to *alice*. Complete the ligo command line for preparing a storage state where you (tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ) possess 1,000,000 tokens and no allowance. Write the storage state (all values of the storage must be filled).

<!-- prettier-ignore -->2- Write a ligo command line for preparing the invocation of an *Approval* of 2 TAT (Tezos Academy Token) for *alice*.

Expand All @@ -194,3 +194,14 @@ Consider alice's account (at address tz1NiAGZgRV8F1E3qYFEPgajntzTRDYkU9h7)
```

<!-- prettier-ignore -->10- Write a Tezos command line that simulates your *Transfer* invocation.

<!-- prettier-ignore -->Remind the syntax of the tezos-client transfer command:

```
tezos-client transfer <tx_amount> from <tx_user> to <contract_name> --arg '<entrypoint_invocation>' --dry-run
```

<!-- prettier-ignore --><tx\_amount> = number of mutez of the transaction
<!-- prettier-ignore --><tx\_user> = account who is emitting the transaction
<!-- prettier-ignore --><contract_name> = name of the contract
<!-- prettier-ignore --><entrypoint_invocation> = michelson expression representing the entrypoint and its related parameters
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ligo dry-run --sender=tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ fa12.mligo main '<par
// Modify the code below
tezos-client transfer <amount> from <user> to <contract_name> --arg '<entrypoint_invocation>' --dry-run
// Modify the code below
ligo compile-parameter refa12.mligo main ''
ligo compile-parameter fa12.mligo main ''
// Modify the code below
ligo compile-storage fa12.mligo main ''
// Modify the code below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Map.map applyDeduceCatg store.celestialbodies

We want you to update our "starmap" contract in order to take this new rule into account.

<!-- prettier-ignore -->1- Write the _dry-run_ command and the associated invocation (entry point) for taking the new rule into account.
<!-- prettier-ignore -->1- Write the _dry-run_ command and the associated invocation (entry point) for taking the new rule into account. You must write a lambda function within the parentheses of _DeduceCategoryChange_ as shown in the Lambda definition section. The lambda function must implement the three following rules.

<!-- prettier-ignore -->2- First rule : if the coordinates of a planet is (0,0,0) then the celestial body is considered as a STAR.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,5 @@ block { skip } with case action of

<!-- prettier-ignore -->1- Write the _compile-storage_ command and the LIGO expression for initializing the *Sol* system containing planet "earth" with coordinates (2,7,1).

<!-- prettier-ignore -->2- Write the _dry-run_ command and the LIGO expression for adding a planet "mars" with coordinates (4,15,2) in our *Sol* system. Reuse the *Sol* system of step 1.
<!-- prettier-ignore -->2- Write the _dry-run_ command and the LIGO expression for adding a planet "mars" with coordinates (4,15,2) in our *Sol* system.
<!-- prettier-ignore -->⚠️ Remind that the _dry-run_ command expects a parameter "<entrypoint(p)>" and a parameter "<storage_state>" as shown in Simulating section. For this _dry-run_ command you must write the "<entrypoint(p)>" parameter and reuse the *Sol* system of step 1 as "<storage_state>" parameter.
15 changes: 13 additions & 2 deletions src/frontend/src/pages/Chapters/Pascal/ChapterFA12/course.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ERC721 is the standard rule set for non-fungible tokens.
This Fungible token standard provides basic functionality to transfer tokens, as well as allowing tokens to be approved so they can be spent by another on-chain third party.

Possible actions :
_Appove_ - Sender can specify an amount of token that can be spent by someone else (from his account)
_Approve_ - Sender can specify an amount of token that can be spent by someone else (from his account)
_Transfer_ - Transfer an amount of tokens from an account to another account (or third-party on-chain smart contract)
_GetAllowance_ - Return the amount that can be spent by someone from sender's account
_GetBalance_ - Return the sender's account balance
Expand Down Expand Up @@ -203,7 +203,7 @@ Let's assume _TezosAcamedyToken_ has been deployed.
Consider your account is _me_ (at address tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ) which has been granted 1,000,000 token.
Consider alice's account (at address tz1NiAGZgRV8F1E3qYFEPgajntzTRDYkU9h7)

<!-- prettier-ignore -->1- We want you to simulate the transfer of 2 TAT (Tezos Academy Token) to *alice*. Write a ligo command line for preparing a simulated storage where you (tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ) possess 1,000,000 tokens and no allowance.
<!-- prettier-ignore -->1- We want you to simulate the transfer of 2 TAT (Tezos Academy Token) to *alice*. Complete the ligo command line for preparing a storage state where you (tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ) possess 1,000,000 tokens and no allowance. Write the storage state (all values of the storage must be filled).

<!-- prettier-ignore -->2- Write a ligo command line for preparing the invocation of an *Approval* of 2 TAT (Tezos Academy Token) for *alice*.

Expand All @@ -230,3 +230,14 @@ Consider alice's account (at address tz1NiAGZgRV8F1E3qYFEPgajntzTRDYkU9h7)
```

<!-- prettier-ignore -->10- Write a Tezos command line that simulates your *Transfer* invocation.

<!-- prettier-ignore -->Remind the syntax of the tezos-client transfer command:

```
tezos-client transfer <tx_amount> from <tx_user> to <contract_name> --arg '<entrypoint_invocation>' --dry-run
```

<!-- prettier-ignore --><tx\_amount> = number of mutez of the transaction
<!-- prettier-ignore --><tx\_user> = account who is emitting the transaction
<!-- prettier-ignore --><contract_name> = name of the contract
<!-- prettier-ignore --><entrypoint_invocation> = michelson expression representing the entrypoint and its related parameters
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ligo dry-run --sender=tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ fa12.ligo main '<para
// Modify the code below
tezos-client transfer <amount> from <user> to <contract_name> --arg '<entrypoint_invocation>' --dry-run
// Modify the code below
ligo compile-parameter refa12.ligo main ''
ligo compile-parameter fa12.ligo main ''
// Modify the code below
ligo compile-storage fa12.ligo main ''
// Modify the code below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Map.map (applyDeduceCatg, store.celestialbodies);

We want you to update our "starmap" contract in order to take this new rule into account.

<!-- prettier-ignore -->1- Write the _dry-run_ command and the associated invocation (entry point) for taking the new rule into account.
<!-- prettier-ignore -->1- Write the _dry-run_ command and the associated invocation (entry point) for taking the new rule into account. You must write a lambda function within the parentheses of _DeduceCategoryChange_ as shown in the Lambda definition section. The lambda function must implement the three following rules.

<!-- prettier-ignore -->2- First rule : if the coordinates of a planet is (0,0,0) then the celestial body is considered as a STAR.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Notice that in the _Withdraw_ function :

<!-- prettier-ignore --> Modify the existing *Multisig* contract in order to handle reputation level for each voters. We plan to grant reputation points when the message is really executed (one point of reputation for each voters).

<!-- prettier-ignore --> 1- Modify storage to have an additionnal property called *reputation* which associates a _nat_ number to a voter.
<!-- prettier-ignore --> 1- Modify the storage to have an additionnal property called *reputation* which associates a _nat_ number to a voter.

<!-- prettier-ignore --> In the *send* function, notice that voters are computed in a variable *new_store*.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,5 @@ let main = ((action,store) : (parameter,storage)): return =>

<!-- prettier-ignore -->1- Write the _compile-storage_ command and the LIGO expression for initializing the *Sol* system containing planet "earth" with coordinates (2,7,1).

<!-- prettier-ignore -->2- Write the _dry-run_ command and the LIGO expression for adding a planet "mars" with coordinates (4,15,2) in our *Sol* system. Reuse the *Sol* system of step 1.
<!-- prettier-ignore -->2- Write the _dry-run_ command and the LIGO expression for adding a planet "mars" with coordinates (4,15,2) in our *Sol* system.
<!-- prettier-ignore -->⚠️ Remind that the _dry-run_ command expects a parameter "<entrypoint(p)>" and a parameter "<storage_state>" as shown in Simulating section. For this _dry-run_ command you must write the "<entrypoint(p)>" parameter and reuse the *Sol* system of step 1 as "<storage_state>" parameter.
15 changes: 13 additions & 2 deletions src/frontend/src/pages/Chapters/Reason/ChapterFA12/course.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ERC721 is the standard rule set for non-fungible tokens.
This Fungible token standard provides basic functionality to transfer tokens, as well as allowing tokens to be approved so they can be spent by another on-chain third party.

Possible actions :
_Appove_ - Sender can specify an amount of token that can be spent by someone else (from his account)
_Approve_ - Sender can specify an amount of token that can be spent by someone else (from his account)
_Transfer_ - Transfer an amount of tokens from an account to another account (or third-party on-chain smart contract)
_GetAllowance_ - Return the amount that can be spent by someone from sender's account
_GetBalance_ - Return the sender's account balance
Expand Down Expand Up @@ -171,7 +171,7 @@ Let's assume _TezosAcamedyToken_ has been deployed.
Consider your account is _me_ (at address tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ).
Consider alice's account (at address tz1NiAGZgRV8F1E3qYFEPgajntzTRDYkU9h7).

<!-- prettier-ignore -->1- We want you to simulate the transfer of 2 TAT (Tezos Academy Token) to *alice*. Write a ligo command line for preparing a simulated storage where you (tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ) possess 1,000,000 tokens and no allowance.
<!-- prettier-ignore -->1- We want you to simulate the transfer of 2 TAT (Tezos Academy Token) to *alice*. Complete the ligo command line for preparing a storage state where you (tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ) possess 1,000,000 tokens and no allowance. Write the storage state (all values of the storage must be filled).

<!-- prettier-ignore -->2- Write a ligo command line for preparing the invocation of an *Approval* of 2 TAT (Tezos Academy Token) for *alice*.

Expand All @@ -198,3 +198,14 @@ Consider alice's account (at address tz1NiAGZgRV8F1E3qYFEPgajntzTRDYkU9h7).
```

<!-- prettier-ignore -->10- Write a Tezos command line that simulates your *Transfer* invocation.

<!-- prettier-ignore -->Remind the syntax of the tezos-client transfer command:

```
tezos-client transfer <tx_amount> from <tx_user> to <contract_name> --arg '<entrypoint_invocation>' --dry-run
```

<!-- prettier-ignore --><tx\_amount> = number of mutez of the transaction
<!-- prettier-ignore --><tx\_user> = account who is emitting the transaction
<!-- prettier-ignore --><contract_name> = name of the contract
<!-- prettier-ignore --><entrypoint_invocation> = michelson expression representing the entrypoint and its related parameters
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ligo dry-run --sender=tz1SdT62G8tQp9fdHh4f2m4VtL8aGG6NUcmJ fa12.religo main '<pa
// Modify the code below
tezos-client transfer <amount> from <user> to <contract_name> --arg '<entrypoint_invocation>' --dry-run
// Modify the code below
ligo compile-parameter refa12.religo main ''
ligo compile-parameter fa12.religo main ''
// Modify the code below
ligo compile-storage fa12.religo main ''
// Modify the code below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Map.map (applyDeduceCatg, store.celestialbodies);

We want you to update our "starmap" contract in order to take this new rule into account.

<!-- prettier-ignore -->1- Write the _dry-run_ command and the associated invocation (entry point) for taking the new rule into account.
<!-- prettier-ignore -->1- Write the _dry-run_ command and the associated invocation (entry point) for taking the new rule into account. You must write a lambda function within the parentheses of _DeduceCategoryChange_ as shown in the Lambda definition section. The lambda function must implement the three following rules.

<!-- prettier-ignore -->2- First rule : if the coordinates of a planet is (0,0,0) then the celestial body is considered as a STAR.

Expand Down

0 comments on commit 9fc418d

Please sign in to comment.