Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6159,7 +6159,8 @@
"whales",
"tf",
"liquidTF",
"ffvault"
"ffvault",
"hipo"
],
"type": "string"
},
Expand Down
1 change: 1 addition & 0 deletions api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8985,6 +8985,7 @@ components:
- tf
- liquidTF
- ffvault
- hipo
TokenRates:
type: object
properties:
Expand Down
55 changes: 55 additions & 0 deletions pkg/bath/bath_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,21 @@ func TestFindActions(t *testing.T) {
tongo.MustParseBlockID("(0,8000000000000000,85794512)"),
tongo.MustParseBlockID("(0,8000000000000000,85794513)"),
},
"28bd278900a7b0f8febf02784b5dc4c3b4b693ad237ccdd4b212fe271b3507c8": {
tongo.MustParseBlockID("(0,8000000000000000,88655705)"),
},
"d4e8cd268769f830ceb6e58a1bf7f3fb85b13757e80fd2a9a31cce94e4914936": {
tongo.MustParseBlockID("(0,8000000000000000,88409051)"),
},
"472085c2ca9e2dc8f93dad9dfa2b656f8953d92cfd108504de48a78857562123": {
tongo.MustParseBlockID("(0,c000000000000000,88431279)"),
},
"9236ab916e92293a822e1bb701c970de97eac3df18f1a18bfca3a4d3fd049229": {
tongo.MustParseBlockID("(0,c000000000000000,88394637)"),
},
"ba0d8ea61d2caf1d870919362b8a9178726e8f3d71e45c0c866ae7fc450e6aff": {
tongo.MustParseBlockID("(0,8000000000000000,62680498)"),
},
}

type Case struct {
Expand Down Expand Up @@ -1251,6 +1266,46 @@ func TestFindActions(t *testing.T) {
filenamePrefix: "gas-relay-usdt",
hash: "8cd9d960e66fab8cebf45a679f46426cdc8bbd5411d31a89c1c2163a195de386",
},
{
// Instant minting is enabled: the treasury mints hGRAM in the deposit trace
// itself instead of deferring it to the round end.
name: "hipo instant stake",
filenamePrefix: "hipo-instant-stake",
hash: "28bd278900a7b0f8febf02784b5dc4c3b4b693ad237ccdd4b212fe271b3507c8",
},
{
// Stake placed during a running round: coins are saved on the wallet and an
// SBT is minted, hGRAM follows at round end.
name: "hipo deferred stake",
filenamePrefix: "hipo-deferred-stake",
hash: "d4e8cd268769f830ceb6e58a1bf7f3fb85b13757e80fd2a9a31cce94e4914936",
},
{
// Treasury had liquid GRAM, so the hGRAM burn is paid out in the same trace.
name: "hipo instant unstake",
filenamePrefix: "hipo-instant-unstake",
hash: "472085c2ca9e2dc8f93dad9dfa2b656f8953d92cfd108504de48a78857562123",
},
{
// Unstake during a running round: an SBT is minted for the round-end payout,
// so this stays a withdraw request.
name: "hipo deferred unstake",
filenamePrefix: "hipo-deferred-unstake",
hash: "9236ab916e92293a822e1bb701c970de97eac3df18f1a18bfca3a4d3fd049229",
},
{
// Negative case: the treasury refused the unstake and returned the hGRAM with
// proxy_rollback_unstake. It must not be reported as a withdrawal or a
// withdraw request - the expected output is a plain jetton burn. Rollbacks
// are rare, and this block is past the retention window of the public
// liteservers, so the golden file still has to be recorded against an archive
// liteserver (LITE_SERVERS). TestHipoUnstakeNotRolledBack covers the guard
// itself without network access.
skip: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the point of having a skipped test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None, fair point. It was waiting for an archive liteserver that I do not have, so I removed it. The rollback case is now covered offline by TestWithdrawHipoStakeRequestStraw on a synthetic bubble tree.

name: "hipo rollback unstake",
filenamePrefix: "hipo-rollback-unstake",
hash: "ba0d8ea61d2caf1d870919362b8a9178726e8f3d71e45c0c866ae7fc450e6aff",
},
}

var sharedStorage *litestorage.LiteStorage
Expand Down
Loading