Skip to content

Commit 90d70d1

Browse files
authored
Merge pull request #1 from pimlicolabs/PIM-1591
Pim 1591
2 parents 5efe942 + 7b4db94 commit 90d70d1

File tree

78 files changed

+21199
-685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+21199
-685
lines changed

abi/MagicSpendStakeManager.abi.json

+72-72
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,14 @@
117117
"internalType": "uint48"
118118
},
119119
{
120-
"name": "operator",
121-
"type": "address",
122-
"internalType": "address"
120+
"name": "version",
121+
"type": "uint32",
122+
"internalType": "uint32"
123+
},
124+
{
125+
"name": "metadata",
126+
"type": "bytes",
127+
"internalType": "bytes"
123128
}
124129
]
125130
},
@@ -129,37 +134,23 @@
129134
"internalType": "bytes"
130135
},
131136
{
132-
"name": "assetId",
133-
"type": "uint8",
134-
"internalType": "uint8"
137+
"name": "assetIds",
138+
"type": "uint8[]",
139+
"internalType": "uint8[]"
135140
},
136141
{
137-
"name": "amount",
138-
"type": "uint128",
139-
"internalType": "uint128"
140-
}
141-
],
142-
"outputs": [],
143-
"stateMutability": "nonpayable"
144-
},
145-
{
146-
"type": "function",
147-
"name": "claimed",
148-
"inputs": [
142+
"name": "amounts",
143+
"type": "uint128[]",
144+
"internalType": "uint128[]"
145+
},
149146
{
150-
"name": "token",
147+
"name": "treasury",
151148
"type": "address",
152149
"internalType": "address"
153150
}
154151
],
155-
"outputs": [
156-
{
157-
"name": "",
158-
"type": "uint128",
159-
"internalType": "uint128"
160-
}
161-
],
162-
"stateMutability": "view"
152+
"outputs": [],
153+
"stateMutability": "nonpayable"
163154
},
164155
{
165156
"type": "function",
@@ -256,9 +247,14 @@
256247
"internalType": "uint48"
257248
},
258249
{
259-
"name": "operator",
260-
"type": "address",
261-
"internalType": "address"
250+
"name": "version",
251+
"type": "uint32",
252+
"internalType": "uint32"
253+
},
254+
{
255+
"name": "metadata",
256+
"type": "bytes",
257+
"internalType": "bytes"
262258
}
263259
]
264260
}
@@ -367,6 +363,19 @@
367363
"outputs": [],
368364
"stateMutability": "nonpayable"
369365
},
366+
{
367+
"type": "function",
368+
"name": "lockStake",
369+
"inputs": [
370+
{
371+
"name": "token",
372+
"type": "address",
373+
"internalType": "address"
374+
}
375+
],
376+
"outputs": [],
377+
"stateMutability": "nonpayable"
378+
},
370379
{
371380
"type": "function",
372381
"name": "owner",
@@ -406,19 +415,6 @@
406415
],
407416
"stateMutability": "view"
408417
},
409-
{
410-
"type": "function",
411-
"name": "skim",
412-
"inputs": [
413-
{
414-
"name": "token",
415-
"type": "address",
416-
"internalType": "address"
417-
}
418-
],
419-
"outputs": [],
420-
"stateMutability": "nonpayable"
421-
},
422418
{
423419
"type": "function",
424420
"name": "stakeOf",
@@ -489,7 +485,7 @@
489485
},
490486
{
491487
"type": "event",
492-
"name": "AllowanceClaimed",
488+
"name": "AssetClaimed",
493489
"inputs": [
494490
{
495491
"name": "hash_",
@@ -498,16 +494,10 @@
498494
"internalType": "bytes32"
499495
},
500496
{
501-
"name": "account",
502-
"type": "address",
503-
"indexed": true,
504-
"internalType": "address"
505-
},
506-
{
507-
"name": "token",
508-
"type": "address",
497+
"name": "assetId",
498+
"type": "uint8",
509499
"indexed": true,
510-
"internalType": "address"
500+
"internalType": "uint8"
511501
},
512502
{
513503
"name": "amount",
@@ -524,25 +514,6 @@
524514
"inputs": [],
525515
"anonymous": false
526516
},
527-
{
528-
"type": "event",
529-
"name": "FeeSkimmed",
530-
"inputs": [
531-
{
532-
"name": "token",
533-
"type": "address",
534-
"indexed": true,
535-
"internalType": "address"
536-
},
537-
{
538-
"name": "amount",
539-
"type": "uint256",
540-
"indexed": false,
541-
"internalType": "uint256"
542-
}
543-
],
544-
"anonymous": false
545-
},
546517
{
547518
"type": "event",
548519
"name": "Initialized",
@@ -631,6 +602,25 @@
631602
],
632603
"anonymous": false
633604
},
605+
{
606+
"type": "event",
607+
"name": "StakeReLocked",
608+
"inputs": [
609+
{
610+
"name": "account",
611+
"type": "address",
612+
"indexed": true,
613+
"internalType": "address"
614+
},
615+
{
616+
"name": "token",
617+
"type": "address",
618+
"indexed": true,
619+
"internalType": "address"
620+
}
621+
],
622+
"anonymous": false
623+
},
634624
{
635625
"type": "event",
636626
"name": "StakeUnlocked",
@@ -721,6 +711,11 @@
721711
"name": "InvalidAssetAllowanceId",
722712
"inputs": []
723713
},
714+
{
715+
"type": "error",
716+
"name": "InvalidAssetIds",
717+
"inputs": []
718+
},
724719
{
725720
"type": "error",
726721
"name": "InvalidInitialization",
@@ -768,6 +763,11 @@
768763
"name": "SignatureInvalid",
769764
"inputs": []
770765
},
766+
{
767+
"type": "error",
768+
"name": "StakeAlreadyLocked",
769+
"inputs": []
770+
},
771771
{
772772
"type": "error",
773773
"name": "StakeAlreadyUnlocked",

abi/MagicSpendWithdrawalManager.abi.json

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
[
2+
{
3+
"type": "receive",
4+
"stateMutability": "payable"
5+
},
26
{
37
"type": "function",
48
"name": "addLiquidity",

broadcast/MagicSpend.s.sol/1/run-1734375620.json

+58
Large diffs are not rendered by default.

broadcast/MagicSpend.s.sol/1/run-1736097591.json

+175
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0xb13f3b420ac6488e085d0412b521d26ffb3e9584a65c858756bd7efbe0b9647d",
5+
"transactionType": "CALL",
6+
"contractName": null,
7+
"contractAddress": "0x0526f93a854c6f5cfeb9fbbfc70d32fc4f46f182",
8+
"function": "addLiquidity(address,uint128)",
9+
"arguments": [
10+
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
11+
"30000000000000000"
12+
],
13+
"transaction": {
14+
"from": "0xe1f21fe3332f1e42c46d398ff5e4f4941602051e",
15+
"to": "0x0526f93a854c6f5cfeb9fbbfc70d32fc4f46f182",
16+
"gas": "0x12e56",
17+
"value": "0x6a94d74f430000",
18+
"input": "0xdbd7ede0000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000006a94d74f430000",
19+
"nonce": "0x2",
20+
"chainId": "0x1"
21+
},
22+
"additionalContracts": [],
23+
"isFixedGasLimit": false
24+
}
25+
],
26+
"receipts": [
27+
{
28+
"status": "0x1",
29+
"cumulativeGasUsed": "0x878445",
30+
"logs": [
31+
{
32+
"address": "0x0526f93a854c6f5cfeb9fbbfc70d32fc4f46f182",
33+
"topics": [
34+
"0xeb6f59288405a42e371d6ea5d2876f36687865f4505aaa7e58aee1bf4d094418"
35+
],
36+
"data": "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000006a94d74f430000",
37+
"blockHash": "0x888ba8a5bff344fa9257d3abcc34a0f7f05c63a1b0b8317028de1a5bb96a859f",
38+
"blockNumber": "0x148f9c4",
39+
"transactionHash": "0xb13f3b420ac6488e085d0412b521d26ffb3e9584a65c858756bd7efbe0b9647d",
40+
"transactionIndex": "0x69",
41+
"logIndex": "0x117",
42+
"removed": false
43+
}
44+
],
45+
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000080000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000020000000010000000000000000000",
46+
"type": "0x2",
47+
"transactionHash": "0xb13f3b420ac6488e085d0412b521d26ffb3e9584a65c858756bd7efbe0b9647d",
48+
"transactionIndex": "0x69",
49+
"blockHash": "0x888ba8a5bff344fa9257d3abcc34a0f7f05c63a1b0b8317028de1a5bb96a859f",
50+
"blockNumber": "0x148f9c4",
51+
"gasUsed": "0xceba",
52+
"effectiveGasPrice": "0x28264b833",
53+
"from": "0xe1f21fe3332f1e42c46d398ff5e4f4941602051e",
54+
"to": "0x0526f93a854c6f5cfeb9fbbfc70d32fc4f46f182",
55+
"contractAddress": null
56+
}
57+
],
58+
"libraries": [],
59+
"pending": [],
60+
"returns": {},
61+
"timestamp": 1736097842,
62+
"chain": 1,
63+
"commit": "5efe942"
64+
}

broadcast/MagicSpend.s.sol/1/run-1740352172.json

+430
Large diffs are not rendered by default.

broadcast/MagicSpend.s.sol/1/run-1740650105.json

+430
Large diffs are not rendered by default.

broadcast/MagicSpend.s.sol/1/run-latest.json

+430
Large diffs are not rendered by default.

broadcast/MagicSpend.s.sol/10/run-1734375505.json

+61
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0x9b1ad5724a6003be61a24d707fe5715457653a7f80a767e2ed2c70c0b5c1c8c9",
5+
"transactionType": "CALL",
6+
"contractName": null,
7+
"contractAddress": "0x0526f93a854c6f5cfeb9fbbfc70d32fc4f46f182",
8+
"function": "addLiquidity(address,uint128)",
9+
"arguments": [
10+
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
11+
"50000000000000000"
12+
],
13+
"transaction": {
14+
"from": "0xe1f21fe3332f1e42c46d398ff5e4f4941602051e",
15+
"to": "0x0526f93a854c6f5cfeb9fbbfc70d32fc4f46f182",
16+
"gas": "0x12e56",
17+
"value": "0xb1a2bc2ec50000",
18+
"input": "0xdbd7ede0000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000b1a2bc2ec50000",
19+
"nonce": "0x2",
20+
"chainId": "0xa"
21+
},
22+
"additionalContracts": [],
23+
"isFixedGasLimit": false
24+
}
25+
],
26+
"receipts": [
27+
{
28+
"status": "0x1",
29+
"cumulativeGasUsed": "0xa1dd8d",
30+
"logs": [
31+
{
32+
"address": "0x0526f93a854c6f5cfeb9fbbfc70d32fc4f46f182",
33+
"topics": [
34+
"0xeb6f59288405a42e371d6ea5d2876f36687865f4505aaa7e58aee1bf4d094418"
35+
],
36+
"data": "0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000b1a2bc2ec50000",
37+
"blockHash": "0x2034177298bcdf5980e8bb549c1ad59f9c8c21a49d166202092cdc019eb7c4bd",
38+
"blockNumber": "0x7b64ffc",
39+
"transactionHash": "0x9b1ad5724a6003be61a24d707fe5715457653a7f80a767e2ed2c70c0b5c1c8c9",
40+
"transactionIndex": "0x27",
41+
"logIndex": "0x8c",
42+
"removed": false
43+
}
44+
],
45+
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000080000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000020000000010000000000000000000",
46+
"type": "0x2",
47+
"transactionHash": "0x9b1ad5724a6003be61a24d707fe5715457653a7f80a767e2ed2c70c0b5c1c8c9",
48+
"transactionIndex": "0x27",
49+
"blockHash": "0x2034177298bcdf5980e8bb549c1ad59f9c8c21a49d166202092cdc019eb7c4bd",
50+
"blockNumber": "0x7b64ffc",
51+
"gasUsed": "0xceba",
52+
"effectiveGasPrice": "0xa8f3b",
53+
"from": "0xe1f21fe3332f1e42c46d398ff5e4f4941602051e",
54+
"to": "0x0526f93a854c6f5cfeb9fbbfc70d32fc4f46f182",
55+
"contractAddress": null,
56+
"l1BaseFeeScalar": "0x146b",
57+
"l1BlobBaseFee": "0x4d137e31b",
58+
"l1BlobBaseFeeScalar": "0xf79c5",
59+
"l1Fee": "0x2320637c457",
60+
"l1GasPrice": "0x8c8601eed",
61+
"l1GasUsed": "0x640"
62+
}
63+
],
64+
"libraries": [],
65+
"pending": [],
66+
"returns": {},
67+
"timestamp": 1734375858,
68+
"chain": 10,
69+
"commit": "5efe942"
70+
}

broadcast/MagicSpend.s.sol/10/run-1740596340.json

+466
Large diffs are not rendered by default.

broadcast/MagicSpend.s.sol/10/run-1740650172.json

+466
Large diffs are not rendered by default.

broadcast/MagicSpend.s.sol/10/run-latest.json

+466
Large diffs are not rendered by default.

broadcast/MagicSpend.s.sol/100/run-1740659717.json

+424
Large diffs are not rendered by default.

broadcast/MagicSpend.s.sol/100/run-latest.json

+424
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)