@aqb-foundation/aqb-agent 0.0.0-stage → 1.0.0
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.
- package/LICENSE +21 -0
- package/README.md +77 -2
- package/WHITEPAPER.md +80 -0
- package/artifacts/AgentQuantumCredit.json +730 -0
- package/artifacts/AgentRegistry.json +246 -0
- package/artifacts/GenesisSale.json +226 -0
- package/artifacts/IAQB.json +111 -0
- package/artifacts/IERC20.json +78 -0
- package/artifacts/IPQAccount.json +19 -0
- package/artifacts/IPQVerifier.json +40 -0
- package/artifacts/IUSD.json +59 -0
- package/artifacts/MLDSAVerifier.json +123 -0
- package/artifacts/MockUSDC.json +144 -0
- package/artifacts/MockVerifier.json +40 -0
- package/artifacts/PQSmartAccount.json +249 -0
- package/client/aqb.mjs +149 -0
- package/docs/CARD.md +36 -0
- package/docs/LAUNCH.md +40 -0
- package/docs/MARKETING.md +55 -0
- package/docs/SPEC.md +49 -0
- package/docs/pq-note.md +6 -0
- package/docs/x402.md +31 -0
- package/mcp/server.mjs +60 -0
- package/package.json +47 -3
- package/pq/pq.mjs +59 -0
- package/registry/README.md +16 -0
- package/registry/agent-coin.json +86 -0
- package/registry/llms.txt +1 -0
- package/registry/logo.svg +8 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"file": "contracts/interfaces/IPQVerifier.sol",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "bytes32",
|
|
8
|
+
"name": "keyHash",
|
|
9
|
+
"type": "bytes32"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"internalType": "bytes",
|
|
13
|
+
"name": "pubKey",
|
|
14
|
+
"type": "bytes"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"internalType": "bytes32",
|
|
18
|
+
"name": "digest",
|
|
19
|
+
"type": "bytes32"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"internalType": "bytes",
|
|
23
|
+
"name": "sig",
|
|
24
|
+
"type": "bytes"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"name": "verify",
|
|
28
|
+
"outputs": [
|
|
29
|
+
{
|
|
30
|
+
"internalType": "bool",
|
|
31
|
+
"name": "",
|
|
32
|
+
"type": "bool"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"stateMutability": "view",
|
|
36
|
+
"type": "function"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"bytecode": "0x"
|
|
40
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"file": "contracts/GenesisSale.sol",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "address",
|
|
8
|
+
"name": "to",
|
|
9
|
+
"type": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"internalType": "uint256",
|
|
13
|
+
"name": "amount",
|
|
14
|
+
"type": "uint256"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"name": "transfer",
|
|
18
|
+
"outputs": [
|
|
19
|
+
{
|
|
20
|
+
"internalType": "bool",
|
|
21
|
+
"name": "",
|
|
22
|
+
"type": "bool"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"stateMutability": "nonpayable",
|
|
26
|
+
"type": "function"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"inputs": [
|
|
30
|
+
{
|
|
31
|
+
"internalType": "address",
|
|
32
|
+
"name": "from",
|
|
33
|
+
"type": "address"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"internalType": "address",
|
|
37
|
+
"name": "to",
|
|
38
|
+
"type": "address"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"internalType": "uint256",
|
|
42
|
+
"name": "amount",
|
|
43
|
+
"type": "uint256"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"name": "transferFrom",
|
|
47
|
+
"outputs": [
|
|
48
|
+
{
|
|
49
|
+
"internalType": "bool",
|
|
50
|
+
"name": "",
|
|
51
|
+
"type": "bool"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"stateMutability": "nonpayable",
|
|
55
|
+
"type": "function"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"bytecode": "0x"
|
|
59
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"file": "contracts/MLDSAVerifier.sol",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"stateMutability": "nonpayable",
|
|
7
|
+
"type": "constructor"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"inputs": [],
|
|
11
|
+
"name": "MLDSA65_PK_LEN",
|
|
12
|
+
"outputs": [
|
|
13
|
+
{
|
|
14
|
+
"internalType": "uint256",
|
|
15
|
+
"name": "",
|
|
16
|
+
"type": "uint256"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"stateMutability": "view",
|
|
20
|
+
"type": "function"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"inputs": [],
|
|
24
|
+
"name": "MLDSA65_SIG_LEN",
|
|
25
|
+
"outputs": [
|
|
26
|
+
{
|
|
27
|
+
"internalType": "uint256",
|
|
28
|
+
"name": "",
|
|
29
|
+
"type": "uint256"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"stateMutability": "view",
|
|
33
|
+
"type": "function"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"inputs": [],
|
|
37
|
+
"name": "PQ_PRECOMPILE",
|
|
38
|
+
"outputs": [
|
|
39
|
+
{
|
|
40
|
+
"internalType": "address",
|
|
41
|
+
"name": "",
|
|
42
|
+
"type": "address"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"stateMutability": "view",
|
|
46
|
+
"type": "function"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"inputs": [],
|
|
50
|
+
"name": "admin",
|
|
51
|
+
"outputs": [
|
|
52
|
+
{
|
|
53
|
+
"internalType": "address",
|
|
54
|
+
"name": "",
|
|
55
|
+
"type": "address"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"stateMutability": "view",
|
|
59
|
+
"type": "function"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"inputs": [],
|
|
63
|
+
"name": "fallbackLib",
|
|
64
|
+
"outputs": [
|
|
65
|
+
{
|
|
66
|
+
"internalType": "address",
|
|
67
|
+
"name": "",
|
|
68
|
+
"type": "address"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"stateMutability": "view",
|
|
72
|
+
"type": "function"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"inputs": [
|
|
76
|
+
{
|
|
77
|
+
"internalType": "address",
|
|
78
|
+
"name": "lib",
|
|
79
|
+
"type": "address"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"name": "setFallbackLib",
|
|
83
|
+
"outputs": [],
|
|
84
|
+
"stateMutability": "nonpayable",
|
|
85
|
+
"type": "function"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"inputs": [
|
|
89
|
+
{
|
|
90
|
+
"internalType": "bytes32",
|
|
91
|
+
"name": "keyHash",
|
|
92
|
+
"type": "bytes32"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"internalType": "bytes",
|
|
96
|
+
"name": "pubKey",
|
|
97
|
+
"type": "bytes"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"internalType": "bytes32",
|
|
101
|
+
"name": "digest",
|
|
102
|
+
"type": "bytes32"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"internalType": "bytes",
|
|
106
|
+
"name": "sig",
|
|
107
|
+
"type": "bytes"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"name": "verify",
|
|
111
|
+
"outputs": [
|
|
112
|
+
{
|
|
113
|
+
"internalType": "bool",
|
|
114
|
+
"name": "",
|
|
115
|
+
"type": "bool"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"stateMutability": "view",
|
|
119
|
+
"type": "function"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"bytecode": "0x60a060405234801561000f575f80fd5b50336080526080516105856100335f395f8181610111015261013e01526105855ff3fe608060405234801561000f575f80fd5b5060043610610079575f3560e01c80636751a33a116100585780636751a33a146100cc578063e1e2bd9e146100e1578063e8e2b62d146100e9578063f851a4401461010c575f80fd5b8062b41e0a1461007d57806354b98527146100ac57806356261a18146100c3575b5f80fd5b5f5461008f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100b5610ced81565b6040519081526020016100a3565b6100b56107a081565b6100df6100da3660046103ae565b610133565b005b61008f60aa81565b6100fc6100f7366004610420565b6101bc565b60405190151581526020016100a3565b61008f7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461019b5760405162461bcd60e51b81526020600482015260096024820152682727aa2fa0a226a4a760b91b604482015260640160405180910390fd5b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b5f8686866040516101ce92919061049d565b6040518091039020146101e257505f6103a4565b6107a085146101f257505f6103a4565b610ced821461020257505f6103a4565b5f8060aa6001600160a01b031688888888886040516020016102289594939291906104d4565b60408051601f19818403018152908290526102429161050c565b5f60405180830381855afa9150503d805f811461027a576040519150601f19603f3d011682016040523d82523d5f602084013e61027f565b606091505b5091509150818015610292575080516020145b156102b757808060200190518101906102ab9190610538565b600114925050506103a4565b5f546001600160a01b03161561039e575f805460405182916001600160a01b0316906102ef908c908c908c908c908c906024016104d4565b60408051601f198184030181529181526020820180516001600160e01b0316631cfe26db60e21b17905251610324919061050c565b5f60405180830381855afa9150503d805f811461035c576040519150601f19603f3d011682016040523d82523d5f602084013e610361565b606091505b5091509150818015610374575080516020145b801561039357508080602001905181019061038f9190610538565b6001145b9450505050506103a4565b5f925050505b9695505050505050565b5f602082840312156103be575f80fd5b81356001600160a01b03811681146103d4575f80fd5b9392505050565b5f8083601f8401126103eb575f80fd5b50813567ffffffffffffffff811115610402575f80fd5b602083019150836020828501011115610419575f80fd5b9250929050565b5f805f805f8060808789031215610435575f80fd5b86359550602087013567ffffffffffffffff80821115610453575f80fd5b61045f8a838b016103db565b909750955060408901359450606089013591508082111561047e575f80fd5b5061048b89828a016103db565b979a9699509497509295939492505050565b818382375f9101908152919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b606081525f6104e76060830187896104ac565b85602084015282810360408401526105008185876104ac565b98975050505050505050565b5f82515f5b8181101561052b5760208186018101518583015201610511565b505f920191825250919050565b5f60208284031215610548575f80fd5b505191905056fea2646970667358221220c2204bd1c40a8efff54061d3cf2fa94dcdb5b57ac19896a3975eec4ba57d461464736f6c63430008180033"
|
|
123
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
{
|
|
2
|
+
"file": "contracts/mocks/MockUSDC.sol",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "address",
|
|
8
|
+
"name": "",
|
|
9
|
+
"type": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"internalType": "address",
|
|
13
|
+
"name": "",
|
|
14
|
+
"type": "address"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"name": "allowance",
|
|
18
|
+
"outputs": [
|
|
19
|
+
{
|
|
20
|
+
"internalType": "uint256",
|
|
21
|
+
"name": "",
|
|
22
|
+
"type": "uint256"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"stateMutability": "view",
|
|
26
|
+
"type": "function"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"inputs": [
|
|
30
|
+
{
|
|
31
|
+
"internalType": "address",
|
|
32
|
+
"name": "s",
|
|
33
|
+
"type": "address"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"internalType": "uint256",
|
|
37
|
+
"name": "a",
|
|
38
|
+
"type": "uint256"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"name": "approve",
|
|
42
|
+
"outputs": [
|
|
43
|
+
{
|
|
44
|
+
"internalType": "bool",
|
|
45
|
+
"name": "",
|
|
46
|
+
"type": "bool"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"stateMutability": "nonpayable",
|
|
50
|
+
"type": "function"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"inputs": [
|
|
54
|
+
{
|
|
55
|
+
"internalType": "address",
|
|
56
|
+
"name": "",
|
|
57
|
+
"type": "address"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"name": "balanceOf",
|
|
61
|
+
"outputs": [
|
|
62
|
+
{
|
|
63
|
+
"internalType": "uint256",
|
|
64
|
+
"name": "",
|
|
65
|
+
"type": "uint256"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"stateMutability": "view",
|
|
69
|
+
"type": "function"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"inputs": [
|
|
73
|
+
{
|
|
74
|
+
"internalType": "address",
|
|
75
|
+
"name": "to",
|
|
76
|
+
"type": "address"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"internalType": "uint256",
|
|
80
|
+
"name": "a",
|
|
81
|
+
"type": "uint256"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"name": "mint",
|
|
85
|
+
"outputs": [],
|
|
86
|
+
"stateMutability": "nonpayable",
|
|
87
|
+
"type": "function"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"inputs": [
|
|
91
|
+
{
|
|
92
|
+
"internalType": "address",
|
|
93
|
+
"name": "to",
|
|
94
|
+
"type": "address"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"internalType": "uint256",
|
|
98
|
+
"name": "a",
|
|
99
|
+
"type": "uint256"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"name": "transfer",
|
|
103
|
+
"outputs": [
|
|
104
|
+
{
|
|
105
|
+
"internalType": "bool",
|
|
106
|
+
"name": "",
|
|
107
|
+
"type": "bool"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"stateMutability": "nonpayable",
|
|
111
|
+
"type": "function"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"inputs": [
|
|
115
|
+
{
|
|
116
|
+
"internalType": "address",
|
|
117
|
+
"name": "f",
|
|
118
|
+
"type": "address"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"internalType": "address",
|
|
122
|
+
"name": "to",
|
|
123
|
+
"type": "address"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"internalType": "uint256",
|
|
127
|
+
"name": "a",
|
|
128
|
+
"type": "uint256"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"name": "transferFrom",
|
|
132
|
+
"outputs": [
|
|
133
|
+
{
|
|
134
|
+
"internalType": "bool",
|
|
135
|
+
"name": "",
|
|
136
|
+
"type": "bool"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"stateMutability": "nonpayable",
|
|
140
|
+
"type": "function"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"bytecode": "0x608060405234801561000f575f80fd5b506103ad8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610060575f3560e01c8063095ea7b31461006457806323b872dd1461008c57806340c10f191461009f57806370a08231146100b4578063a9059cbb146100e1578063dd62ed3e146100f4575b5f80fd5b61007761007236600461028b565b61011e565b60405190151581526020015b60405180910390f35b61007761009a3660046102b3565b61014b565b6100b26100ad36600461028b565b6101e6565b005b6100d36100c23660046102ec565b5f6020819052908152604090205481565b604051908152602001610083565b6100776100ef36600461028b565b610216565b6100d361010236600461030c565b600160209081525f928352604080842090915290825290205481565b335f9081526001602081815260408084206001600160a01b03871685529091529091208290555b92915050565b6001600160a01b0383165f90815260016020908152604080832033845290915281208054839190839061017f908490610351565b90915550506001600160a01b0384165f90815260208190526040812080548492906101ab908490610351565b90915550506001600160a01b0383165f90815260208190526040812080548492906101d7908490610364565b90915550600195945050505050565b6001600160a01b0382165f908152602081905260408120805483929061020d908490610364565b90915550505050565b335f90815260208190526040812080548391908390610236908490610351565b90915550506001600160a01b0383165f9081526020819052604081208054849290610262908490610364565b909155506001949350505050565b80356001600160a01b0381168114610286575f80fd5b919050565b5f806040838503121561029c575f80fd5b6102a583610270565b946020939093013593505050565b5f805f606084860312156102c5575f80fd5b6102ce84610270565b92506102dc60208501610270565b9150604084013590509250925092565b5f602082840312156102fc575f80fd5b61030582610270565b9392505050565b5f806040838503121561031d575f80fd5b61032683610270565b915061033460208401610270565b90509250929050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156101455761014561033d565b808201808211156101455761014561033d56fea26469706673582212208d55dff3f8fc73eaea759146fc3d0eaa9a6ddfb46f3bff93f0580fb21f711e9964736f6c63430008180033"
|
|
144
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"file": "contracts/mocks/MockVerifier.sol",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "bytes32",
|
|
8
|
+
"name": "keyHash",
|
|
9
|
+
"type": "bytes32"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"internalType": "bytes",
|
|
13
|
+
"name": "pubKey",
|
|
14
|
+
"type": "bytes"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"internalType": "bytes32",
|
|
18
|
+
"name": "",
|
|
19
|
+
"type": "bytes32"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"internalType": "bytes",
|
|
23
|
+
"name": "sig",
|
|
24
|
+
"type": "bytes"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"name": "verify",
|
|
28
|
+
"outputs": [
|
|
29
|
+
{
|
|
30
|
+
"internalType": "bool",
|
|
31
|
+
"name": "",
|
|
32
|
+
"type": "bool"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"stateMutability": "pure",
|
|
36
|
+
"type": "function"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"bytecode": "0x608060405234801561000f575f80fd5b5061018e8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063e8e2b62d1461002d575b5f80fd5b61004061003b3660046100cc565b610054565b604051901515815260200160405180910390f35b5f868686604051610066929190610149565b604051809103902014801561007c5750610ced82145b979650505050505050565b5f8083601f840112610097575f80fd5b50813567ffffffffffffffff8111156100ae575f80fd5b6020830191508360208285010111156100c5575f80fd5b9250929050565b5f805f805f80608087890312156100e1575f80fd5b86359550602087013567ffffffffffffffff808211156100ff575f80fd5b61010b8a838b01610087565b909750955060408901359450606089013591508082111561012a575f80fd5b5061013789828a01610087565b979a9699509497509295939492505050565b818382375f910190815291905056fea2646970667358221220a97b85db4770a148313c1975870397e7794dc955112166c5c3b37fdb813136c064736f6c63430008180033"
|
|
40
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
{
|
|
2
|
+
"file": "contracts/PQSmartAccount.sol",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "contract IPQVerifier",
|
|
8
|
+
"name": "_verifier",
|
|
9
|
+
"type": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"internalType": "address",
|
|
13
|
+
"name": "_ecdsaFallback",
|
|
14
|
+
"type": "address"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"internalType": "bytes",
|
|
18
|
+
"name": "_pqPubKey",
|
|
19
|
+
"type": "bytes"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"stateMutability": "nonpayable",
|
|
23
|
+
"type": "constructor"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"inputs": [],
|
|
27
|
+
"name": "BadScheme",
|
|
28
|
+
"type": "error"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"inputs": [],
|
|
32
|
+
"name": "BadSig",
|
|
33
|
+
"type": "error"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"inputs": [
|
|
37
|
+
{
|
|
38
|
+
"internalType": "bytes",
|
|
39
|
+
"name": "ret",
|
|
40
|
+
"type": "bytes"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"name": "CallFailed",
|
|
44
|
+
"type": "error"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"anonymous": false,
|
|
48
|
+
"inputs": [
|
|
49
|
+
{
|
|
50
|
+
"indexed": true,
|
|
51
|
+
"internalType": "address",
|
|
52
|
+
"name": "target",
|
|
53
|
+
"type": "address"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"indexed": false,
|
|
57
|
+
"internalType": "uint256",
|
|
58
|
+
"name": "value",
|
|
59
|
+
"type": "uint256"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"indexed": false,
|
|
63
|
+
"internalType": "bytes32",
|
|
64
|
+
"name": "dataHash",
|
|
65
|
+
"type": "bytes32"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"name": "Executed",
|
|
69
|
+
"type": "event"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"anonymous": false,
|
|
73
|
+
"inputs": [
|
|
74
|
+
{
|
|
75
|
+
"indexed": false,
|
|
76
|
+
"internalType": "address",
|
|
77
|
+
"name": "ecdsaFallback",
|
|
78
|
+
"type": "address"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"name": "FallbackRotated",
|
|
82
|
+
"type": "event"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"anonymous": false,
|
|
86
|
+
"inputs": [
|
|
87
|
+
{
|
|
88
|
+
"indexed": false,
|
|
89
|
+
"internalType": "bytes32",
|
|
90
|
+
"name": "pqKeyHash",
|
|
91
|
+
"type": "bytes32"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"name": "KeyRotated",
|
|
95
|
+
"type": "event"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"inputs": [
|
|
99
|
+
{
|
|
100
|
+
"internalType": "address",
|
|
101
|
+
"name": "target",
|
|
102
|
+
"type": "address"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"internalType": "uint256",
|
|
106
|
+
"name": "value",
|
|
107
|
+
"type": "uint256"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"internalType": "bytes",
|
|
111
|
+
"name": "data",
|
|
112
|
+
"type": "bytes"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"internalType": "uint256",
|
|
116
|
+
"name": "_nonce",
|
|
117
|
+
"type": "uint256"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"name": "digest",
|
|
121
|
+
"outputs": [
|
|
122
|
+
{
|
|
123
|
+
"internalType": "bytes32",
|
|
124
|
+
"name": "",
|
|
125
|
+
"type": "bytes32"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"stateMutability": "view",
|
|
129
|
+
"type": "function"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"inputs": [],
|
|
133
|
+
"name": "ecdsaFallback",
|
|
134
|
+
"outputs": [
|
|
135
|
+
{
|
|
136
|
+
"internalType": "address",
|
|
137
|
+
"name": "",
|
|
138
|
+
"type": "address"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"stateMutability": "view",
|
|
142
|
+
"type": "function"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"inputs": [
|
|
146
|
+
{
|
|
147
|
+
"internalType": "address",
|
|
148
|
+
"name": "target",
|
|
149
|
+
"type": "address"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"internalType": "uint256",
|
|
153
|
+
"name": "value",
|
|
154
|
+
"type": "uint256"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"internalType": "bytes",
|
|
158
|
+
"name": "data",
|
|
159
|
+
"type": "bytes"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"internalType": "bytes",
|
|
163
|
+
"name": "sig",
|
|
164
|
+
"type": "bytes"
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
"name": "execute",
|
|
168
|
+
"outputs": [
|
|
169
|
+
{
|
|
170
|
+
"internalType": "bytes",
|
|
171
|
+
"name": "ret",
|
|
172
|
+
"type": "bytes"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"stateMutability": "nonpayable",
|
|
176
|
+
"type": "function"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"inputs": [],
|
|
180
|
+
"name": "nonce",
|
|
181
|
+
"outputs": [
|
|
182
|
+
{
|
|
183
|
+
"internalType": "uint256",
|
|
184
|
+
"name": "",
|
|
185
|
+
"type": "uint256"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"stateMutability": "view",
|
|
189
|
+
"type": "function"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"inputs": [],
|
|
193
|
+
"name": "pqKeyHash",
|
|
194
|
+
"outputs": [
|
|
195
|
+
{
|
|
196
|
+
"internalType": "bytes32",
|
|
197
|
+
"name": "",
|
|
198
|
+
"type": "bytes32"
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"stateMutability": "view",
|
|
202
|
+
"type": "function"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"inputs": [],
|
|
206
|
+
"name": "pqPubKey",
|
|
207
|
+
"outputs": [
|
|
208
|
+
{
|
|
209
|
+
"internalType": "bytes",
|
|
210
|
+
"name": "",
|
|
211
|
+
"type": "bytes"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"stateMutability": "view",
|
|
215
|
+
"type": "function"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"inputs": [
|
|
219
|
+
{
|
|
220
|
+
"internalType": "bytes",
|
|
221
|
+
"name": "newPubKey",
|
|
222
|
+
"type": "bytes"
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
"name": "rotatePQKey",
|
|
226
|
+
"outputs": [],
|
|
227
|
+
"stateMutability": "nonpayable",
|
|
228
|
+
"type": "function"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"inputs": [],
|
|
232
|
+
"name": "verifier",
|
|
233
|
+
"outputs": [
|
|
234
|
+
{
|
|
235
|
+
"internalType": "contract IPQVerifier",
|
|
236
|
+
"name": "",
|
|
237
|
+
"type": "address"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"stateMutability": "view",
|
|
241
|
+
"type": "function"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"stateMutability": "payable",
|
|
245
|
+
"type": "receive"
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
"bytecode": "0x60c060405234801562000010575f80fd5b5060405162000ef738038062000ef78339810160408190526200003391620000d0565b6001600160a01b03808416608052821660a052600162000054828262000252565b50805160208201205f8190556040517f4a10a1a941faa81ccc864a40602d5b8182fc9a3a2537f87f8e6f49ef3ba1a25391620000939190815260200190565b60405180910390a15050506200031e565b6001600160a01b0381168114620000b9575f80fd5b50565b634e487b7160e01b5f52604160045260245ffd5b5f805f60608486031215620000e3575f80fd5b8351620000f081620000a4565b809350506020808501516200010581620000a4565b60408601519093506001600160401b038082111562000122575f80fd5b818701915087601f83011262000136575f80fd5b8151818111156200014b576200014b620000bc565b604051601f8201601f19908116603f01168101908382118183101715620001765762000176620000bc565b816040528281528a868487010111156200018e575f80fd5b5f93505b82841015620001b1578484018601518185018701529285019262000192565b5f8684830101528096505050505050509250925092565b600181811c90821680620001dd57607f821691505b602082108103620001fc57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200024d57805f5260205f20601f840160051c81016020851015620002295750805b601f840160051c820191505b818110156200024a575f815560010162000235565b50505b505050565b81516001600160401b038111156200026e576200026e620000bc565b62000286816200027f8454620001c8565b8462000202565b602080601f831160018114620002bc575f8415620002a45750858301515b5f19600386901b1c1916600185901b17855562000316565b5f85815260208120601f198616915b82811015620002ec57888601518255948401946001909101908401620002cb565b50858210156200030a57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b60805160a051610baa6200034d5f395f818160b8015261042201525f818161012901526104bf0152610baa5ff3fe60806040526004361061007b575f3560e01c80639246f5a41161004c5780639246f5a41461014b578063affed0e014610178578063da0980c71461018d578063e10e6a89146101ac575f80fd5b806238082d1461008657806318af93a0146100a75780631908377b146100f75780632b7ac3f314610118575f80fd5b3661008257005b5f80fd5b348015610091575f80fd5b506100a56100a036600461068d565b6101c0565b005b3480156100b2575f80fd5b506100da7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610102575f80fd5b5061010b610255565b6040516100ee9190610738565b348015610123575f80fd5b506100da7f000000000000000000000000000000000000000000000000000000000000000081565b348015610156575f80fd5b5061016a6101653660046107e4565b6102e1565b6040519081526020016100ee565b348015610183575f80fd5b5061016a60025481565b348015610198575f80fd5b5061010b6101a7366004610841565b61035b565b3480156101b7575f80fd5b5061016a5f5481565b3330146102005760405162461bcd60e51b815260206004820152600960248201526853454c465f4f4e4c5960b81b60448201526064015b60405180910390fd5b600161020c8282610949565b50805160208201205f8190556040517f4a10a1a941faa81ccc864a40602d5b8182fc9a3a2537f87f8e6f49ef3ba1a2539161024a9190815260200190565b60405180910390a150565b60018054610262906108c5565b80601f016020809104026020016040519081016040528092919081815260200182805461028e906108c5565b80156102d95780601f106102b0576101008083540402835291602001916102d9565b820191905f5260205f20905b8154815290600101906020018083116102bc57829003601f168201915b505050505081565b5f463083888888886040516102f7929190610a09565b6040805191829003822060208301979097526001600160a01b039586169082015260608101939093529216608082015260a081019190915260c081019190915260e00160405160208183030381529060405280519060200120905095945050505050565b60605f83835f81811061037057610370610a18565b9050013560f81c60f81b90505f61038c898989896002546102e1565b9050600160025f8282546103a09190610a2c565b90915550506001600160f81b03198216600160f81b0361049e57604284146103da5760405162a624d160e31b815260040160405180910390fd5b604080515f808252602082018084528490526041880135901a918101829052600187810135606083018190526021890135608084018190529093909290916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169160a0016020604051602081039080840390855afa158015610466573d5f803e3d5ffd5b505050602060405103516001600160a01b0316146104965760405162a624d160e31b815260040160405180910390fd5b50505061058e565b6001600160f81b03198216600160f91b03610575575f546001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e8e2b62d906001846104f58983818d610a51565b6040518663ffffffff1660e01b8152600401610515959493929190610aa0565b602060405180830381865afa158015610530573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105549190610b4e565b6105705760405162a624d160e31b815260040160405180910390fd5b61058e565b604051636eb18a2d60e01b815260040160405180910390fd5b5f896001600160a01b03168989896040516105aa929190610a09565b5f6040518083038185875af1925050503d805f81146105e4576040519150601f19603f3d011682016040523d82523d5f602084013e6105e9565b606091505b50945090508061060e578360405163a5fa8d2b60e01b81526004016101f79190610738565b896001600160a01b03167fb145507a8c914406e782ddef9f4ab6858c6a1409e1ab79f3f8a43dada1782a108a8a8a60405161064a929190610a09565b604051908190038120610664928252602082015260400190565b60405180910390a25050509695505050505050565b634e487b7160e01b5f52604160045260245ffd5b5f6020828403121561069d575f80fd5b813567ffffffffffffffff808211156106b4575f80fd5b818401915084601f8301126106c7575f80fd5b8135818111156106d9576106d9610679565b604051601f8201601f19908116603f0116810190838211818310171561070157610701610679565b81604052828152876020848701011115610719575f80fd5b826020860160208301375f928101602001929092525095945050505050565b5f602080835283518060208501525f5b8181101561076457858101830151858201604001528201610748565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461079a575f80fd5b919050565b5f8083601f8401126107af575f80fd5b50813567ffffffffffffffff8111156107c6575f80fd5b6020830191508360208285010111156107dd575f80fd5b9250929050565b5f805f805f608086880312156107f8575f80fd5b61080186610784565b945060208601359350604086013567ffffffffffffffff811115610823575f80fd5b61082f8882890161079f565b96999598509660600135949350505050565b5f805f805f8060808789031215610856575f80fd5b61085f87610784565b955060208701359450604087013567ffffffffffffffff80821115610882575f80fd5b61088e8a838b0161079f565b909650945060608901359150808211156108a6575f80fd5b506108b389828a0161079f565b979a9699509497509295939492505050565b600181811c908216806108d957607f821691505b6020821081036108f757634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561094457805f5260205f20601f840160051c810160208510156109225750805b601f840160051c820191505b81811015610941575f815560010161092e565b50505b505050565b815167ffffffffffffffff81111561096357610963610679565b6109778161097184546108c5565b846108fd565b602080601f8311600181146109aa575f84156109935750858301515b5f19600386901b1c1916600185901b178555610a01565b5f85815260208120601f198616915b828110156109d8578886015182559484019460019091019084016109b9565b50858210156109f557878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b818382375f9101908152919050565b634e487b7160e01b5f52603260045260245ffd5b80820180821115610a4b57634e487b7160e01b5f52601160045260245ffd5b92915050565b5f8085851115610a5f575f80fd5b83861115610a6b575f80fd5b5050820193919092039150565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b8581525f6020608060208401525f8754610ab9816108c5565b80608087015260a060018084165f8114610ada5760018114610af657610b23565b60ff19851660a08a015260a084151560051b8a01019550610b23565b8c5f5260205f205f5b85811015610b1a5781548b8201860152908301908801610aff565b8a0160a0019650505b50505050508660408501528381036060850152610b41818688610a78565b9998505050505050505050565b5f60208284031215610b5e575f80fd5b81518015158114610b6d575f80fd5b939250505056fea26469706673582212208ee9e7b15620589789211025da301d7cfdc32042d378223f961ed1f3f3cda62d64736f6c63430008180033"
|
|
249
|
+
}
|