Skip to content

Commit

Permalink
Revert "Adiciona função trade"
Browse files Browse the repository at this point in the history
This reverts commit 349bd4e.
  • Loading branch information
aldenio committed Nov 23, 2023
1 parent 4008d6b commit 9b9527d
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 62 deletions.
22 changes: 22 additions & 0 deletions ITPFtOperation1052.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,25 @@ Função para os participantes realizarem a operação de compra e venda entre s
| tpftAmount | uint256 | Quantidade de TPFt a ser negociada. Incluir as 2 casas decimais. |
| unitPrice | uint256 | Preço unitário do TPFt. Incluir as 8 casas decimais. |

### trade

```solidity
function trade(uint256 operationId, address sender, contract RealTokenizado senderToken, address receiver, contract RealTokenizado receiverToken, enum ITPFtOperation.CallerPart callerPart, struct ITPFt.TPFtData tpftData, uint256 tpftAmount, uint256 unitPrice) external
```

Função para participantes e/ou clientes realizarem a operação de compra e venda entre si
informando o endereço das carteiras das partes e do seu Real Tokenizado.

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| operationId | uint256 | Número de operação + data vigente no formato yyyyMMdd. |
| sender | address | Endereço da carteira do cedente da operação. |
| senderToken | contract RealTokenizado | RealTokenizado do cedente da operação. |
| receiver | address | Endereço da carteira do cessionário da operação. |
| receiverToken | contract RealTokenizado | RealTokenizado do cessionário da operação. |
| callerPart | enum ITPFtOperation.CallerPart | Parte que está transmitindo o comando da operação. Se for o cedente deve ser informado CallerPart.TPFtSender, se for o cessionário deve ser informado CallerPart.TPFtReceiver. |
| tpftData | struct ITPFt.TPFtData | Estrutura de dados do TPFt, que incluem as seguintes informações: <br />- `acronym`: A sigla do TPFt. <br />- `code`: O código único do TPFt. <br />- `maturityDate`: A data de vencimento do TPFt, representada como um valor numérico (timestamp Unix). |
| tpftAmount | uint256 | Quantidade de TPFt a ser negociada. Incluir as 2 casas decimais. |
| unitPrice | uint256 | Preço unitário do TPFt. Incluir as 8 casas decimais. |
104 changes: 42 additions & 62 deletions abi/ITPFtOperation1052.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,14 @@
},
{
"indexed": false,
"internalType": "uint256",
"name": "cnpj8Sender",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "cnpj8Receiver",
"type": "uint256"
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "sender",
"internalType": "contract RealTokenizado",
"name": "senderToken",
"type": "address"
},
{
Expand All @@ -34,9 +28,9 @@
},
{
"indexed": false,
"internalType": "enum ITPFtOperation.CallerPart",
"name": "callerPart",
"type": "uint8"
"internalType": "contract RealTokenizado",
"name": "receiverToken",
"type": "address"
},
{
"components": [
Expand Down Expand Up @@ -92,7 +86,7 @@
"type": "uint256"
}
],
"name": "CommandEvent",
"name": "OperationClientTradeEvent",
"type": "event"
},
{
Expand All @@ -104,6 +98,18 @@
"name": "operationId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "cnpj8Sender",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "cnpj8Receiver",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
Expand All @@ -116,12 +122,6 @@
"name": "receiver",
"type": "address"
},
{
"indexed": false,
"internalType": "enum ITPFtOperation.CallerPart",
"name": "callerPart",
"type": "uint8"
},
{
"components": [
{
Expand Down Expand Up @@ -176,7 +176,7 @@
"type": "uint256"
}
],
"name": "CommandTradeEvent",
"name": "OperationEvent",
"type": "event"
},
{
Expand All @@ -188,18 +188,6 @@
"name": "operationId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "cnpj8Sender",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "cnpj8Receiver",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
Expand Down Expand Up @@ -266,30 +254,41 @@
"type": "uint256"
}
],
"name": "OperationEvent",
"name": "OperationTradeEvent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "operationId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "contract RealTokenizado",
"name": "senderToken",
"type": "address"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "contract RealTokenizado",
"name": "receiverToken",
"type": "address"
},
{
"internalType": "enum ITPFtOperation.CallerPart",
"name": "callerPart",
"type": "uint8"
},
{
"components": [
{
Expand All @@ -308,44 +307,25 @@
"type": "uint256"
}
],
"indexed": false,
"internalType": "struct ITPFt.TPFtData",
"name": "tpftData",
"type": "tuple"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tpftAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "unitPrice",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "financialValue",
"type": "uint256"
},
{
"indexed": false,
"internalType": "string",
"name": "status",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"name": "OperationTradeEvent",
"type": "event"
"name": "trade",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
Expand Down

0 comments on commit 9b9527d

Please sign in to comment.