Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,23 @@ exports[`V5 / V6 categorization snapshots (alongside nock HTTP fixtures) matches
"transactionType": "BALANCER_EXCHANGE",
},
},
"BALANCER_STAKE": {
"txHash": "0xf72595e9c0bfa407b608b11747954896834df998398ef1b27e3204ffbbae5a5b",
"v5": {
"readable": "Balancer: Stake",
"toAddressName": "BALANCER_VE_BAL",
"transactionCategory": "STAKE",
"transactionProtocol": "BALANCER",
"transactionType": "BALANCER_STAKE",
},
"v6": {
"readable": "Staked 30.4778 B-80BAL-20WETH",
"toAddressName": "BALANCER_VE_BAL",
"transactionCategory": "STAKE",
"transactionProtocol": "BALANCER",
"transactionType": "BALANCER_STAKE",
},
},
"BALANCER_WITHDRAW": {
"txHash": "0x034eb747b8254e57bd3c56681ac79f126aa0f8e386b91fc0ee65b1fa1bfd38f2",
"v5": {
Expand Down
2 changes: 2 additions & 0 deletions packages/tx-categorize/src/testCases.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const txTestCases = {
METAMASK_STAKE_V1_CLAIM: '0x2ebb958fef3b51fe3306d5a027a83f22292d106773768e3748a4553b796333f9',
CONVEX_CLAIM: '0x22288abb8adf55b26445812dcf9e79b145f31f351175f77be1bbd96362871351',
METAMASK_STAKE_STAKE: '0x7cb0d9f70ddca8933d9dc0f1a75ab98d9a03186de580fa494a664d93180bb123',
BALANCER_STAKE: '0xf72595e9c0bfa407b608b11747954896834df998398ef1b27e3204ffbbae5a5b',
}

/**
Expand Down Expand Up @@ -214,6 +215,7 @@ export const txTestCaseReadableLabels: Record<string, string> = {
METAMASK_STAKE_V1_CLAIM: 'Stake: Claimed 0.0341 ETH',
AAVE_V3_STAKE: 'Staked 12.3528 AAVE',
METAMASK_STAKE_STAKE: 'Staked 0.0001 ETH',
BALANCER_STAKE: 'Staked 30.4778 B-80BAL-20WETH',
}

export const lineaTxTestCases = {
Expand Down
11 changes: 11 additions & 0 deletions packages/tx-categorize/src/txSchemas/heuristicMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@ const determinants: DeterminantMap = {
name: 'METAMASK_POOLED_STAKING',
protocol: 'METAMASK_STAKE',
},
{
address: '0xc128a9954e6c874ea3d62ce62b468ba073093f25',
name: 'BALANCER_VE_BAL',
protocol: 'BALANCER',
},
],
methodIds: [
{ id: '0xaf7060fd', name: EXCHANGE, priority: 1, protocol: 'LIFI' }, // lifi
Expand Down Expand Up @@ -702,6 +707,12 @@ const determinants: DeterminantMap = {
name: STAKE,
priority: 14,
},
// 0xC128a9954e6c874eA3d62ce62B468bA073093F25 veBAL VotingEscrow
{
hash: '0x4566dfc29f6f11d13a418c26a02bef7c28bae749d4de47e4e6a7cddea6730d59',
name: STAKE,
priority: 14,
},
],
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[
{
"scope": "https://primitives.api.cx.metamask.io:443",
"method": "GET",
"path": "/v1/networks/1/transactions/0xf72595e9c0bfa407b608b11747954896834df998398ef1b27e3204ffbbae5a5b?includeLogs=true&includeValueTransfers=true",
"body": "",
"status": 200,
"response": "1b2e080064b39ff9a7eb8ece6f3b0283e45bfb8150b6e56c96d24081066f026018caf92481be8b8915f8d58b2b4a1f65722e7896e7904b84d93a7586a501a5feb1e2a1fe0e2eaf3ff7f30d34c0d7ab72b61c36b02f4f587b41ed443555cb49ada8a4b9cc544c6351e71ac298d6eadd237beeb0c1b8f1fde317131a6d300e2f1e2fd06883e91787f60e6efc7c030d70367c8d9f021a3072b9c6748df23371c3d2889e20e29f1054b57e7f1877dfbe78e87182c6a99a9a71170ec4ab26a3922386a750b182a3484d5264764ca8c5c22d65a9e658c90cc56d06ab92c442c59561839d9fa125ad8964839d9f7f39c784c6565170839d9fbf3fed4740034989903217d820d68a71d9bf8ccffcfcfd693f021a484a8494b9c0068f87c711d092e60dc68b8717f77ed91b20330050a554a9e40d1ee27273985fcc8c924a5e43b40a6cf080593e3440d8e072c8b7e941ac6e965394a13585cb2c3ca2704f45bb631534599c6183753a3cd80da67df65c7db995c03c7bd8447493be8a16996b1549331b6cb03f7f723a1d4ed096df9f230ae5172363bfe27486f6d73bd71627a078c52b1834104cb5d64c39ab561554f15a6bc6d83ff83d34d20dc6e1f172f271793ae729cee708fbcca3440826319b7d761b1a0b05bd97c49d501967d7950b6c705743cbd0e0d9b5e2b3a75f5f33fef6c9cf9fc3068ffe10d0e099dffbe388d395e2d5b3a75f5f315e0d622ff094faf9cdf38006711a8cf0e19f0dee0f3bc8e8b9995c047c8daa98bcacd2cdd044872b56286fb6e7fb7186f617e0eb391767f6493d78a8f562833b165d43aa4e77cbdcbd2e2a32921315d695b3a7b9324b9758b001c66515bd0693b386710ffed9c0d9fb2af787dd178f335e434bb97ed8107710151c84be8a8de553a45ebb944b996bb0adb288268927d2c1c5917bac3a58bb474d36d38c542345f13ae60c2f55902cdbc55493cfd27d9a288a55e7824a20d17595a98b4e2a8429d0320fb1ac655c99ba78d55c7b5462ed1a941763bf871cec5e4aac59d318a1dc99347308d5c8c9705a8c61517ab72c1e9ca6a166e2ac63f0ca0327ce3efcf3e103",
"rawHeaders": [
"Date",
"Tue, 21 Apr 2026 14:36:40 GMT",
"Content-Type",
"application/json; charset=utf-8",
"Transfer-Encoding",
"chunked",
"Connection",
"keep-alive",
"content-security-policy",
"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests",
"cross-origin-opener-policy",
"same-origin",
"cross-origin-resource-policy",
"same-origin",
"origin-agent-cluster",
"?1",
"referrer-policy",
"no-referrer",
"strict-transport-security",
"max-age=15552000; includeSubDomains",
"x-content-type-options",
"nosniff",
"x-dns-prefetch-control",
"off",
"x-download-options",
"noopen",
"x-frame-options",
"SAMEORIGIN",
"x-permitted-cross-domain-policies",
"none",
"x-xss-protection",
"0",
"vary",
"Origin",
"Cache-Control",
"max-age=15",
"x-cache",
"MISS",
"cf-cache-status",
"DYNAMIC",
"set-cookie",
"__cf_bm=WZx0o5ppF4XUDD8BoSflBKg837pbgAbl8MREEbAIywM-1776782200.0930717-1.0.1.1-u78zZW.hsR3YIiTdZZbOzQoaTrWW..xf.d8IuLdFnDc0Z7r6fQeNDiUGK5FVmxoNcOQGGFNsh305Ch.6LTiCJ8d.kWREmWVtpvPeixvE7M.laOeqJgyN98jxbQz_jG5.; HttpOnly; Secure; Path=/; Domain=api.cx.metamask.io; Expires=Tue, 21 Apr 2026 15:06:40 GMT",
"Content-Encoding",
"br",
"Server",
"cloudflare",
"CF-RAY",
"9efd1f4e9de17750-LHR"
],
"responseIsBinary": true
}
]
Loading