Commit fcea4846 authored by Fo kossi Dagbegnikin's avatar Fo kossi Dagbegnikin
Browse files

Revert "Revert "Made language gender neutral, English more idiomatic, tiny formatting tweaks""

This reverts commit 64bd17a4.
parent 2ccea534
......@@ -2,7 +2,7 @@
##### NOTE: Doc not finished yet...
#### This repository contains EUR.TZ Smart Contracts: Fungible token SC and the eventSink SC (details later) written in [SmartPy](https://smartpy.io/) which is a Python library for constructing Tezos SC and compiled to Michelson code. The contract was inspired by the [FA1.2 standard](https://assets.tqtezos.com/token-contracts/1-fa12-lorentz).
#### This repository contains EUR.TZ Smart Contracts: Fungible token SC and the eventSink SC (details later) written in [SmartPy](https://smartpy.io/) which is a Python library for constructing Tezos SC and compiled to Michelson code. The contract was inspired by the [FA1.2 standard](https://assets.tqtezos.com/token-contracts/1-fa12-lorentz).
#### Get the Project:
......@@ -12,7 +12,7 @@
#### Compile SmartPy to Michelson:
1. Install SmartPy command line interface:
1. Install the SmartPy command line interface:
for the official stable version
......@@ -44,12 +44,12 @@ for the dev version (not as stable as the stable version but reasonably stable,
| increaseAllowanceFeeless | amount: int / b: bytes / f: address / k: key nonce: nat / s: signature / t: address | Admin / TransferAgent
| mint | address: address / amount: int | Admin
| resetAllAllowances | address | Owner / Admin / SuperTransferAgent
| resetAllowance | address: address / f: address | Owner / Admin / SuperTransferAgent
| resetAllowance | address: address / f: address | Owner / Admin / SuperTransferAgent
| setAdministrator | address | Admin
| setPause | bool | Admin
| transfer | amount: int / f: address / t: address | Owner / Admin / SuperTransferAgent
| transferFeeless | amount: int / b: bytes / f: address / k: key nonce: nat / s: signature / t: address | Admin / TransferAgent
#### TEST: The smartContract tests are written in smartPy and in JS (with Taquito, Mocha and Chai)
......@@ -62,37 +62,37 @@ for the dev version (not as stable as the stable version but reasonably stable,
1. Test separately each entry point:
```
yarn test-mint # Test Mint entryPoint
yarn test-burn # Test Burn entryPoint
yarn test-transfer # Test Transfer entryPoint
yarn test-manage-super-transfer-agent # Test AddSuperTransferAgent / DeleteSuperTransferAgent entryPoint
yarn test-manage-transfer-agent # Test AddTransferAgent / DeleteTransferAgent entryPoint
yarn test-approve # Test Approve entryPoint
yarn test-increase-allowance # Test IncreaseAllowance entryPoint
yarn test-decrease-allowance # Test DecreaseAllowance entryPoint
yarn test-reset-allowance # Test ResetAllowance entryPoint
yarn test-reset-all-allowances # Test ResetAllAllowances entryPoint
yarn test-feeless-transfer # Test FeelessTransfer entryPoint
yarn test-feeless-approve # Test FeelessApprove entryPoint
yarn test-feeless-increase-allowance # Test FeelessIncreaseAllowance entryPoint
yarn test-feeless-decrease-allowance # Test FeelessDecreaseAllowance entryPoint
yarn test-change-event-sink-address # Test ChangeEventSink entryPoint
yarn test-set-admin # Test SetAdmin entryPoint
yarn test-set-pause # Test SetPause entryPoint
```
......@@ -101,7 +101,7 @@ for the dev version (not as stable as the stable version but reasonably stable,
2. Launch batch of tests:
a. in a terminal, type: `chmod a+x ./scripts/runBatchOfTests.sh`
b. in a terminal, type: `./scripts/runBatchOfTests.sh`
......@@ -109,9 +109,9 @@ for the dev version (not as stable as the stable version but reasonably stable,
> Make someone else pay the GAS!
Feeless entrypoints are implemented to pay gas for new users that has no XTZ on their accounts, so the process is the following:
Feeless entrypoints are implemented to pay gas for new users that have no XTZ on their accounts, so the process is the following:
The user sign the operation locally with his privateKey and the **admin** or **transferAgent** will inject that operation in the chain after the signature verification in the smart contract with:
The user signs the operation locally with their privateKey and the **admin** or **transferAgent** will inject that operation in the chain after the signature verification in the smart contract with:
> *sp.check_signature(k, s, b)* where k: user public key, s: operation signature and b: operation bytes.
......@@ -173,32 +173,32 @@ In each *feeless* entry point we add the following command to verify that we are
```
#### Roles:
1. **Admin**: the contract owner, generally it's the originator of the SC (origination operation in Tezos = SC Deployment in Ethereum), this account can:
1. **Admin**: the contract owner, generally the originator of the SC (origination operation in Tezos = SC Deployment in Ethereum), this account can:
• Mint and Burn EUR.TZ
• Manage other roles (add and delete transferAgents and superTransfer agent)
• Change the contract's admin
• Approve any address to transfer EUR.TZ from an address to an other
• Change the eventSinkContract address
• Pay gas in Feeless operations
2. **Super Transfer Agent**:
Approves any address to transfer EUR.TZ from an address to an other
• Manage the transferAgents (add & delete)
• Approves any address to transfer EUR.TZ from one address to an other
• Manages the transferAgents (add & delete)
3. **TransferAgent**:
• Approves only his address to transfer EUR.TZ from an address to an other
• Approves only their address to transfer EUR.TZ from an address to an other
• Pay gas in Feeless operations
#### EventSinkContract:
> The eventSink contract is under:
> The eventSink contract is under:
[tkZosSmartContracts/EuroTzAllContracts/EventSinkContract/eventSink.py](https://gitlab.com/tezos-paris-hub/eurotz-euro-stable-coin/-/blob/master/EuroTzAllContracts/EventSinkContract/eventSink.py)
>This contract is designed as an alternative to the *event* system in *Ethereum*, after any mint, transfer or approval invocation in the EUR.TZ SC, an internal call to this contract is fired as an event.
> This contract is designed as an alternative to the *event* system in *Ethereum*, after any mint, transfer or approval invocation in the EUR.TZ SC, an internal call to this contract is fired as an event.
Here is a schema that explain more the process:
Here is a schema that explains the process more fully:
![Event Sink](assets/tkZosTokenDoc.png "EventSink Process")
......@@ -237,6 +237,3 @@ In order to reduce the EuroTz smart contract size, we replaced statements by cod
"27": "Chains Mismatch",
"28": "Trying to retrive undefined element in the Map/BigMap"
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment