Skip to content
Snippets Groups Projects
Commit c8ca0471 authored by Éloïs's avatar Éloïs
Browse files

feat(gdev): add transaction bytes fees (1 cent per byte)

Closes #61
parent 39a0f09b
Branches
Tags
1 merge request!62feat(gdev): add transaction bytes fees (1 cent per byte)
Feature: Balance transfer Feature: Balance transfer
Scenario: After 10 blocks, the monetary mass should be 60 ĞD Scenario: After 10 blocks, the monetary mass should be 600 ĞD
Then Monetary mass should be 30.00 ĞD Then Monetary mass should be 300.00 ĞD
Then Current UD amount should be 10.00 ĞD Then Current UD amount should be 100.00 ĞD
When 10 blocks later When 10 blocks later
Then Monetary mass should be 60.00 ĞD Then Monetary mass should be 600.00 ĞD
When 10 blocks later When 10 blocks later
Then Monetary mass should be 90.00 ĞD Then Monetary mass should be 900.00 ĞD
Then Current UD amount should be 10.00 ĞD Then Current UD amount should be 100.00 ĞD
@genesis.default @genesis.default
Feature: Balance transfer all Feature: Balance transfer all
Scenario: If alice sends all her ĞDs to Dave, Dave will get 8 ĞD Scenario: If alice sends all her ĞDs to Dave, Dave will get 96 ĞD
When alice sends all her ĞDs to dave When alice sends all her ĞDs to dave
""" """
Alice is a smith member, as such she is not allowed to empty her account completely, Alice is a smith member, as such she is not allowed to empty her account completely,
if she tries to do so, the existence deposit (2 ĞD) must remain. if she tries to do so, the existence deposit (2 ĞD) must remain.
""" """
Then alice should have 2 ĞD Then alice should have 2 ĞD
Then dave should have 8 ĞD """
100 ĞD (initial Alice balance) - 2 ĞD (Existential deposit) - 1.4 ĞD (transaction fees)
"""
Then dave should have 96.60 ĞD
{ {
"first_ud": 1000, "first_ud": 10000,
"first_ud_reeval": 100, "first_ud_reeval": 100,
"identities": { "identities": {
"Alice": { "Alice": {
"balance": 1000, "balance": 10000,
"certs": ["Bob", "Charlie"], "certs": ["Bob", "Charlie"],
"pubkey": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" "pubkey": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
}, },
"Bob": { "Bob": {
"balance": 1000, "balance": 10000,
"certs": ["Alice", "Charlie"], "certs": ["Alice", "Charlie"],
"pubkey": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty" "pubkey": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty"
}, },
"Charlie": { "Charlie": {
"balance": 1000, "balance": 10000,
"certs": ["Alice", "Bob"], "certs": ["Alice", "Bob"],
"pubkey": "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y" "pubkey": "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y"
} }
......
...@@ -79,7 +79,7 @@ frame_support::parameter_types! { ...@@ -79,7 +79,7 @@ frame_support::parameter_types! {
// Transaction payment // Transaction payment
frame_support::parameter_types! { frame_support::parameter_types! {
pub const TransactionByteFee: Balance = 0; pub const TransactionByteFee: Balance = 1;
} }
// Universal dividend // Universal dividend
......
...@@ -77,7 +77,7 @@ frame_support::parameter_types! { ...@@ -77,7 +77,7 @@ frame_support::parameter_types! {
// Transaction payment // Transaction payment
frame_support::parameter_types! { frame_support::parameter_types! {
pub const TransactionByteFee: Balance = 0; pub const TransactionByteFee: Balance = 1;
} }
// Universal dividend // Universal dividend
......
...@@ -79,7 +79,7 @@ frame_support::parameter_types! { ...@@ -79,7 +79,7 @@ frame_support::parameter_types! {
// Transaction payment // Transaction payment
frame_support::parameter_types! { frame_support::parameter_types! {
pub const TransactionByteFee: Balance = 0; pub const TransactionByteFee: Balance = 1;
} }
// Universal dividend // Universal dividend
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment