kokio-sdk 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/.env.example +1 -0
  2. package/.github/workflows/npm_publish.yaml +19 -0
  3. package/LICENSE +21 -0
  4. package/package.json +45 -0
  5. package/src/abis/BeaconProxy.json +985 -0
  6. package/src/abis/DeviceWallet.json +907 -0
  7. package/src/abis/DeviceWalletFactory.json +739 -0
  8. package/src/abis/ESIMWallet.json +486 -0
  9. package/src/abis/ESIMWalletFactory.json +467 -0
  10. package/src/abis/LazyWalletRegistry.json +734 -0
  11. package/src/abis/P256Verifier.json +73 -0
  12. package/src/abis/Registry.json +811 -0
  13. package/src/abis/RegistryHelper.json +382 -0
  14. package/src/abis/index.ts +21 -0
  15. package/src/config.ts +46 -0
  16. package/src/interface/P256VerifierClass.ts +19 -0
  17. package/src/interface/constantsClass.ts +35 -0
  18. package/src/interface/deviceWalletClass.ts +62 -0
  19. package/src/interface/deviceWalletFactoryClass.ts +35 -0
  20. package/src/interface/eSIMWalletClass.ts +55 -0
  21. package/src/interface/eSIMWalletFactoryClass.ts +36 -0
  22. package/src/interface/lazyWalletRegistryClass.ts +34 -0
  23. package/src/interface/smartAccountClass.ts +26 -0
  24. package/src/interface/utilsClass.ts +21 -0
  25. package/src/logic/P256Verifier.ts +31 -0
  26. package/src/logic/account-kit/createSmartAccount.ts +282 -0
  27. package/src/logic/constants.ts +188 -0
  28. package/src/logic/deviceWallet.ts +175 -0
  29. package/src/logic/deviceWalletFactory.ts +70 -0
  30. package/src/logic/eSIMWallet.ts +149 -0
  31. package/src/logic/eSIMWalletFactory.ts +78 -0
  32. package/src/logic/lazyWalletRegistry.ts +98 -0
  33. package/src/logic/services/turnkeyClient.ts +80 -0
  34. package/src/logic/utils.ts +86 -0
  35. package/src/types.ts +38 -0
  36. package/tsconfig.json +114 -0
@@ -0,0 +1,985 @@
1
+ {
2
+ "abi": [
3
+ {
4
+ "type": "constructor",
5
+ "inputs": [
6
+ {
7
+ "name": "beacon",
8
+ "type": "address",
9
+ "internalType": "address"
10
+ },
11
+ {
12
+ "name": "data",
13
+ "type": "bytes",
14
+ "internalType": "bytes"
15
+ }
16
+ ],
17
+ "stateMutability": "payable"
18
+ },
19
+ {
20
+ "type": "fallback",
21
+ "stateMutability": "payable"
22
+ },
23
+ {
24
+ "type": "event",
25
+ "name": "BeaconUpgraded",
26
+ "inputs": [
27
+ {
28
+ "name": "beacon",
29
+ "type": "address",
30
+ "indexed": true,
31
+ "internalType": "address"
32
+ }
33
+ ],
34
+ "anonymous": false
35
+ },
36
+ {
37
+ "type": "error",
38
+ "name": "AddressEmptyCode",
39
+ "inputs": [
40
+ {
41
+ "name": "target",
42
+ "type": "address",
43
+ "internalType": "address"
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "type": "error",
49
+ "name": "ERC1967InvalidBeacon",
50
+ "inputs": [
51
+ {
52
+ "name": "beacon",
53
+ "type": "address",
54
+ "internalType": "address"
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "type": "error",
60
+ "name": "ERC1967InvalidImplementation",
61
+ "inputs": [
62
+ {
63
+ "name": "implementation",
64
+ "type": "address",
65
+ "internalType": "address"
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "type": "error",
71
+ "name": "ERC1967NonPayable",
72
+ "inputs": []
73
+ },
74
+ {
75
+ "type": "error",
76
+ "name": "FailedInnerCall",
77
+ "inputs": []
78
+ }
79
+ ],
80
+ "bytecode": {
81
+ "object": "0x60a060405260405161059d38038061059d83398101604081905261002291610354565b61002c828261003e565b506001600160a01b0316608052610445565b610047826100fb565b6040516001600160a01b038316907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e905f90a28051156100ef576100ea826001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100e49190610416565b82610209565b505050565b6100f761027c565b5050565b806001600160a01b03163b5f0361013557604051631933b43b60e21b81526001600160a01b03821660048201526024015b60405180910390fd5b807fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b0319166001600160a01b0392831617905560408051635c60da1b60e01b815290515f92841691635c60da1b9160048083019260209291908290030181865afa1580156101ae573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101d29190610416565b9050806001600160a01b03163b5f036100f757604051634c9c8ce360e01b81526001600160a01b038216600482015260240161012c565b60605f5f846001600160a01b031684604051610225919061042f565b5f60405180830381855af49150503d805f811461025d576040519150601f19603f3d011682016040523d82523d5f602084013e610262565b606091505b50909250905061027385838361029d565b95945050505050565b341561029b5760405163b398979f60e01b815260040160405180910390fd5b565b6060826102b2576102ad826102fc565b6102f5565b81511580156102c957506001600160a01b0384163b155b156102f257604051639996b31560e01b81526001600160a01b038516600482015260240161012c565b50805b9392505050565b80511561030c5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80516001600160a01b038116811461033b575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f5f60408385031215610365575f5ffd5b61036e83610325565b60208401519092506001600160401b03811115610389575f5ffd5b8301601f81018513610399575f5ffd5b80516001600160401b038111156103b2576103b2610340565b604051601f8201601f19908116603f011681016001600160401b03811182821017156103e0576103e0610340565b6040528181528282016020018710156103f7575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b5f60208284031215610426575f5ffd5b6102f582610325565b5f82518060208501845e5f920191825250919050565b60805161014161045c5f395f602301526101415ff3fe608060405261000c61000e565b005b61001e610019610020565b6100b3565b565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100ae91906100d1565b905090565b365f5f375f5f365f845af43d5f5f3e8080156100cd573d5ff35b3d5ffd5b5f602082840312156100e1575f5ffd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610104575f5ffd5b939250505056fea264697066735822122042a4e3e96063f44fc1027e9950bca7b427cf533f9a8572e112f033f41f19364764736f6c634300081c0033",
82
+ "sourceMap": "1115:1194:57:-:0;;;1772:147;;;;;;;;;;;;;;;;;;:::i;:::-;1837:49;1873:6;1881:4;1837:35;:49::i;:::-;-1:-1:-1;;;;;;1896:16:57;;;1115:1194;;6076:333:55;6165:21;6176:9;6165:10;:21::i;:::-;6201:25;;-1:-1:-1;;;;;6201:25:55;;;;;;;;6241:11;;:15;6237:166;;6272:71;6309:9;-1:-1:-1;;;;;6301:33:55;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6338:4;6272:28;:71::i;:::-;;6076:333;;:::o;6237:166::-;6374:18;:16;:18::i;:::-;6076:333;;:::o;5114:437::-;5175:9;-1:-1:-1;;;;;5175:21:55;;5200:1;5175:26;5171:95;;5224:31;;-1:-1:-1;;;5224:31:55;;-1:-1:-1;;;;;1729:32:91;;5224:31:55;;;1711:51:91;1684:18;;5224:31:55;;;;;;;;5171:95;5324:9;4781:66;5276:57;;-1:-1:-1;;;;;;5276:57:55;-1:-1:-1;;;;;5276:57:55;;;;;;5375:35;;;-1:-1:-1;;;5375:35:55;;;;-1:-1:-1;;5375:33:55;;;;;:35;;;;;;;;;;;;;;:33;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5344:66;;5424:20;-1:-1:-1;;;;;5424:32:55;;5460:1;5424:37;5420:125;;5484:50;;-1:-1:-1;;;5484:50:55;;-1:-1:-1;;;;;1729:32:91;;5484:50:55;;;1711:51:91;1684:18;;5484:50:55;1565:203:91;4106:253:62;4189:12;4214;4228:23;4255:6;-1:-1:-1;;;;;4255:19:62;4275:4;4255:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4213:67:62;;-1:-1:-1;4213:67:62;-1:-1:-1;4297:55:62;4324:6;4213:67;;4297:26;:55::i;:::-;4290:62;4106:253;-1:-1:-1;;;;;4106:253:62:o;6598:122:55:-;6648:9;:13;6644:70;;6684:19;;-1:-1:-1;;;6684:19:55;;;;;;;;;;;6644:70;6598:122::o;4625:582:62:-;4769:12;4798:7;4793:408;;4821:19;4829:10;4821:7;:19::i;:::-;4793:408;;;5045:17;;:22;:49;;;;-1:-1:-1;;;;;;5071:18:62;;;:23;5045:49;5041:119;;;5121:24;;-1:-1:-1;;;5121:24:62;;-1:-1:-1;;;;;1729:32:91;;5121:24:62;;;1711:51:91;1684:18;;5121:24:62;1565:203:91;5041:119:62;-1:-1:-1;5180:10:62;4793:408;4625:582;;;;;:::o;5743:516::-;5874:17;;:21;5870:383;;6102:10;6096:17;6158:15;6145:10;6141:2;6137:19;6130:44;5870:383;6225:17;;-1:-1:-1;;;6225:17:62;;;;;;;;;;;14:177:91;93:13;;-1:-1:-1;;;;;135:31:91;;125:42;;115:70;;181:1;178;171:12;115:70;14:177;;;:::o;196:127::-;257:10;252:3;248:20;245:1;238:31;288:4;285:1;278:15;312:4;309:1;302:15;328:1019;416:6;424;477:2;465:9;456:7;452:23;448:32;445:52;;;493:1;490;483:12;445:52;516:40;546:9;516:40;:::i;:::-;600:2;585:18;;579:25;506:50;;-1:-1:-1;;;;;;616:30:91;;613:50;;;659:1;656;649:12;613:50;682:22;;735:4;727:13;;723:27;-1:-1:-1;713:55:91;;764:1;761;754:12;713:55;791:9;;-1:-1:-1;;;;;812:30:91;;809:56;;;845:18;;:::i;:::-;894:2;888:9;986:2;948:17;;-1:-1:-1;;944:31:91;;;977:2;940:40;936:54;924:67;;-1:-1:-1;;;;;1006:34:91;;1042:22;;;1003:62;1000:88;;;1068:18;;:::i;:::-;1104:2;1097:22;1128;;;1169:15;;;1186:2;1165:24;1162:37;-1:-1:-1;1159:57:91;;;1212:1;1209;1202:12;1159:57;1261:6;1256:2;1252;1248:11;1243:2;1235:6;1231:15;1225:43;1314:1;1309:2;1300:6;1292;1288:19;1284:28;1277:39;1335:6;1325:16;;;;;328:1019;;;;;:::o;1352:208::-;1422:6;1475:2;1463:9;1454:7;1450:23;1446:32;1443:52;;;1491:1;1488;1481:12;1443:52;1514:40;1544:9;1514:40;:::i;1773:301::-;1902:3;1940:6;1934:13;1986:6;1979:4;1971:6;1967:17;1962:3;1956:37;2048:1;2012:16;;2037:13;;;-1:-1:-1;2012:16:91;1773:301;-1:-1:-1;1773:301:91:o;:::-;1115:1194:57;;;;;;;;;;;;",
83
+ "linkReferences": {}
84
+ },
85
+ "deployedBytecode": {
86
+ "object": "0x608060405261000c61000e565b005b61001e610019610020565b6100b3565b565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100ae91906100d1565b905090565b365f5f375f5f365f845af43d5f5f3e8080156100cd573d5ff35b3d5ffd5b5f602082840312156100e1575f5ffd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610104575f5ffd5b939250505056fea264697066735822122042a4e3e96063f44fc1027e9950bca7b427cf533f9a8572e112f033f41f19364764736f6c634300081c0033",
87
+ "sourceMap": "1115:1194:57:-:0;;;2649:11:56;:9;:11::i;:::-;1115:1194:57;2323:83:56;2371:28;2381:17;:15;:17::i;:::-;2371:9;:28::i;:::-;2323:83::o;2022:138:57:-;2089:7;2293;2115:36;;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2108:45;;2022:138;:::o;949:895:56:-;1287:14;1284:1;1281;1268:34;1501:1;1498;1482:14;1479:1;1463:14;1456:5;1443:60;1577:16;1574:1;1571;1556:38;1615:6;1682:66;;;;1797:16;1794:1;1787:27;1682:66;1717:16;1714:1;1707:27;14:313:91;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;185:9;179:16;235:42;228:5;224:54;217:5;214:65;204:93;;293:1;290;283:12;204:93;316:5;14:313;-1:-1:-1;;;14:313:91:o",
88
+ "linkReferences": {},
89
+ "immutableReferences": {
90
+ "56114": [
91
+ {
92
+ "start": 35,
93
+ "length": 32
94
+ }
95
+ ]
96
+ }
97
+ },
98
+ "methodIdentifiers": {},
99
+ "rawMetadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"ERC1967InvalidBeacon\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"ERC1967InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERC1967NonPayable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}. The beacon address can only be set once during construction, and cannot be changed afterwards. It is stored in an immutable variable to avoid unnecessary storage reads, and also in the beacon storage slot specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967] so that it can be accessed externally. CAUTION: Since the beacon address can never be changed, you must ensure that you either control the beacon, or trust the beacon to not upgrade the implementation maliciously. IMPORTANT: Do not use the implementation logic to modify the beacon storage slot. Doing so would leave the proxy in an inconsistent state where the beacon storage slot does not match the beacon address.\",\"errors\":{\"AddressEmptyCode(address)\":[{\"details\":\"There's no code at `target` (it is not a contract).\"}],\"ERC1967InvalidBeacon(address)\":[{\"details\":\"The `beacon` of the proxy is invalid.\"}],\"ERC1967InvalidImplementation(address)\":[{\"details\":\"The `implementation` of the proxy is invalid.\"}],\"ERC1967NonPayable()\":[{\"details\":\"An upgrade function sees `msg.value > 0` that may be lost.\"}],\"FailedInnerCall()\":[{\"details\":\"A call to an address target failed. The target may have reverted.\"}]},\"events\":{\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is changed.\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the proxy with `beacon`. If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor. Requirements: - `beacon` must be a contract with the interface {IBeacon}. - If `data` is empty, `msg.value` must be zero.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/beacon/BeaconProxy.sol\":\"BeaconProxy\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000000},\"remappings\":[\":@account-abstraction/=lib/account-abstraction/\",\":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/\",\":@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/\",\":FreshCryptoLib/=lib/FreshCryptoLib/solidity/src/\",\":account-abstraction/=lib/account-abstraction/contracts/\",\":ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":hardhat/=node_modules/hardhat/\",\":mocks/=test/utils/mocks/\",\":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/\",\":openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/\",\":p256-verifier/=lib/p256-verifier/src/\",\":solady/utils/=lib/solady/src/utils/\",\":solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/\"]},\"sources\":{\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol\":{\"keccak256\":\"0x06a78f9b3ee3e6d0eb4e4cd635ba49960bea34cac1db8c0a27c75f2319f1fd65\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://547d21aa17f4f3f1a1a7edf7167beff8dd9496a0348d5588f15cc8a4b29d052a\",\"dweb:/ipfs/QmT16JtRQSWNpLo9W23jr6CzaMuTAcQcjJJcdRd8HLJ6cE\"]},\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/Proxy.sol\":{\"keccak256\":\"0xc3f2ec76a3de8ed7a7007c46166f5550c72c7709e3fc7e8bb3111a7191cdedbd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e73efb4c2ca655882dc237c6b4f234a9bd36d97159d8fcaa837eb01171f726ac\",\"dweb:/ipfs/QmTNnnv7Gu5fs5G1ZMh7Fexp8N4XUs3XrNAngjcxgiss3e\"]},\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/beacon/BeaconProxy.sol\":{\"keccak256\":\"0x387ebdcb365b8e620f26645d2b34a161cd39eedfb0219e8baff55630c5ae113c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://744ea187c195e31cb9201e63ca291fca9e623747f54f0ba390b366a6213b8964\",\"dweb:/ipfs/Qmc547qfV4sz65DC9B4okx1HvgxwUzJR7zTfKKbTzL3UQT\"]},\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xc59a78b07b44b2cf2e8ab4175fca91e8eca1eee2df7357b8d2a8833e5ea1f64c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5aa4f07e65444784c29cd7bfcc2341b34381e4e5b5da9f0c5bd00d7f430e66fa\",\"dweb:/ipfs/QmWRMh4Q9DpaU9GvsiXmDdoNYMyyece9if7hnfLz7uqzWM\"]},\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245\",\"dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y\"]},\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c\",\"dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR\"]}},\"version\":1}",
100
+ "metadata": {
101
+ "compiler": {
102
+ "version": "0.8.28+commit.7893614a"
103
+ },
104
+ "language": "Solidity",
105
+ "output": {
106
+ "abi": [
107
+ {
108
+ "inputs": [
109
+ {
110
+ "internalType": "address",
111
+ "name": "beacon",
112
+ "type": "address"
113
+ },
114
+ {
115
+ "internalType": "bytes",
116
+ "name": "data",
117
+ "type": "bytes"
118
+ }
119
+ ],
120
+ "stateMutability": "payable",
121
+ "type": "constructor"
122
+ },
123
+ {
124
+ "inputs": [
125
+ {
126
+ "internalType": "address",
127
+ "name": "target",
128
+ "type": "address"
129
+ }
130
+ ],
131
+ "type": "error",
132
+ "name": "AddressEmptyCode"
133
+ },
134
+ {
135
+ "inputs": [
136
+ {
137
+ "internalType": "address",
138
+ "name": "beacon",
139
+ "type": "address"
140
+ }
141
+ ],
142
+ "type": "error",
143
+ "name": "ERC1967InvalidBeacon"
144
+ },
145
+ {
146
+ "inputs": [
147
+ {
148
+ "internalType": "address",
149
+ "name": "implementation",
150
+ "type": "address"
151
+ }
152
+ ],
153
+ "type": "error",
154
+ "name": "ERC1967InvalidImplementation"
155
+ },
156
+ {
157
+ "inputs": [],
158
+ "type": "error",
159
+ "name": "ERC1967NonPayable"
160
+ },
161
+ {
162
+ "inputs": [],
163
+ "type": "error",
164
+ "name": "FailedInnerCall"
165
+ },
166
+ {
167
+ "inputs": [
168
+ {
169
+ "internalType": "address",
170
+ "name": "beacon",
171
+ "type": "address",
172
+ "indexed": true
173
+ }
174
+ ],
175
+ "type": "event",
176
+ "name": "BeaconUpgraded",
177
+ "anonymous": false
178
+ },
179
+ {
180
+ "inputs": [],
181
+ "stateMutability": "payable",
182
+ "type": "fallback"
183
+ }
184
+ ],
185
+ "devdoc": {
186
+ "kind": "dev",
187
+ "methods": {
188
+ "constructor": {
189
+ "details": "Initializes the proxy with `beacon`. If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor. Requirements: - `beacon` must be a contract with the interface {IBeacon}. - If `data` is empty, `msg.value` must be zero."
190
+ }
191
+ },
192
+ "version": 1
193
+ },
194
+ "userdoc": {
195
+ "kind": "user",
196
+ "methods": {},
197
+ "version": 1
198
+ }
199
+ },
200
+ "settings": {
201
+ "remappings": [
202
+ "@account-abstraction/=lib/account-abstraction/",
203
+ "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
204
+ "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
205
+ "FreshCryptoLib/=lib/FreshCryptoLib/solidity/src/",
206
+ "account-abstraction/=lib/account-abstraction/contracts/",
207
+ "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
208
+ "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
209
+ "forge-std/=lib/forge-std/src/",
210
+ "hardhat/=node_modules/hardhat/",
211
+ "mocks/=test/utils/mocks/",
212
+ "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
213
+ "openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
214
+ "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",
215
+ "p256-verifier/=lib/p256-verifier/src/",
216
+ "solady/utils/=lib/solady/src/utils/",
217
+ "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/"
218
+ ],
219
+ "optimizer": {
220
+ "enabled": true,
221
+ "runs": 10000000
222
+ },
223
+ "metadata": {
224
+ "bytecodeHash": "ipfs"
225
+ },
226
+ "compilationTarget": {
227
+ "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/beacon/BeaconProxy.sol": "BeaconProxy"
228
+ },
229
+ "evmVersion": "cancun",
230
+ "libraries": {}
231
+ },
232
+ "sources": {
233
+ "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol": {
234
+ "keccak256": "0x06a78f9b3ee3e6d0eb4e4cd635ba49960bea34cac1db8c0a27c75f2319f1fd65",
235
+ "urls": [
236
+ "bzz-raw://547d21aa17f4f3f1a1a7edf7167beff8dd9496a0348d5588f15cc8a4b29d052a",
237
+ "dweb:/ipfs/QmT16JtRQSWNpLo9W23jr6CzaMuTAcQcjJJcdRd8HLJ6cE"
238
+ ],
239
+ "license": "MIT"
240
+ },
241
+ "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/Proxy.sol": {
242
+ "keccak256": "0xc3f2ec76a3de8ed7a7007c46166f5550c72c7709e3fc7e8bb3111a7191cdedbd",
243
+ "urls": [
244
+ "bzz-raw://e73efb4c2ca655882dc237c6b4f234a9bd36d97159d8fcaa837eb01171f726ac",
245
+ "dweb:/ipfs/QmTNnnv7Gu5fs5G1ZMh7Fexp8N4XUs3XrNAngjcxgiss3e"
246
+ ],
247
+ "license": "MIT"
248
+ },
249
+ "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/beacon/BeaconProxy.sol": {
250
+ "keccak256": "0x387ebdcb365b8e620f26645d2b34a161cd39eedfb0219e8baff55630c5ae113c",
251
+ "urls": [
252
+ "bzz-raw://744ea187c195e31cb9201e63ca291fca9e623747f54f0ba390b366a6213b8964",
253
+ "dweb:/ipfs/Qmc547qfV4sz65DC9B4okx1HvgxwUzJR7zTfKKbTzL3UQT"
254
+ ],
255
+ "license": "MIT"
256
+ },
257
+ "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol": {
258
+ "keccak256": "0xc59a78b07b44b2cf2e8ab4175fca91e8eca1eee2df7357b8d2a8833e5ea1f64c",
259
+ "urls": [
260
+ "bzz-raw://5aa4f07e65444784c29cd7bfcc2341b34381e4e5b5da9f0c5bd00d7f430e66fa",
261
+ "dweb:/ipfs/QmWRMh4Q9DpaU9GvsiXmDdoNYMyyece9if7hnfLz7uqzWM"
262
+ ],
263
+ "license": "MIT"
264
+ },
265
+ "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Address.sol": {
266
+ "keccak256": "0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721",
267
+ "urls": [
268
+ "bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245",
269
+ "dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y"
270
+ ],
271
+ "license": "MIT"
272
+ },
273
+ "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol": {
274
+ "keccak256": "0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418",
275
+ "urls": [
276
+ "bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c",
277
+ "dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR"
278
+ ],
279
+ "license": "MIT"
280
+ }
281
+ },
282
+ "version": 1
283
+ },
284
+ "storageLayout": {
285
+ "storage": [],
286
+ "types": {}
287
+ },
288
+ "ast": {
289
+ "absolutePath": "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/beacon/BeaconProxy.sol",
290
+ "id": 56160,
291
+ "exportedSymbols": {
292
+ "BeaconProxy": [
293
+ 56159
294
+ ],
295
+ "ERC1967Utils": [
296
+ 56065
297
+ ],
298
+ "IBeacon": [
299
+ 56169
300
+ ],
301
+ "Proxy": [
302
+ 56101
303
+ ]
304
+ },
305
+ "nodeType": "SourceUnit",
306
+ "src": "112:2198:57",
307
+ "nodes": [
308
+ {
309
+ "id": 56103,
310
+ "nodeType": "PragmaDirective",
311
+ "src": "112:24:57",
312
+ "nodes": [],
313
+ "literals": [
314
+ "solidity",
315
+ "^",
316
+ "0.8",
317
+ ".20"
318
+ ]
319
+ },
320
+ {
321
+ "id": 56105,
322
+ "nodeType": "ImportDirective",
323
+ "src": "138:38:57",
324
+ "nodes": [],
325
+ "absolutePath": "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol",
326
+ "file": "./IBeacon.sol",
327
+ "nameLocation": "-1:-1:-1",
328
+ "scope": 56160,
329
+ "sourceUnit": 56170,
330
+ "symbolAliases": [
331
+ {
332
+ "foreign": {
333
+ "id": 56104,
334
+ "name": "IBeacon",
335
+ "nodeType": "Identifier",
336
+ "overloadedDeclarations": [],
337
+ "referencedDeclaration": 56169,
338
+ "src": "146:7:57",
339
+ "typeDescriptions": {}
340
+ },
341
+ "nameLocation": "-1:-1:-1"
342
+ }
343
+ ],
344
+ "unitAlias": ""
345
+ },
346
+ {
347
+ "id": 56107,
348
+ "nodeType": "ImportDirective",
349
+ "src": "177:35:57",
350
+ "nodes": [],
351
+ "absolutePath": "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/Proxy.sol",
352
+ "file": "../Proxy.sol",
353
+ "nameLocation": "-1:-1:-1",
354
+ "scope": 56160,
355
+ "sourceUnit": 56102,
356
+ "symbolAliases": [
357
+ {
358
+ "foreign": {
359
+ "id": 56106,
360
+ "name": "Proxy",
361
+ "nodeType": "Identifier",
362
+ "overloadedDeclarations": [],
363
+ "referencedDeclaration": 56101,
364
+ "src": "185:5:57",
365
+ "typeDescriptions": {}
366
+ },
367
+ "nameLocation": "-1:-1:-1"
368
+ }
369
+ ],
370
+ "unitAlias": ""
371
+ },
372
+ {
373
+ "id": 56109,
374
+ "nodeType": "ImportDirective",
375
+ "src": "213:57:57",
376
+ "nodes": [],
377
+ "absolutePath": "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol",
378
+ "file": "../ERC1967/ERC1967Utils.sol",
379
+ "nameLocation": "-1:-1:-1",
380
+ "scope": 56160,
381
+ "sourceUnit": 56066,
382
+ "symbolAliases": [
383
+ {
384
+ "foreign": {
385
+ "id": 56108,
386
+ "name": "ERC1967Utils",
387
+ "nodeType": "Identifier",
388
+ "overloadedDeclarations": [],
389
+ "referencedDeclaration": 56065,
390
+ "src": "221:12:57",
391
+ "typeDescriptions": {}
392
+ },
393
+ "nameLocation": "-1:-1:-1"
394
+ }
395
+ ],
396
+ "unitAlias": ""
397
+ },
398
+ {
399
+ "id": 56159,
400
+ "nodeType": "ContractDefinition",
401
+ "src": "1115:1194:57",
402
+ "nodes": [
403
+ {
404
+ "id": 56114,
405
+ "nodeType": "VariableDeclaration",
406
+ "src": "1249:33:57",
407
+ "nodes": [],
408
+ "constant": false,
409
+ "mutability": "immutable",
410
+ "name": "_beacon",
411
+ "nameLocation": "1275:7:57",
412
+ "scope": 56159,
413
+ "stateVariable": true,
414
+ "storageLocation": "default",
415
+ "typeDescriptions": {
416
+ "typeIdentifier": "t_address",
417
+ "typeString": "address"
418
+ },
419
+ "typeName": {
420
+ "id": 56113,
421
+ "name": "address",
422
+ "nodeType": "ElementaryTypeName",
423
+ "src": "1249:7:57",
424
+ "stateMutability": "nonpayable",
425
+ "typeDescriptions": {
426
+ "typeIdentifier": "t_address",
427
+ "typeString": "address"
428
+ }
429
+ },
430
+ "visibility": "private"
431
+ },
432
+ {
433
+ "id": 56134,
434
+ "nodeType": "FunctionDefinition",
435
+ "src": "1772:147:57",
436
+ "nodes": [],
437
+ "body": {
438
+ "id": 56133,
439
+ "nodeType": "Block",
440
+ "src": "1827:92:57",
441
+ "nodes": [],
442
+ "statements": [
443
+ {
444
+ "expression": {
445
+ "arguments": [
446
+ {
447
+ "id": 56125,
448
+ "name": "beacon",
449
+ "nodeType": "Identifier",
450
+ "overloadedDeclarations": [],
451
+ "referencedDeclaration": 56117,
452
+ "src": "1873:6:57",
453
+ "typeDescriptions": {
454
+ "typeIdentifier": "t_address",
455
+ "typeString": "address"
456
+ }
457
+ },
458
+ {
459
+ "id": 56126,
460
+ "name": "data",
461
+ "nodeType": "Identifier",
462
+ "overloadedDeclarations": [],
463
+ "referencedDeclaration": 56119,
464
+ "src": "1881:4:57",
465
+ "typeDescriptions": {
466
+ "typeIdentifier": "t_bytes_memory_ptr",
467
+ "typeString": "bytes memory"
468
+ }
469
+ }
470
+ ],
471
+ "expression": {
472
+ "argumentTypes": [
473
+ {
474
+ "typeIdentifier": "t_address",
475
+ "typeString": "address"
476
+ },
477
+ {
478
+ "typeIdentifier": "t_bytes_memory_ptr",
479
+ "typeString": "bytes memory"
480
+ }
481
+ ],
482
+ "expression": {
483
+ "id": 56122,
484
+ "name": "ERC1967Utils",
485
+ "nodeType": "Identifier",
486
+ "overloadedDeclarations": [],
487
+ "referencedDeclaration": 56065,
488
+ "src": "1837:12:57",
489
+ "typeDescriptions": {
490
+ "typeIdentifier": "t_type$_t_contract$_ERC1967Utils_$56065_$",
491
+ "typeString": "type(library ERC1967Utils)"
492
+ }
493
+ },
494
+ "id": 56124,
495
+ "isConstant": false,
496
+ "isLValue": false,
497
+ "isPure": false,
498
+ "lValueRequested": false,
499
+ "memberLocation": "1850:22:57",
500
+ "memberName": "upgradeBeaconToAndCall",
501
+ "nodeType": "MemberAccess",
502
+ "referencedDeclaration": 56050,
503
+ "src": "1837:35:57",
504
+ "typeDescriptions": {
505
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$__$",
506
+ "typeString": "function (address,bytes memory)"
507
+ }
508
+ },
509
+ "id": 56127,
510
+ "isConstant": false,
511
+ "isLValue": false,
512
+ "isPure": false,
513
+ "kind": "functionCall",
514
+ "lValueRequested": false,
515
+ "nameLocations": [],
516
+ "names": [],
517
+ "nodeType": "FunctionCall",
518
+ "src": "1837:49:57",
519
+ "tryCall": false,
520
+ "typeDescriptions": {
521
+ "typeIdentifier": "t_tuple$__$",
522
+ "typeString": "tuple()"
523
+ }
524
+ },
525
+ "id": 56128,
526
+ "nodeType": "ExpressionStatement",
527
+ "src": "1837:49:57"
528
+ },
529
+ {
530
+ "expression": {
531
+ "id": 56131,
532
+ "isConstant": false,
533
+ "isLValue": false,
534
+ "isPure": false,
535
+ "lValueRequested": false,
536
+ "leftHandSide": {
537
+ "id": 56129,
538
+ "name": "_beacon",
539
+ "nodeType": "Identifier",
540
+ "overloadedDeclarations": [],
541
+ "referencedDeclaration": 56114,
542
+ "src": "1896:7:57",
543
+ "typeDescriptions": {
544
+ "typeIdentifier": "t_address",
545
+ "typeString": "address"
546
+ }
547
+ },
548
+ "nodeType": "Assignment",
549
+ "operator": "=",
550
+ "rightHandSide": {
551
+ "id": 56130,
552
+ "name": "beacon",
553
+ "nodeType": "Identifier",
554
+ "overloadedDeclarations": [],
555
+ "referencedDeclaration": 56117,
556
+ "src": "1906:6:57",
557
+ "typeDescriptions": {
558
+ "typeIdentifier": "t_address",
559
+ "typeString": "address"
560
+ }
561
+ },
562
+ "src": "1896:16:57",
563
+ "typeDescriptions": {
564
+ "typeIdentifier": "t_address",
565
+ "typeString": "address"
566
+ }
567
+ },
568
+ "id": 56132,
569
+ "nodeType": "ExpressionStatement",
570
+ "src": "1896:16:57"
571
+ }
572
+ ]
573
+ },
574
+ "documentation": {
575
+ "id": 56115,
576
+ "nodeType": "StructuredDocumentation",
577
+ "src": "1289:478:57",
578
+ "text": " @dev Initializes the proxy with `beacon`.\n If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This\n will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity\n constructor.\n Requirements:\n - `beacon` must be a contract with the interface {IBeacon}.\n - If `data` is empty, `msg.value` must be zero."
579
+ },
580
+ "implemented": true,
581
+ "kind": "constructor",
582
+ "modifiers": [],
583
+ "name": "",
584
+ "nameLocation": "-1:-1:-1",
585
+ "parameters": {
586
+ "id": 56120,
587
+ "nodeType": "ParameterList",
588
+ "parameters": [
589
+ {
590
+ "constant": false,
591
+ "id": 56117,
592
+ "mutability": "mutable",
593
+ "name": "beacon",
594
+ "nameLocation": "1792:6:57",
595
+ "nodeType": "VariableDeclaration",
596
+ "scope": 56134,
597
+ "src": "1784:14:57",
598
+ "stateVariable": false,
599
+ "storageLocation": "default",
600
+ "typeDescriptions": {
601
+ "typeIdentifier": "t_address",
602
+ "typeString": "address"
603
+ },
604
+ "typeName": {
605
+ "id": 56116,
606
+ "name": "address",
607
+ "nodeType": "ElementaryTypeName",
608
+ "src": "1784:7:57",
609
+ "stateMutability": "nonpayable",
610
+ "typeDescriptions": {
611
+ "typeIdentifier": "t_address",
612
+ "typeString": "address"
613
+ }
614
+ },
615
+ "visibility": "internal"
616
+ },
617
+ {
618
+ "constant": false,
619
+ "id": 56119,
620
+ "mutability": "mutable",
621
+ "name": "data",
622
+ "nameLocation": "1813:4:57",
623
+ "nodeType": "VariableDeclaration",
624
+ "scope": 56134,
625
+ "src": "1800:17:57",
626
+ "stateVariable": false,
627
+ "storageLocation": "memory",
628
+ "typeDescriptions": {
629
+ "typeIdentifier": "t_bytes_memory_ptr",
630
+ "typeString": "bytes"
631
+ },
632
+ "typeName": {
633
+ "id": 56118,
634
+ "name": "bytes",
635
+ "nodeType": "ElementaryTypeName",
636
+ "src": "1800:5:57",
637
+ "typeDescriptions": {
638
+ "typeIdentifier": "t_bytes_storage_ptr",
639
+ "typeString": "bytes"
640
+ }
641
+ },
642
+ "visibility": "internal"
643
+ }
644
+ ],
645
+ "src": "1783:35:57"
646
+ },
647
+ "returnParameters": {
648
+ "id": 56121,
649
+ "nodeType": "ParameterList",
650
+ "parameters": [],
651
+ "src": "1827:0:57"
652
+ },
653
+ "scope": 56159,
654
+ "stateMutability": "payable",
655
+ "virtual": false,
656
+ "visibility": "public"
657
+ },
658
+ {
659
+ "id": 56149,
660
+ "nodeType": "FunctionDefinition",
661
+ "src": "2022:138:57",
662
+ "nodes": [],
663
+ "body": {
664
+ "id": 56148,
665
+ "nodeType": "Block",
666
+ "src": "2098:62:57",
667
+ "nodes": [],
668
+ "statements": [
669
+ {
670
+ "expression": {
671
+ "arguments": [],
672
+ "expression": {
673
+ "argumentTypes": [],
674
+ "expression": {
675
+ "arguments": [
676
+ {
677
+ "arguments": [],
678
+ "expression": {
679
+ "argumentTypes": [],
680
+ "id": 56142,
681
+ "name": "_getBeacon",
682
+ "nodeType": "Identifier",
683
+ "overloadedDeclarations": [],
684
+ "referencedDeclaration": 56158,
685
+ "src": "2123:10:57",
686
+ "typeDescriptions": {
687
+ "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
688
+ "typeString": "function () view returns (address)"
689
+ }
690
+ },
691
+ "id": 56143,
692
+ "isConstant": false,
693
+ "isLValue": false,
694
+ "isPure": false,
695
+ "kind": "functionCall",
696
+ "lValueRequested": false,
697
+ "nameLocations": [],
698
+ "names": [],
699
+ "nodeType": "FunctionCall",
700
+ "src": "2123:12:57",
701
+ "tryCall": false,
702
+ "typeDescriptions": {
703
+ "typeIdentifier": "t_address",
704
+ "typeString": "address"
705
+ }
706
+ }
707
+ ],
708
+ "expression": {
709
+ "argumentTypes": [
710
+ {
711
+ "typeIdentifier": "t_address",
712
+ "typeString": "address"
713
+ }
714
+ ],
715
+ "id": 56141,
716
+ "name": "IBeacon",
717
+ "nodeType": "Identifier",
718
+ "overloadedDeclarations": [],
719
+ "referencedDeclaration": 56169,
720
+ "src": "2115:7:57",
721
+ "typeDescriptions": {
722
+ "typeIdentifier": "t_type$_t_contract$_IBeacon_$56169_$",
723
+ "typeString": "type(contract IBeacon)"
724
+ }
725
+ },
726
+ "id": 56144,
727
+ "isConstant": false,
728
+ "isLValue": false,
729
+ "isPure": false,
730
+ "kind": "typeConversion",
731
+ "lValueRequested": false,
732
+ "nameLocations": [],
733
+ "names": [],
734
+ "nodeType": "FunctionCall",
735
+ "src": "2115:21:57",
736
+ "tryCall": false,
737
+ "typeDescriptions": {
738
+ "typeIdentifier": "t_contract$_IBeacon_$56169",
739
+ "typeString": "contract IBeacon"
740
+ }
741
+ },
742
+ "id": 56145,
743
+ "isConstant": false,
744
+ "isLValue": false,
745
+ "isPure": false,
746
+ "lValueRequested": false,
747
+ "memberLocation": "2137:14:57",
748
+ "memberName": "implementation",
749
+ "nodeType": "MemberAccess",
750
+ "referencedDeclaration": 56168,
751
+ "src": "2115:36:57",
752
+ "typeDescriptions": {
753
+ "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
754
+ "typeString": "function () view external returns (address)"
755
+ }
756
+ },
757
+ "id": 56146,
758
+ "isConstant": false,
759
+ "isLValue": false,
760
+ "isPure": false,
761
+ "kind": "functionCall",
762
+ "lValueRequested": false,
763
+ "nameLocations": [],
764
+ "names": [],
765
+ "nodeType": "FunctionCall",
766
+ "src": "2115:38:57",
767
+ "tryCall": false,
768
+ "typeDescriptions": {
769
+ "typeIdentifier": "t_address",
770
+ "typeString": "address"
771
+ }
772
+ },
773
+ "functionReturnParameters": 56140,
774
+ "id": 56147,
775
+ "nodeType": "Return",
776
+ "src": "2108:45:57"
777
+ }
778
+ ]
779
+ },
780
+ "baseFunctions": [
781
+ 56082
782
+ ],
783
+ "documentation": {
784
+ "id": 56135,
785
+ "nodeType": "StructuredDocumentation",
786
+ "src": "1925:92:57",
787
+ "text": " @dev Returns the current implementation address of the associated beacon."
788
+ },
789
+ "implemented": true,
790
+ "kind": "function",
791
+ "modifiers": [],
792
+ "name": "_implementation",
793
+ "nameLocation": "2031:15:57",
794
+ "overrides": {
795
+ "id": 56137,
796
+ "nodeType": "OverrideSpecifier",
797
+ "overrides": [],
798
+ "src": "2071:8:57"
799
+ },
800
+ "parameters": {
801
+ "id": 56136,
802
+ "nodeType": "ParameterList",
803
+ "parameters": [],
804
+ "src": "2046:2:57"
805
+ },
806
+ "returnParameters": {
807
+ "id": 56140,
808
+ "nodeType": "ParameterList",
809
+ "parameters": [
810
+ {
811
+ "constant": false,
812
+ "id": 56139,
813
+ "mutability": "mutable",
814
+ "name": "",
815
+ "nameLocation": "-1:-1:-1",
816
+ "nodeType": "VariableDeclaration",
817
+ "scope": 56149,
818
+ "src": "2089:7:57",
819
+ "stateVariable": false,
820
+ "storageLocation": "default",
821
+ "typeDescriptions": {
822
+ "typeIdentifier": "t_address",
823
+ "typeString": "address"
824
+ },
825
+ "typeName": {
826
+ "id": 56138,
827
+ "name": "address",
828
+ "nodeType": "ElementaryTypeName",
829
+ "src": "2089:7:57",
830
+ "stateMutability": "nonpayable",
831
+ "typeDescriptions": {
832
+ "typeIdentifier": "t_address",
833
+ "typeString": "address"
834
+ }
835
+ },
836
+ "visibility": "internal"
837
+ }
838
+ ],
839
+ "src": "2088:9:57"
840
+ },
841
+ "scope": 56159,
842
+ "stateMutability": "view",
843
+ "virtual": true,
844
+ "visibility": "internal"
845
+ },
846
+ {
847
+ "id": 56158,
848
+ "nodeType": "FunctionDefinition",
849
+ "src": "2214:93:57",
850
+ "nodes": [],
851
+ "body": {
852
+ "id": 56157,
853
+ "nodeType": "Block",
854
+ "src": "2276:31:57",
855
+ "nodes": [],
856
+ "statements": [
857
+ {
858
+ "expression": {
859
+ "id": 56155,
860
+ "name": "_beacon",
861
+ "nodeType": "Identifier",
862
+ "overloadedDeclarations": [],
863
+ "referencedDeclaration": 56114,
864
+ "src": "2293:7:57",
865
+ "typeDescriptions": {
866
+ "typeIdentifier": "t_address",
867
+ "typeString": "address"
868
+ }
869
+ },
870
+ "functionReturnParameters": 56154,
871
+ "id": 56156,
872
+ "nodeType": "Return",
873
+ "src": "2286:14:57"
874
+ }
875
+ ]
876
+ },
877
+ "documentation": {
878
+ "id": 56150,
879
+ "nodeType": "StructuredDocumentation",
880
+ "src": "2166:43:57",
881
+ "text": " @dev Returns the beacon."
882
+ },
883
+ "implemented": true,
884
+ "kind": "function",
885
+ "modifiers": [],
886
+ "name": "_getBeacon",
887
+ "nameLocation": "2223:10:57",
888
+ "parameters": {
889
+ "id": 56151,
890
+ "nodeType": "ParameterList",
891
+ "parameters": [],
892
+ "src": "2233:2:57"
893
+ },
894
+ "returnParameters": {
895
+ "id": 56154,
896
+ "nodeType": "ParameterList",
897
+ "parameters": [
898
+ {
899
+ "constant": false,
900
+ "id": 56153,
901
+ "mutability": "mutable",
902
+ "name": "",
903
+ "nameLocation": "-1:-1:-1",
904
+ "nodeType": "VariableDeclaration",
905
+ "scope": 56158,
906
+ "src": "2267:7:57",
907
+ "stateVariable": false,
908
+ "storageLocation": "default",
909
+ "typeDescriptions": {
910
+ "typeIdentifier": "t_address",
911
+ "typeString": "address"
912
+ },
913
+ "typeName": {
914
+ "id": 56152,
915
+ "name": "address",
916
+ "nodeType": "ElementaryTypeName",
917
+ "src": "2267:7:57",
918
+ "stateMutability": "nonpayable",
919
+ "typeDescriptions": {
920
+ "typeIdentifier": "t_address",
921
+ "typeString": "address"
922
+ }
923
+ },
924
+ "visibility": "internal"
925
+ }
926
+ ],
927
+ "src": "2266:9:57"
928
+ },
929
+ "scope": 56159,
930
+ "stateMutability": "view",
931
+ "virtual": true,
932
+ "visibility": "internal"
933
+ }
934
+ ],
935
+ "abstract": false,
936
+ "baseContracts": [
937
+ {
938
+ "baseName": {
939
+ "id": 56111,
940
+ "name": "Proxy",
941
+ "nameLocations": [
942
+ "1139:5:57"
943
+ ],
944
+ "nodeType": "IdentifierPath",
945
+ "referencedDeclaration": 56101,
946
+ "src": "1139:5:57"
947
+ },
948
+ "id": 56112,
949
+ "nodeType": "InheritanceSpecifier",
950
+ "src": "1139:5:57"
951
+ }
952
+ ],
953
+ "canonicalName": "BeaconProxy",
954
+ "contractDependencies": [],
955
+ "contractKind": "contract",
956
+ "documentation": {
957
+ "id": 56110,
958
+ "nodeType": "StructuredDocumentation",
959
+ "src": "272:842:57",
960
+ "text": " @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.\n The beacon address can only be set once during construction, and cannot be changed afterwards. It is stored in an\n immutable variable to avoid unnecessary storage reads, and also in the beacon storage slot specified by\n https://eips.ethereum.org/EIPS/eip-1967[EIP1967] so that it can be accessed externally.\n CAUTION: Since the beacon address can never be changed, you must ensure that you either control the beacon, or trust\n the beacon to not upgrade the implementation maliciously.\n IMPORTANT: Do not use the implementation logic to modify the beacon storage slot. Doing so would leave the proxy in\n an inconsistent state where the beacon storage slot does not match the beacon address."
961
+ },
962
+ "fullyImplemented": true,
963
+ "linearizedBaseContracts": [
964
+ 56159,
965
+ 56101
966
+ ],
967
+ "name": "BeaconProxy",
968
+ "nameLocation": "1124:11:57",
969
+ "scope": 56160,
970
+ "usedErrors": [
971
+ 55797,
972
+ 55807,
973
+ 55810,
974
+ 56330,
975
+ 56333
976
+ ],
977
+ "usedEvents": [
978
+ 55788
979
+ ]
980
+ }
981
+ ],
982
+ "license": "MIT"
983
+ },
984
+ "id": 57
985
+ }