Skip to content

Commit

Permalink
Update: Transfer format.
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanIngte authored and BryanIngte committed Dec 30, 2023
1 parent 4a9d3a4 commit 380e7f4
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 16 deletions.
6 changes: 4 additions & 2 deletions book/Transfer_Interface.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ <h2 id="output"><a class="header" href="#output">Output</a></h2>
<p>The output of this function should be a message payload, which conform to the following format:</p>
<div class="table-wrapper"><table><thead><tr><th>Paramter</th><th>type</th><th>Description</th></tr></thead><tbody>
<tr><td>Transfer_hash</td><td>Felt252</td><td>Hash of Transfer operation</td></tr>
<tr><td>Sender</td><td>ContractAddress</td><td>Sender's address</td></tr>
<tr><td>Recipient</td><td>ContractAddress</td><td>Recipient's address</td></tr>
<tr><td>Amount</td><td>Felt252(u128)</td><td>Amount of this transfer operation</td></tr>
</tbody></table>
Expand All @@ -183,8 +184,9 @@ <h2 id="output"><a class="header" href="#output">Output</a></h2>
<p>Here is an example of an message payload(in Hex):</p>
<div class="table-wrapper"><table><thead><tr><th>Index</th><th>Value</th></tr></thead><tbody>
<tr><td>0</td><td>0x67c8925ab87c1501277c28168c59fbb93e434fd75c9133e455b866fd7efea5d</td></tr>
<tr><td>1</td><td>0x0</td></tr>
<tr><td>2</td><td>0x22658</td></tr>
<tr><td>1</td><td>0x111111111111111111111111111111111111111111111111111111111111111</td></tr>
<tr><td>2</td><td>0x0</td></tr>
<tr><td>3</td><td>0x22658</td></tr>
</tbody></table>
</div>
<h2 id="event"><a class="header" href="#event">Event</a></h2>
Expand Down
6 changes: 4 additions & 2 deletions book/Transfer_OP.html
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,16 @@ <h2 id="transfer-an-inscription-by-a-snrc-20-contract"><a class="header" href="#
<p>When users transfer in a contract that meets the <code>SNRC-20</code> standard, they need to organize their input in the following format:</p>
<div class="table-wrapper"><table><thead><tr><th>Paramter</th><th>type</th><th>Description</th></tr></thead><tbody>
<tr><td>Transfer_hash</td><td>Felt252</td><td>Hash of Transfer operation</td></tr>
<tr><td>Sender</td><td>Felt252(address)</td><td>Address of the sender</td></tr>
<tr><td>Recipient</td><td>Felt252(address)</td><td>Address of the recipient</td></tr>
<tr><td>Amount</td><td>Felt252(u128)</td><td>Amount of transfer</td></tr>
</tbody></table>
</div>
<p>For the Transfer operation, there is no <code>Lim</code> limit -- of course, you cannot transfer more than the amount of inscription balance you own.</p>
<p>Therefore, the input value in this example should be:</p>
<p>Therefore, the input value in this example coulb be:</p>
<pre><code class="language-json">&quot;Transfer_hash&quot;: &quot;0x67c8925ab87c1501277c28168c59fbb93e434fd75c9133e455b866fd7efea5d&quot;
&quot;Recipient&quot;: &quot;0x0&quot;
&quot;Sender&quot;: &quot;Sender's address&quot;
&quot;Recipient&quot;: &quot;Recipient's address&quot;
&quot;Amount&quot;: 140888
</code></pre>
<p>Then, the contract that complies with the <code>SNRC-20</code> standard will inscribe the above input into the <code>L2-&gt;L1</code> Message and emit an event.</p>
Expand Down
12 changes: 8 additions & 4 deletions book/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -568,14 +568,16 @@ <h2 id="transfer-an-inscription-by-a-snrc-20-contract"><a class="header" href="#
<p>When users transfer in a contract that meets the <code>SNRC-20</code> standard, they need to organize their input in the following format:</p>
<div class="table-wrapper"><table><thead><tr><th>Paramter</th><th>type</th><th>Description</th></tr></thead><tbody>
<tr><td>Transfer_hash</td><td>Felt252</td><td>Hash of Transfer operation</td></tr>
<tr><td>Sender</td><td>Felt252(address)</td><td>Address of the sender</td></tr>
<tr><td>Recipient</td><td>Felt252(address)</td><td>Address of the recipient</td></tr>
<tr><td>Amount</td><td>Felt252(u128)</td><td>Amount of transfer</td></tr>
</tbody></table>
</div>
<p>For the Transfer operation, there is no <code>Lim</code> limit -- of course, you cannot transfer more than the amount of inscription balance you own.</p>
<p>Therefore, the input value in this example should be:</p>
<p>Therefore, the input value in this example coulb be:</p>
<pre><code class="language-json">&quot;Transfer_hash&quot;: &quot;0x67c8925ab87c1501277c28168c59fbb93e434fd75c9133e455b866fd7efea5d&quot;
&quot;Recipient&quot;: &quot;0x0&quot;
&quot;Sender&quot;: &quot;Sender's address&quot;
&quot;Recipient&quot;: &quot;Recipient's address&quot;
&quot;Amount&quot;: 140888
</code></pre>
<p>Then, the contract that complies with the <code>SNRC-20</code> standard will inscribe the above input into the <code>L2-&gt;L1</code> Message and emit an event.</p>
Expand Down Expand Up @@ -664,6 +666,7 @@ <h2 id="output-2"><a class="header" href="#output-2">Output</a></h2>
<p>The output of this function should be a message payload, which conform to the following format:</p>
<div class="table-wrapper"><table><thead><tr><th>Paramter</th><th>type</th><th>Description</th></tr></thead><tbody>
<tr><td>Transfer_hash</td><td>Felt252</td><td>Hash of Transfer operation</td></tr>
<tr><td>Sender</td><td>ContractAddress</td><td>Sender's address</td></tr>
<tr><td>Recipient</td><td>ContractAddress</td><td>Recipient's address</td></tr>
<tr><td>Amount</td><td>Felt252(u128)</td><td>Amount of this transfer operation</td></tr>
</tbody></table>
Expand All @@ -672,8 +675,9 @@ <h2 id="output-2"><a class="header" href="#output-2">Output</a></h2>
<p>Here is an example of an message payload(in Hex):</p>
<div class="table-wrapper"><table><thead><tr><th>Index</th><th>Value</th></tr></thead><tbody>
<tr><td>0</td><td>0x67c8925ab87c1501277c28168c59fbb93e434fd75c9133e455b866fd7efea5d</td></tr>
<tr><td>1</td><td>0x0</td></tr>
<tr><td>2</td><td>0x22658</td></tr>
<tr><td>1</td><td>0x111111111111111111111111111111111111111111111111111111111111111</td></tr>
<tr><td>2</td><td>0x0</td></tr>
<tr><td>3</td><td>0x22658</td></tr>
</tbody></table>
</div>
<h2 id="event-2"><a class="header" href="#event-2">Event</a></h2>
Expand Down
2 changes: 1 addition & 1 deletion book/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion book/searchindex.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/Transfer_Interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The output of this function should be a message payload, which conform to the fo
| Paramter | type | Description |
| ---- | ---- | ---- |
| Transfer_hash | Felt252 | Hash of Transfer operation |
| Sender | ContractAddress | Sender's address |
| Recipient | ContractAddress | Recipient's address |
| Amount | Felt252(u128) | Amount of this transfer operation |

Expand All @@ -24,8 +25,9 @@ Here is an example of an message payload(in Hex):
| Index | Value |
| ---- | ---- |
| 0 | 0x67c8925ab87c1501277c28168c59fbb93e434fd75c9133e455b866fd7efea5d |
| 1 | 0x0 |
| 2 | 0x22658 |
| 1 | 0x111111111111111111111111111111111111111111111111111111111111111 |
| 2 | 0x0 |
| 3 | 0x22658 |

## Event
After a Transfer function is successfully executed, it should emit an event. This will facilitate the indexer to include this transaction.
Expand Down
6 changes: 4 additions & 2 deletions src/Transfer_OP.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,17 @@ When users transfer in a contract that meets the `SNRC-20` standard, they need t
| Paramter | type | Description |
| ---- | ---- | ---- |
| Transfer_hash | Felt252 | Hash of Transfer operation |
| Sender | Felt252(address) | Address of the sender |
| Recipient | Felt252(address) | Address of the recipient |
| Amount | Felt252(u128) | Amount of transfer |

For the Transfer operation, there is no `Lim` limit -- of course, you cannot transfer more than the amount of inscription balance you own.

Therefore, the input value in this example should be:
Therefore, the input value in this example coulb be:
```json
"Transfer_hash": "0x67c8925ab87c1501277c28168c59fbb93e434fd75c9133e455b866fd7efea5d"
"Recipient": "0x0"
"Sender": "Sender's address"
"Recipient": "Recipient's address"
"Amount": 140888
```

Expand Down
6 changes: 4 additions & 2 deletions src/Transfer_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The output of this function should be a message payload, which conform to the fo
| Paramter | type | Description |
| ---- | ---- | ---- |
| Transfer_hash | Felt252 | Hash of Transfer operation |
| Sender | ContractAddress | Sender's address |
| Recipient | ContractAddress | Recipient's address |
| Amount | Felt252(u128) | Amount of this transfer operation |

Expand All @@ -24,8 +25,9 @@ Here is an example of an message payload(in Hex):
| Index | Value |
| ---- | ---- |
| 0 | 0x67c8925ab87c1501277c28168c59fbb93e434fd75c9133e455b866fd7efea5d |
| 1 | 0x0 |
| 2 | 0x22658 |
| 1 | 0x111111111111111111111111111111111111111111111111111111111111111 |
| 2 | 0x0 |
| 3 | 0x22658 |

## Event
After a Transfer function is successfully executed, it should emit an event. This will facilitate the indexer to include this transaction.
Expand Down

0 comments on commit 380e7f4

Please sign in to comment.