Conversation
99d8c50 to
cb508a9
Compare
cf6233d to
1ff5def
Compare
| Two assets issued by the same faucet with _different_ callback flags are considered completely different assets. It is recommended that faucets issue all of their assets with the same callback flag. | ||
| ::: | ||
|
|
||
| **Faucet callback procedures.** A faucet registers callbacks by storing the procedure root (hash) of a callback procedure in a well-known storage slot. Two callbacks are supported: |
There was a problem hiding this comment.
Is it worth mentioning how they are stored? I'm not familiar with the details (just catching up with these last few PRs) and it feels like it would be helpful, but maybe it's an implementation detail that's not meant for the common reader
There was a problem hiding this comment.
The docs already mention that the callback's procedure root is stored in a storage slot, so I guess by "how they are stored" you'd like to understand where the procedure itself lives? If so, yes that may be good to include (it is simply a public procedure in the account code).
| :::tip | ||
| Two assets issued by the same faucet with _different_ callback flags are considered completely different assets. It is recommended that faucets issue all of their assets with the same callback flag. | ||
| ::: |
There was a problem hiding this comment.
So a single faucet account can, at most, create two different types of assets during its lifetime, no? If so, I wonder if this is worth mentioning or if it's already well implied
|
|
||
| ### Callbacks | ||
|
|
||
| Asset callbacks allow a faucet to execute custom logic whenever one of its assets is added to an account vault or to an output note. This gives faucet issuers a mechanism to enforce policies on their assets. For example, maintaining a block list of accounts that are not allowed to receive the asset or globally pausing transfers of assets. |
There was a problem hiding this comment.
nit: "faucet issuers" sounds a bit odd to me. Maybe "asset issuers" would be better?
Adds docs for callbacks.
part of #2432