|
| 1 | +Feature: Delegation |
| 2 | + |
| 3 | + Rule: Delegation transaction can be constructed |
| 4 | + |
| 5 | + Scenario: Valid case |
| 6 | + Given exchange holds 2'463'071'701 ADA in my account |
| 7 | + And stake pool TEST_1 is registered |
| 8 | + When I provide details of my delegation intent |
| 9 | + Then exchange can construct a transaction for this delegation |
| 10 | + And the delegation transaction matches my delegation intent |
| 11 | + |
| 12 | + Scenario: Invalid case – no funds |
| 13 | + Given exchange holds no funds in my account |
| 14 | + And stake pool TEST_1 is registered |
| 15 | + When I provide details of my delegation intent |
| 16 | + Then an error is returned (this validation may not occur until submit) |
| 17 | + And exchange doesn't construct a transaction for this delegation |
| 18 | + |
| 19 | + Scenario: Invalid case – not enough funds to delegate (less than 2ADA) |
| 20 | + Given exchange holds 1.5 ADA in my account |
| 21 | + And stake pool TEST_1 is registered |
| 22 | + When I provide details of my delegation intent |
| 23 | + Then an error is returned (this validation may not occur until submit) |
| 24 | + And exchange doesn't construct a transaction for this delegation |
| 25 | + |
| 26 | + Scenario: Invalid case – not my account |
| 27 | + Given exchange holds 1'000 ADA in my account |
| 28 | + And stake pool TEST_1 is registered |
| 29 | + When I provide my delegation intent using a different account address |
| 30 | + Then an error is returned due to me not having permission |
| 31 | + And exchange doesn't construct a transaction for this delegation |
| 32 | + |
| 33 | + Rule: Delegation transaction can be submitted |
| 34 | + |
| 35 | + Scenario: Valid delegation transaction |
| 36 | + Given exchange holds 100 ADA in my account |
| 37 | + And exchange has constructed a valid delegation transaction for stake pool TEST_1 |
| 38 | + When exchange submits the transaction |
| 39 | + Then a successful response is returned |
| 40 | + And there is onchain proof |
| 41 | + |
| 42 | + Scenario: Invalid case – stakepool not registered |
| 43 | + Given exchange holds 100 ADA in my account |
| 44 | + And exchange has constructed a delegation transaction using a stakepool id that is not registered |
| 45 | + When exchange submits the transaction |
| 46 | + Then an error is returned |
| 47 | + And delegation is not accepted on the blockchain |
0 commit comments