SNS.yaml: transaction_fee

Hi, it’s me again. The SNS yaml example file documents the transaction_fee in e8s

# SNS ledger transaction fee.
transaction_fee: 10_000 e8s

While WaterNeuron used e8s, I just noticed that CYCLES-TRANSFER-STATION used tokens in their yaml file.

transaction_fee: 0.001 tokens

Is this expected? And if yes, does it means that every “tokens” of “fee” fields can be expressed either in e8s or tokens?

I believe this question is answered in the SNS yaml example file that you linked:

# For fields that represent token values (such as `transaction_fee`
# or `rejection_fee`), devs can specify decimal strings ending in
# "tokens" (plural), decimal strings ending in "token" (singular),
# or integer strings (base 10) ending in "e8s". In the case of
# "tokens" strings, the maximum number of digits after the (optional)
# decimal point is 8. The "_" character may be sprinkled throughout.
# Whitespace around number is insignificant. E.g. " 42 tokens" is
# equivalent to "42tokens".
1 Like

You are absolutely right! Too many questions are open at the same time, and with one particularly bothering me, along with the addition of the local replica/dfx issue, I am slowly losing clairvoyance…

So, thanks a lot Dylan, I appreciate it.

1 Like

I can relate, as I had to go down a similar path when implementing the SNS Tokenomics Analyzer (based on @bjoernek’s python tool).

1 Like

It’s kind of reassuring to hear I’m not the only one.

Regarding this particular thread, I updated my code, and it now manages e8s or tokens. I still have the “seconds” issue open, and hopefully, once that’s resolved, proposals will finally start succeeding because, so far, I only generate “Failed” proposals. :sweat_smile:

But I guess that’s for another day. Enough hobby time for one evening…

1 Like