Skip to content

Commit 4ea5fed

Browse files
committed
feat: arm
- update abis with final deployed versions
1 parent ce18b21 commit 4ea5fed

File tree

8 files changed

+181
-69
lines changed

8 files changed

+181
-69
lines changed

abi/origin-lido-arm-zapper.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
[
2+
{
3+
"inputs": [
4+
{ "internalType": "address", "name": "_weth", "type": "address" },
5+
{ "internalType": "address", "name": "_lidoArm", "type": "address" }
6+
],
7+
"stateMutability": "nonpayable",
8+
"type": "constructor"
9+
},
10+
{
11+
"anonymous": false,
12+
"inputs": [
13+
{ "indexed": false, "internalType": "address", "name": "previousAdmin", "type": "address" },
14+
{ "indexed": false, "internalType": "address", "name": "newAdmin", "type": "address" }
15+
],
16+
"name": "AdminChanged",
17+
"type": "event"
18+
},
19+
{
20+
"anonymous": false,
21+
"inputs": [
22+
{ "indexed": true, "internalType": "address", "name": "sender", "type": "address" },
23+
{ "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" },
24+
{ "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" }
25+
],
26+
"name": "Zap",
27+
"type": "event"
28+
},
29+
{
30+
"inputs": [],
31+
"name": "deposit",
32+
"outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }],
33+
"stateMutability": "payable",
34+
"type": "function"
35+
},
36+
{
37+
"inputs": [],
38+
"name": "lidoArm",
39+
"outputs": [{ "internalType": "contract ILiquidityProviderARM", "name": "", "type": "address" }],
40+
"stateMutability": "view",
41+
"type": "function"
42+
},
43+
{
44+
"inputs": [],
45+
"name": "owner",
46+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
47+
"stateMutability": "view",
48+
"type": "function"
49+
},
50+
{
51+
"inputs": [
52+
{ "internalType": "address", "name": "token", "type": "address" },
53+
{ "internalType": "uint256", "name": "amount", "type": "uint256" }
54+
],
55+
"name": "rescueERC20",
56+
"outputs": [],
57+
"stateMutability": "nonpayable",
58+
"type": "function"
59+
},
60+
{
61+
"inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
62+
"name": "setOwner",
63+
"outputs": [],
64+
"stateMutability": "nonpayable",
65+
"type": "function"
66+
},
67+
{
68+
"inputs": [],
69+
"name": "weth",
70+
"outputs": [{ "internalType": "contract IWETH", "name": "", "type": "address" }],
71+
"stateMutability": "view",
72+
"type": "function"
73+
},
74+
{ "stateMutability": "payable", "type": "receive" }
75+
]

abi/origin-lido-arm.json

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@
100100
"name": "CapManagerUpdated",
101101
"type": "event"
102102
},
103+
{
104+
"anonymous": false,
105+
"inputs": [{ "indexed": false, "internalType": "uint256[]", "name": "requestIds", "type": "uint256[]" }],
106+
"name": "ClaimLidoWithdrawals",
107+
"type": "event"
108+
},
103109
{
104110
"anonymous": false,
105111
"inputs": [{ "indexed": false, "internalType": "uint256", "name": "crossPrice", "type": "uint256" }],
@@ -171,6 +177,15 @@
171177
"name": "RedeemRequested",
172178
"type": "event"
173179
},
180+
{
181+
"anonymous": false,
182+
"inputs": [
183+
{ "indexed": false, "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" },
184+
{ "indexed": false, "internalType": "uint256[]", "name": "requestIds", "type": "uint256[]" }
185+
],
186+
"name": "RequestLidoWithdrawals",
187+
"type": "event"
188+
},
174189
{
175190
"anonymous": false,
176191
"inputs": [
@@ -190,12 +205,6 @@
190205
"name": "Transfer",
191206
"type": "event"
192207
},
193-
{
194-
"anonymous": false,
195-
"inputs": [{ "indexed": true, "internalType": "address", "name": "zap", "type": "address" }],
196-
"name": "ZapUpdated",
197-
"type": "event"
198-
},
199208
{
200209
"inputs": [],
201210
"name": "FEE_SCALE",
@@ -324,7 +333,7 @@
324333
{
325334
"inputs": [
326335
{ "internalType": "uint256", "name": "assets", "type": "uint256" },
327-
{ "internalType": "address", "name": "liquidityProvider", "type": "address" }
336+
{ "internalType": "address", "name": "receiver", "type": "address" }
328337
],
329338
"name": "deposit",
330339
"outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }],
@@ -380,6 +389,13 @@
380389
"stateMutability": "view",
381390
"type": "function"
382391
},
392+
{
393+
"inputs": [],
394+
"name": "lidoWithdrawalQueue",
395+
"outputs": [{ "internalType": "contract IStETHWithdrawal", "name": "", "type": "address" }],
396+
"stateMutability": "view",
397+
"type": "function"
398+
},
383399
{
384400
"inputs": [],
385401
"name": "lidoWithdrawalQueueAmount",
@@ -404,7 +420,7 @@
404420
{
405421
"inputs": [],
406422
"name": "nextWithdrawalIndex",
407-
"outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }],
423+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
408424
"stateMutability": "view",
409425
"type": "function"
410426
},
@@ -505,13 +521,6 @@
505521
"stateMutability": "nonpayable",
506522
"type": "function"
507523
},
508-
{
509-
"inputs": [{ "internalType": "address", "name": "_zap", "type": "address" }],
510-
"name": "setZap",
511-
"outputs": [],
512-
"stateMutability": "nonpayable",
513-
"type": "function"
514-
},
515524
{
516525
"inputs": [],
517526
"name": "steth",
@@ -648,44 +657,30 @@
648657
"stateMutability": "view",
649658
"type": "function"
650659
},
651-
{
652-
"inputs": [],
653-
"name": "withdrawalQueue",
654-
"outputs": [{ "internalType": "contract IStETHWithdrawal", "name": "", "type": "address" }],
655-
"stateMutability": "view",
656-
"type": "function"
657-
},
658660
{
659661
"inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }],
660662
"name": "withdrawalRequests",
661663
"outputs": [
662664
{ "internalType": "address", "name": "withdrawer", "type": "address" },
663665
{ "internalType": "bool", "name": "claimed", "type": "bool" },
664666
{ "internalType": "uint40", "name": "claimTimestamp", "type": "uint40" },
665-
{ "internalType": "uint120", "name": "assets", "type": "uint120" },
666-
{ "internalType": "uint120", "name": "queued", "type": "uint120" }
667+
{ "internalType": "uint128", "name": "assets", "type": "uint128" },
668+
{ "internalType": "uint128", "name": "queued", "type": "uint128" }
667669
],
668670
"stateMutability": "view",
669671
"type": "function"
670672
},
671673
{
672674
"inputs": [],
673675
"name": "withdrawsClaimed",
674-
"outputs": [{ "internalType": "uint120", "name": "", "type": "uint120" }],
676+
"outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }],
675677
"stateMutability": "view",
676678
"type": "function"
677679
},
678680
{
679681
"inputs": [],
680682
"name": "withdrawsQueued",
681-
"outputs": [{ "internalType": "uint120", "name": "", "type": "uint120" }],
682-
"stateMutability": "view",
683-
"type": "function"
684-
},
685-
{
686-
"inputs": [],
687-
"name": "zap",
688-
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
683+
"outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }],
689684
"stateMutability": "view",
690685
"type": "function"
691686
},

src/abi/origin-lido-arm-zapper.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import * as p from '@subsquid/evm-codec'
2+
import { event, fun, viewFun, indexed, ContractBase } from '@subsquid/evm-abi'
3+
import type { EventParams as EParams, FunctionArguments, FunctionReturn } from '@subsquid/evm-abi'
4+
5+
export const events = {
6+
AdminChanged: event("0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f", "AdminChanged(address,address)", {"previousAdmin": p.address, "newAdmin": p.address}),
7+
Zap: event("0x4a5e9c74490922edc73617d3f521bffd83682ac8c6d5bfe58d1386853c483dff", "Zap(address,uint256,uint256)", {"sender": indexed(p.address), "assets": p.uint256, "shares": p.uint256}),
8+
}
9+
10+
export const functions = {
11+
deposit: fun("0xd0e30db0", "deposit()", {}, p.uint256),
12+
lidoArm: viewFun("0x0569dcad", "lidoArm()", {}, p.address),
13+
owner: viewFun("0x8da5cb5b", "owner()", {}, p.address),
14+
rescueERC20: fun("0x8cd4426d", "rescueERC20(address,uint256)", {"token": p.address, "amount": p.uint256}, ),
15+
setOwner: fun("0x13af4035", "setOwner(address)", {"newOwner": p.address}, ),
16+
weth: viewFun("0x3fc8cef3", "weth()", {}, p.address),
17+
}
18+
19+
export class Contract extends ContractBase {
20+
21+
lidoArm() {
22+
return this.eth_call(functions.lidoArm, {})
23+
}
24+
25+
owner() {
26+
return this.eth_call(functions.owner, {})
27+
}
28+
29+
weth() {
30+
return this.eth_call(functions.weth, {})
31+
}
32+
}
33+
34+
/// Event types
35+
export type AdminChangedEventArgs = EParams<typeof events.AdminChanged>
36+
export type ZapEventArgs = EParams<typeof events.Zap>
37+
38+
/// Function types
39+
export type DepositParams = FunctionArguments<typeof functions.deposit>
40+
export type DepositReturn = FunctionReturn<typeof functions.deposit>
41+
42+
export type LidoArmParams = FunctionArguments<typeof functions.lidoArm>
43+
export type LidoArmReturn = FunctionReturn<typeof functions.lidoArm>
44+
45+
export type OwnerParams = FunctionArguments<typeof functions.owner>
46+
export type OwnerReturn = FunctionReturn<typeof functions.owner>
47+
48+
export type RescueERC20Params = FunctionArguments<typeof functions.rescueERC20>
49+
export type RescueERC20Return = FunctionReturn<typeof functions.rescueERC20>
50+
51+
export type SetOwnerParams = FunctionArguments<typeof functions.setOwner>
52+
export type SetOwnerReturn = FunctionReturn<typeof functions.setOwner>
53+
54+
export type WethParams = FunctionArguments<typeof functions.weth>
55+
export type WethReturn = FunctionReturn<typeof functions.weth>
56+

0 commit comments

Comments
 (0)