You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: eip-0031.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,30 +119,34 @@ Compilation of babel fee box smartcontracts for different tokens of interest wil
119
119
120
120
The position of the recreated Babel Box in transaction's outputs must be set as a context extension variable in the spending Babel Box.
121
121
122
-
1. Context variable `0`
122
+
1. Context variable `0`:
123
123
* Type: `SInt`
124
124
* Value: position of the recreated Babel Box in transaction's outputs
125
125
126
126
### Parameters
127
127
Parameters (creator’s public key and price) are specified via registers, meaning the resulting babel fee boxes from different creators will always belong to the same P2S address, which will improve their searchability.
128
128
129
-
1. Register R4
129
+
1. Register `R4`:
130
130
* Type: `SigmaProp`
131
131
* Value: creator's public key
132
-
2. Register R5
132
+
2. Register `R5`:
133
133
* Type: `SLong`
134
134
* Value: how much nanoErgs is the creator willing to pay for one babel token
135
+
3. Register `R6`:
136
+
* Type: `SColl[Byte]`
137
+
* Value: id of the Babel Box being spent by this
138
+
* Only required for recreated boxes
135
139
136
140
Babel fee box creator is able to spent the babel box in any circumstances.
137
141
138
-
Other users on the other hand can spend this box as input to their transaction only when they also recreate it as output of their transaction with the very same registers (R4, R5) values together with insertion of a required amount of babel tokens (the amount of inserted babel tokens multiplied by the price specified in the R5 register has to be equal to or bigger than the amount of nanoErgs spent from the babel fee box).
142
+
Other users on the other hand can spend this box as input to their transaction only when they also recreate it as output of their transaction with the very same `R4` and `R5` registers values together with`R6` as described above and insertion of a required amount of babel tokens (the amount of inserted babel tokens multiplied by the price specified in the R5 register has to be equal to or bigger than the amount of nanoErgs spent from the babel fee box).
139
143
140
144
Wallets implementation
141
145
--------------------------------------------
142
146
143
147
Wallet developers will need to decide whether they want to support EIP-0031 or not. If they do decide to support this standard, they should also decide on which tokens they want to support (this could be done based on user requirements – e.g. implementing big stablecoins or “meme” coins, etc.), as this could be more convenient than supporting all tokens.
144
148
145
-
As P2S addresses belonging to specific token of interest stay the same, these addresses could be easily “hardcoded” when supporting only a few tokens. If the developers decide to support any token, the previously mentioned smartcontract for each token which user holds should be compiled or "mounted" as described on ["Contract Template"](#contract-template) subsection and the availability of Babel Fee boxes (UTXOs) for the specific tokens of interest in the blockchain should be subsequently checked.
149
+
As P2S addresses belonging to specific token of interest stay the same, these addresses could be easily “hardcoded” when supporting only a few tokens. If the developers decide to support any token, the previously mentioned smartcontract for each token which user holds should be compiled or "mounted" as described on ["Contract template"](#contract-template) subsection and the availability of Babel Fee boxes (UTXOs) for the specific tokens of interest in the blockchain should be subsequently checked.
146
150
147
151
The proposed babel fee smartcontract is quite general and does not impose much restriction for the transaction. It is therefore possible to transact some tokens while paying babel fees with another tokens, etc.
0 commit comments