qvtx-developer-kit 1.0.0 → 1.1.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/.env.example +108 -0
- package/README.md +0 -0
- package/abis/QVTXBridge.json +273 -0
- package/abis/QVTXGovernance.json +267 -0
- package/abis/QVTXNFT.json +370 -0
- package/abis/QVTXRewards.json +155 -0
- package/abis/QVTXToken.json +311 -0
- package/abis/QVTXVesting.json +216 -0
- package/abis/index.js +15 -0
- package/bin/qvtx-developer-cli.js +99 -0
- package/config/index.js +108 -0
- package/config/networks.js +247 -0
- package/examples/basic-usage.js +39 -0
- package/examples/bridge-example.js +123 -0
- package/examples/governance-example.js +140 -0
- package/examples/nft-example.js +141 -0
- package/examples/staking-example.js +96 -0
- package/index.js +145 -0
- package/languages/blockchain_ai_sdk.js +0 -0
- package/languages/node_sdk.js +0 -0
- package/languages/solana_sdk.js +383 -0
- package/package.json +28 -3
- package/rewards/index.js +71 -0
- package/smart-contracts/QVTXBridge.sol +305 -0
- package/smart-contracts/QVTXGovernance.sol +325 -0
- package/smart-contracts/QVTXNFT.sol +338 -0
- package/smart-contracts/QVTXRewards.sol +102 -0
- package/smart-contracts/QVTXToken.sol +227 -0
- package/smart-contracts/QVTXVesting.sol +411 -0
- package/smart-contracts/interfaces/IERC20.sol +14 -0
- package/smart-contracts/interfaces/IERC20Metadata.sol +8 -0
- package/smart-contracts/interfaces/IERC721.sol +18 -0
- package/smart-contracts/interfaces/IERC721Metadata.sol +8 -0
- package/smart-contracts/interfaces/IERC721Receiver.sol +11 -0
- package/storage/index.js +112 -0
- package/templates/contract/ERC20Token.sol +116 -0
- package/templates/dapp/index.html +93 -0
- package/test/index.js +182 -0
- package/tools/build-tool.js +63 -0
- package/tools/create-template.js +116 -0
- package/tools/deploy-tool.js +55 -0
- package/tools/generate-docs.js +149 -0
- package/tools/init-project.js +138 -0
- package/tools/run-tests.js +64 -0
- package/types/index.d.ts +264 -0
package/.env.example
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# QVTX Developer Kit - Environment Configuration
|
|
2
|
+
# Copy this file to .env and fill in your values
|
|
3
|
+
|
|
4
|
+
# ===========================================
|
|
5
|
+
# WALLET & AUTHENTICATION
|
|
6
|
+
# ===========================================
|
|
7
|
+
|
|
8
|
+
# Your wallet private key (NEVER commit this!)
|
|
9
|
+
PRIVATE_KEY=your-private-key-here
|
|
10
|
+
|
|
11
|
+
# Your wallet mnemonic (alternative to private key)
|
|
12
|
+
MNEMONIC=your twelve word mnemonic phrase here
|
|
13
|
+
|
|
14
|
+
# ===========================================
|
|
15
|
+
# ETHEREUM & EVM CHAINS
|
|
16
|
+
# ===========================================
|
|
17
|
+
|
|
18
|
+
# Infura API Key (https://infura.io)
|
|
19
|
+
INFURA_API_KEY=your-infura-api-key
|
|
20
|
+
|
|
21
|
+
# Alchemy API Key (https://alchemy.com)
|
|
22
|
+
ALCHEMY_API_KEY=your-alchemy-api-key
|
|
23
|
+
|
|
24
|
+
# Custom RPC URLs (optional - overrides API keys)
|
|
25
|
+
ETHEREUM_RPC=https://mainnet.infura.io/v3/YOUR_KEY
|
|
26
|
+
GOERLI_RPC=https://goerli.infura.io/v3/YOUR_KEY
|
|
27
|
+
SEPOLIA_RPC=https://sepolia.infura.io/v3/YOUR_KEY
|
|
28
|
+
BSC_RPC=https://bsc-dataseed.binance.org/
|
|
29
|
+
POLYGON_RPC=https://polygon-rpc.com/
|
|
30
|
+
ARBITRUM_RPC=https://arb1.arbitrum.io/rpc
|
|
31
|
+
AVALANCHE_RPC=https://api.avax.network/ext/bc/C/rpc
|
|
32
|
+
OPTIMISM_RPC=https://mainnet.optimism.io
|
|
33
|
+
|
|
34
|
+
# ===========================================
|
|
35
|
+
# SOLANA
|
|
36
|
+
# ===========================================
|
|
37
|
+
|
|
38
|
+
# Solana Network (mainnet-beta, devnet, testnet)
|
|
39
|
+
SOLANA_NETWORK=devnet
|
|
40
|
+
|
|
41
|
+
# Custom Solana RPC (optional)
|
|
42
|
+
SOLANA_RPC=https://api.devnet.solana.com
|
|
43
|
+
|
|
44
|
+
# ===========================================
|
|
45
|
+
# QVTX CONTRACT ADDRESSES
|
|
46
|
+
# ===========================================
|
|
47
|
+
|
|
48
|
+
# Ethereum Mainnet
|
|
49
|
+
QVTX_TOKEN_ETH=0x...
|
|
50
|
+
QVTX_GOVERNANCE_ETH=0x...
|
|
51
|
+
QVTX_BRIDGE_ETH=0x...
|
|
52
|
+
QVTX_STAKING_ETH=0x...
|
|
53
|
+
QVTX_NFT_ETH=0x...
|
|
54
|
+
|
|
55
|
+
# BSC Mainnet
|
|
56
|
+
QVTX_TOKEN_BSC=0x...
|
|
57
|
+
QVTX_BRIDGE_BSC=0x...
|
|
58
|
+
|
|
59
|
+
# Polygon Mainnet
|
|
60
|
+
QVTX_TOKEN_POLYGON=0x...
|
|
61
|
+
QVTX_BRIDGE_POLYGON=0x...
|
|
62
|
+
|
|
63
|
+
# Solana
|
|
64
|
+
QVTX_TOKEN_SOLANA=...
|
|
65
|
+
|
|
66
|
+
# ===========================================
|
|
67
|
+
# API KEYS & SERVICES
|
|
68
|
+
# ===========================================
|
|
69
|
+
|
|
70
|
+
# Etherscan API Key (for contract verification)
|
|
71
|
+
ETHERSCAN_API_KEY=your-etherscan-api-key
|
|
72
|
+
|
|
73
|
+
# BSCScan API Key
|
|
74
|
+
BSCSCAN_API_KEY=your-bscscan-api-key
|
|
75
|
+
|
|
76
|
+
# PolygonScan API Key
|
|
77
|
+
POLYGONSCAN_API_KEY=your-polygonscan-api-key
|
|
78
|
+
|
|
79
|
+
# Pinata IPFS (for NFT metadata)
|
|
80
|
+
PINATA_API_KEY=your-pinata-api-key
|
|
81
|
+
PINATA_SECRET_KEY=your-pinata-secret-key
|
|
82
|
+
|
|
83
|
+
# NFT.Storage (alternative IPFS)
|
|
84
|
+
NFT_STORAGE_API_KEY=your-nft-storage-api-key
|
|
85
|
+
|
|
86
|
+
# ===========================================
|
|
87
|
+
# DEVELOPMENT & TESTING
|
|
88
|
+
# ===========================================
|
|
89
|
+
|
|
90
|
+
# Local Hardhat/Ganache
|
|
91
|
+
LOCAL_RPC=http://127.0.0.1:8545
|
|
92
|
+
|
|
93
|
+
# Test accounts (for local development only)
|
|
94
|
+
TEST_ACCOUNT_1=0x...
|
|
95
|
+
TEST_ACCOUNT_2=0x...
|
|
96
|
+
|
|
97
|
+
# ===========================================
|
|
98
|
+
# QVTX SPECIFIC
|
|
99
|
+
# ===========================================
|
|
100
|
+
|
|
101
|
+
# QVTX API Key (for premium features)
|
|
102
|
+
QVTX_API_KEY=your-qvtx-api-key
|
|
103
|
+
|
|
104
|
+
# QVTX Neural Storage endpoint
|
|
105
|
+
QVTX_NEURAL_STORAGE=https://storage.quantvestrix.com
|
|
106
|
+
|
|
107
|
+
# Enable debug logging
|
|
108
|
+
DEBUG=false
|
package/README.md
CHANGED
|
File without changes
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractName": "QVTXBridge",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [
|
|
6
|
+
{"internalType": "address", "name": "_qvtxToken", "type": "address"},
|
|
7
|
+
{"internalType": "uint256", "name": "_chainId", "type": "uint256"}
|
|
8
|
+
],
|
|
9
|
+
"stateMutability": "nonpayable",
|
|
10
|
+
"type": "constructor"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"anonymous": false,
|
|
14
|
+
"inputs": [
|
|
15
|
+
{"indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256"},
|
|
16
|
+
{"indexed": true, "internalType": "address", "name": "recipient", "type": "address"},
|
|
17
|
+
{"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"},
|
|
18
|
+
{"indexed": false, "internalType": "uint256", "name": "sourceChain", "type": "uint256"},
|
|
19
|
+
{"indexed": false, "internalType": "bytes32", "name": "sourceTxHash", "type": "bytes32"}
|
|
20
|
+
],
|
|
21
|
+
"name": "BridgeCompleted",
|
|
22
|
+
"type": "event"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"anonymous": false,
|
|
26
|
+
"inputs": [
|
|
27
|
+
{"indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256"},
|
|
28
|
+
{"indexed": true, "internalType": "address", "name": "sender", "type": "address"},
|
|
29
|
+
{"indexed": true, "internalType": "address", "name": "recipient", "type": "address"},
|
|
30
|
+
{"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"},
|
|
31
|
+
{"indexed": false, "internalType": "uint256", "name": "sourceChain", "type": "uint256"},
|
|
32
|
+
{"indexed": false, "internalType": "uint256", "name": "targetChain", "type": "uint256"}
|
|
33
|
+
],
|
|
34
|
+
"name": "BridgeInitiated",
|
|
35
|
+
"type": "event"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"anonymous": false,
|
|
39
|
+
"inputs": [
|
|
40
|
+
{"indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256"},
|
|
41
|
+
{"indexed": true, "internalType": "address", "name": "sender", "type": "address"},
|
|
42
|
+
{"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}
|
|
43
|
+
],
|
|
44
|
+
"name": "BridgeRefunded",
|
|
45
|
+
"type": "event"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"anonymous": false,
|
|
49
|
+
"inputs": [
|
|
50
|
+
{"indexed": true, "internalType": "uint256", "name": "chainId", "type": "uint256"},
|
|
51
|
+
{"indexed": false, "internalType": "address", "name": "bridgeContract", "type": "address"}
|
|
52
|
+
],
|
|
53
|
+
"name": "ChainAdded",
|
|
54
|
+
"type": "event"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"anonymous": false,
|
|
58
|
+
"inputs": [{"indexed": true, "internalType": "uint256", "name": "chainId", "type": "uint256"}],
|
|
59
|
+
"name": "ChainRemoved",
|
|
60
|
+
"type": "event"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"anonymous": false,
|
|
64
|
+
"inputs": [
|
|
65
|
+
{"indexed": true, "internalType": "address", "name": "to", "type": "address"},
|
|
66
|
+
{"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}
|
|
67
|
+
],
|
|
68
|
+
"name": "FeesWithdrawn",
|
|
69
|
+
"type": "event"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"anonymous": false,
|
|
73
|
+
"inputs": [{"indexed": false, "internalType": "bool", "name": "status", "type": "bool"}],
|
|
74
|
+
"name": "Paused",
|
|
75
|
+
"type": "event"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"anonymous": false,
|
|
79
|
+
"inputs": [{"indexed": true, "internalType": "address", "name": "newValidator", "type": "address"}],
|
|
80
|
+
"name": "ValidatorUpdated",
|
|
81
|
+
"type": "event"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"inputs": [
|
|
85
|
+
{"internalType": "uint256", "name": "chainId", "type": "uint256"},
|
|
86
|
+
{"internalType": "address", "name": "bridgeContract", "type": "address"}
|
|
87
|
+
],
|
|
88
|
+
"name": "addChain",
|
|
89
|
+
"outputs": [],
|
|
90
|
+
"stateMutability": "nonpayable",
|
|
91
|
+
"type": "function"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"inputs": [
|
|
95
|
+
{"internalType": "address", "name": "recipient", "type": "address"},
|
|
96
|
+
{"internalType": "uint256", "name": "amount", "type": "uint256"},
|
|
97
|
+
{"internalType": "uint256", "name": "targetChain", "type": "uint256"}
|
|
98
|
+
],
|
|
99
|
+
"name": "bridge",
|
|
100
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
101
|
+
"stateMutability": "payable",
|
|
102
|
+
"type": "function"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"inputs": [],
|
|
106
|
+
"name": "bridgeFee",
|
|
107
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
108
|
+
"stateMutability": "view",
|
|
109
|
+
"type": "function"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"inputs": [
|
|
113
|
+
{"internalType": "address", "name": "recipient", "type": "address"},
|
|
114
|
+
{"internalType": "uint256", "name": "amount", "type": "uint256"},
|
|
115
|
+
{"internalType": "uint256", "name": "sourceChain", "type": "uint256"},
|
|
116
|
+
{"internalType": "bytes32", "name": "sourceTxHash", "type": "bytes32"},
|
|
117
|
+
{"internalType": "bytes", "name": "signature", "type": "bytes"}
|
|
118
|
+
],
|
|
119
|
+
"name": "completeBridge",
|
|
120
|
+
"outputs": [],
|
|
121
|
+
"stateMutability": "nonpayable",
|
|
122
|
+
"type": "function"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"inputs": [],
|
|
126
|
+
"name": "currentChainId",
|
|
127
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
128
|
+
"stateMutability": "view",
|
|
129
|
+
"type": "function"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"inputs": [],
|
|
133
|
+
"name": "dailyLimit",
|
|
134
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
135
|
+
"stateMutability": "view",
|
|
136
|
+
"type": "function"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"inputs": [{"internalType": "uint256", "name": "requestId", "type": "uint256"}],
|
|
140
|
+
"name": "getBridgeRequest",
|
|
141
|
+
"outputs": [
|
|
142
|
+
{
|
|
143
|
+
"components": [
|
|
144
|
+
{"internalType": "uint256", "name": "id", "type": "uint256"},
|
|
145
|
+
{"internalType": "address", "name": "sender", "type": "address"},
|
|
146
|
+
{"internalType": "address", "name": "recipient", "type": "address"},
|
|
147
|
+
{"internalType": "uint256", "name": "amount", "type": "uint256"},
|
|
148
|
+
{"internalType": "uint256", "name": "sourceChain", "type": "uint256"},
|
|
149
|
+
{"internalType": "uint256", "name": "targetChain", "type": "uint256"},
|
|
150
|
+
{"internalType": "uint256", "name": "timestamp", "type": "uint256"},
|
|
151
|
+
{"internalType": "bytes32", "name": "txHash", "type": "bytes32"},
|
|
152
|
+
{"internalType": "uint8", "name": "status", "type": "uint8"}
|
|
153
|
+
],
|
|
154
|
+
"internalType": "struct QVTXBridge.BridgeRequest",
|
|
155
|
+
"name": "",
|
|
156
|
+
"type": "tuple"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"stateMutability": "view",
|
|
160
|
+
"type": "function"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"inputs": [{"internalType": "address", "name": "user", "type": "address"}],
|
|
164
|
+
"name": "getUserBridgeRequests",
|
|
165
|
+
"outputs": [{"internalType": "uint256[]", "name": "", "type": "uint256[]"}],
|
|
166
|
+
"stateMutability": "view",
|
|
167
|
+
"type": "function"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"inputs": [{"internalType": "uint256", "name": "chainId", "type": "uint256"}],
|
|
171
|
+
"name": "isChainSupported",
|
|
172
|
+
"outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
|
|
173
|
+
"stateMutability": "view",
|
|
174
|
+
"type": "function"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"inputs": [],
|
|
178
|
+
"name": "maxBridgeAmount",
|
|
179
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
180
|
+
"stateMutability": "view",
|
|
181
|
+
"type": "function"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"inputs": [],
|
|
185
|
+
"name": "minBridgeAmount",
|
|
186
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
187
|
+
"stateMutability": "view",
|
|
188
|
+
"type": "function"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"inputs": [],
|
|
192
|
+
"name": "owner",
|
|
193
|
+
"outputs": [{"internalType": "address", "name": "", "type": "address"}],
|
|
194
|
+
"stateMutability": "view",
|
|
195
|
+
"type": "function"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"inputs": [],
|
|
199
|
+
"name": "paused",
|
|
200
|
+
"outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
|
|
201
|
+
"stateMutability": "view",
|
|
202
|
+
"type": "function"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"inputs": [{"internalType": "uint256", "name": "requestId", "type": "uint256"}],
|
|
206
|
+
"name": "refund",
|
|
207
|
+
"outputs": [],
|
|
208
|
+
"stateMutability": "nonpayable",
|
|
209
|
+
"type": "function"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"inputs": [{"internalType": "uint256", "name": "chainId", "type": "uint256"}],
|
|
213
|
+
"name": "removeChain",
|
|
214
|
+
"outputs": [],
|
|
215
|
+
"stateMutability": "nonpayable",
|
|
216
|
+
"type": "function"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"inputs": [{"internalType": "uint256", "name": "_fee", "type": "uint256"}],
|
|
220
|
+
"name": "setBridgeFee",
|
|
221
|
+
"outputs": [],
|
|
222
|
+
"stateMutability": "nonpayable",
|
|
223
|
+
"type": "function"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"inputs": [
|
|
227
|
+
{"internalType": "uint256", "name": "_min", "type": "uint256"},
|
|
228
|
+
{"internalType": "uint256", "name": "_max", "type": "uint256"},
|
|
229
|
+
{"internalType": "uint256", "name": "_daily", "type": "uint256"}
|
|
230
|
+
],
|
|
231
|
+
"name": "setLimits",
|
|
232
|
+
"outputs": [],
|
|
233
|
+
"stateMutability": "nonpayable",
|
|
234
|
+
"type": "function"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"inputs": [{"internalType": "bool", "name": "_paused", "type": "bool"}],
|
|
238
|
+
"name": "setPaused",
|
|
239
|
+
"outputs": [],
|
|
240
|
+
"stateMutability": "nonpayable",
|
|
241
|
+
"type": "function"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"inputs": [{"internalType": "address", "name": "_validator", "type": "address"}],
|
|
245
|
+
"name": "setValidator",
|
|
246
|
+
"outputs": [],
|
|
247
|
+
"stateMutability": "nonpayable",
|
|
248
|
+
"type": "function"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}],
|
|
252
|
+
"name": "transferOwnership",
|
|
253
|
+
"outputs": [],
|
|
254
|
+
"stateMutability": "nonpayable",
|
|
255
|
+
"type": "function"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"inputs": [],
|
|
259
|
+
"name": "validator",
|
|
260
|
+
"outputs": [{"internalType": "address", "name": "", "type": "address"}],
|
|
261
|
+
"stateMutability": "view",
|
|
262
|
+
"type": "function"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"inputs": [{"internalType": "address payable", "name": "to", "type": "address"}],
|
|
266
|
+
"name": "withdrawFees",
|
|
267
|
+
"outputs": [],
|
|
268
|
+
"stateMutability": "nonpayable",
|
|
269
|
+
"type": "function"
|
|
270
|
+
},
|
|
271
|
+
{"stateMutability": "payable", "type": "receive"}
|
|
272
|
+
]
|
|
273
|
+
}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractName": "QVTXGovernance",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [{"internalType": "address", "name": "_qvtxToken", "type": "address"}],
|
|
6
|
+
"stateMutability": "nonpayable",
|
|
7
|
+
"type": "constructor"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"anonymous": false,
|
|
11
|
+
"inputs": [
|
|
12
|
+
{"indexed": false, "internalType": "string", "name": "param", "type": "string"},
|
|
13
|
+
{"indexed": false, "internalType": "uint256", "name": "value", "type": "uint256"}
|
|
14
|
+
],
|
|
15
|
+
"name": "ConfigUpdated",
|
|
16
|
+
"type": "event"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"anonymous": false,
|
|
20
|
+
"inputs": [{"indexed": true, "internalType": "uint256", "name": "id", "type": "uint256"}],
|
|
21
|
+
"name": "ProposalCanceled",
|
|
22
|
+
"type": "event"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"anonymous": false,
|
|
26
|
+
"inputs": [
|
|
27
|
+
{"indexed": true, "internalType": "uint256", "name": "id", "type": "uint256"},
|
|
28
|
+
{"indexed": true, "internalType": "address", "name": "proposer", "type": "address"},
|
|
29
|
+
{"indexed": false, "internalType": "string", "name": "title", "type": "string"},
|
|
30
|
+
{"indexed": false, "internalType": "address", "name": "target", "type": "address"},
|
|
31
|
+
{"indexed": false, "internalType": "uint256", "name": "startBlock", "type": "uint256"},
|
|
32
|
+
{"indexed": false, "internalType": "uint256", "name": "endBlock", "type": "uint256"}
|
|
33
|
+
],
|
|
34
|
+
"name": "ProposalCreated",
|
|
35
|
+
"type": "event"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"anonymous": false,
|
|
39
|
+
"inputs": [{"indexed": true, "internalType": "uint256", "name": "id", "type": "uint256"}],
|
|
40
|
+
"name": "ProposalExecuted",
|
|
41
|
+
"type": "event"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"anonymous": false,
|
|
45
|
+
"inputs": [
|
|
46
|
+
{"indexed": true, "internalType": "uint256", "name": "id", "type": "uint256"},
|
|
47
|
+
{"indexed": false, "internalType": "uint256", "name": "eta", "type": "uint256"}
|
|
48
|
+
],
|
|
49
|
+
"name": "ProposalQueued",
|
|
50
|
+
"type": "event"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"anonymous": false,
|
|
54
|
+
"inputs": [
|
|
55
|
+
{"indexed": true, "internalType": "address", "name": "voter", "type": "address"},
|
|
56
|
+
{"indexed": true, "internalType": "uint256", "name": "proposalId", "type": "uint256"},
|
|
57
|
+
{"indexed": false, "internalType": "uint8", "name": "support", "type": "uint8"},
|
|
58
|
+
{"indexed": false, "internalType": "uint256", "name": "votes", "type": "uint256"},
|
|
59
|
+
{"indexed": false, "internalType": "string", "name": "reason", "type": "string"}
|
|
60
|
+
],
|
|
61
|
+
"name": "VoteCast",
|
|
62
|
+
"type": "event"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}],
|
|
66
|
+
"name": "cancel",
|
|
67
|
+
"outputs": [],
|
|
68
|
+
"stateMutability": "nonpayable",
|
|
69
|
+
"type": "function"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"inputs": [
|
|
73
|
+
{"internalType": "uint256", "name": "proposalId", "type": "uint256"},
|
|
74
|
+
{"internalType": "uint8", "name": "support", "type": "uint8"}
|
|
75
|
+
],
|
|
76
|
+
"name": "castVote",
|
|
77
|
+
"outputs": [],
|
|
78
|
+
"stateMutability": "nonpayable",
|
|
79
|
+
"type": "function"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"inputs": [
|
|
83
|
+
{"internalType": "uint256", "name": "proposalId", "type": "uint256"},
|
|
84
|
+
{"internalType": "uint8", "name": "support", "type": "uint8"},
|
|
85
|
+
{"internalType": "string", "name": "reason", "type": "string"}
|
|
86
|
+
],
|
|
87
|
+
"name": "castVoteWithReason",
|
|
88
|
+
"outputs": [],
|
|
89
|
+
"stateMutability": "nonpayable",
|
|
90
|
+
"type": "function"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}],
|
|
94
|
+
"name": "execute",
|
|
95
|
+
"outputs": [],
|
|
96
|
+
"stateMutability": "payable",
|
|
97
|
+
"type": "function"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}],
|
|
101
|
+
"name": "getProposal",
|
|
102
|
+
"outputs": [
|
|
103
|
+
{
|
|
104
|
+
"components": [
|
|
105
|
+
{"internalType": "uint256", "name": "id", "type": "uint256"},
|
|
106
|
+
{"internalType": "address", "name": "proposer", "type": "address"},
|
|
107
|
+
{"internalType": "string", "name": "title", "type": "string"},
|
|
108
|
+
{"internalType": "string", "name": "description", "type": "string"},
|
|
109
|
+
{"internalType": "uint256", "name": "forVotes", "type": "uint256"},
|
|
110
|
+
{"internalType": "uint256", "name": "againstVotes", "type": "uint256"},
|
|
111
|
+
{"internalType": "uint256", "name": "abstainVotes", "type": "uint256"},
|
|
112
|
+
{"internalType": "uint256", "name": "startBlock", "type": "uint256"},
|
|
113
|
+
{"internalType": "uint256", "name": "endBlock", "type": "uint256"},
|
|
114
|
+
{"internalType": "bool", "name": "executed", "type": "bool"},
|
|
115
|
+
{"internalType": "bool", "name": "canceled", "type": "bool"},
|
|
116
|
+
{"internalType": "uint8", "name": "state", "type": "uint8"}
|
|
117
|
+
],
|
|
118
|
+
"internalType": "struct QVTXGovernance.ProposalInfo",
|
|
119
|
+
"name": "",
|
|
120
|
+
"type": "tuple"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"stateMutability": "view",
|
|
124
|
+
"type": "function"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}],
|
|
128
|
+
"name": "getProposalState",
|
|
129
|
+
"outputs": [{"internalType": "uint8", "name": "", "type": "uint8"}],
|
|
130
|
+
"stateMutability": "view",
|
|
131
|
+
"type": "function"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"inputs": [
|
|
135
|
+
{"internalType": "uint256", "name": "proposalId", "type": "uint256"},
|
|
136
|
+
{"internalType": "address", "name": "voter", "type": "address"}
|
|
137
|
+
],
|
|
138
|
+
"name": "getReceipt",
|
|
139
|
+
"outputs": [
|
|
140
|
+
{
|
|
141
|
+
"components": [
|
|
142
|
+
{"internalType": "bool", "name": "hasVoted", "type": "bool"},
|
|
143
|
+
{"internalType": "uint8", "name": "support", "type": "uint8"},
|
|
144
|
+
{"internalType": "uint256", "name": "votes", "type": "uint256"}
|
|
145
|
+
],
|
|
146
|
+
"internalType": "struct QVTXGovernance.Receipt",
|
|
147
|
+
"name": "",
|
|
148
|
+
"type": "tuple"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"stateMutability": "view",
|
|
152
|
+
"type": "function"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"inputs": [],
|
|
156
|
+
"name": "owner",
|
|
157
|
+
"outputs": [{"internalType": "address", "name": "", "type": "address"}],
|
|
158
|
+
"stateMutability": "view",
|
|
159
|
+
"type": "function"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"inputs": [],
|
|
163
|
+
"name": "proposalCount",
|
|
164
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
165
|
+
"stateMutability": "view",
|
|
166
|
+
"type": "function"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"inputs": [],
|
|
170
|
+
"name": "proposalThreshold",
|
|
171
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
172
|
+
"stateMutability": "view",
|
|
173
|
+
"type": "function"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"inputs": [
|
|
177
|
+
{"internalType": "string", "name": "title", "type": "string"},
|
|
178
|
+
{"internalType": "string", "name": "description", "type": "string"},
|
|
179
|
+
{"internalType": "address", "name": "target", "type": "address"},
|
|
180
|
+
{"internalType": "uint256", "name": "value", "type": "uint256"},
|
|
181
|
+
{"internalType": "bytes", "name": "callData", "type": "bytes"}
|
|
182
|
+
],
|
|
183
|
+
"name": "propose",
|
|
184
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
185
|
+
"stateMutability": "nonpayable",
|
|
186
|
+
"type": "function"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"inputs": [{"internalType": "uint256", "name": "proposalId", "type": "uint256"}],
|
|
190
|
+
"name": "queue",
|
|
191
|
+
"outputs": [],
|
|
192
|
+
"stateMutability": "nonpayable",
|
|
193
|
+
"type": "function"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"inputs": [],
|
|
197
|
+
"name": "quorumVotes",
|
|
198
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
199
|
+
"stateMutability": "view",
|
|
200
|
+
"type": "function"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"inputs": [],
|
|
204
|
+
"name": "qvtxToken",
|
|
205
|
+
"outputs": [{"internalType": "address", "name": "", "type": "address"}],
|
|
206
|
+
"stateMutability": "view",
|
|
207
|
+
"type": "function"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"inputs": [{"internalType": "uint256", "name": "_threshold", "type": "uint256"}],
|
|
211
|
+
"name": "setProposalThreshold",
|
|
212
|
+
"outputs": [],
|
|
213
|
+
"stateMutability": "nonpayable",
|
|
214
|
+
"type": "function"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"inputs": [{"internalType": "uint256", "name": "_quorum", "type": "uint256"}],
|
|
218
|
+
"name": "setQuorumVotes",
|
|
219
|
+
"outputs": [],
|
|
220
|
+
"stateMutability": "nonpayable",
|
|
221
|
+
"type": "function"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"inputs": [{"internalType": "uint256", "name": "_delay", "type": "uint256"}],
|
|
225
|
+
"name": "setTimelockDelay",
|
|
226
|
+
"outputs": [],
|
|
227
|
+
"stateMutability": "nonpayable",
|
|
228
|
+
"type": "function"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"inputs": [{"internalType": "uint256", "name": "_period", "type": "uint256"}],
|
|
232
|
+
"name": "setVotingPeriod",
|
|
233
|
+
"outputs": [],
|
|
234
|
+
"stateMutability": "nonpayable",
|
|
235
|
+
"type": "function"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"inputs": [],
|
|
239
|
+
"name": "timelockDelay",
|
|
240
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
241
|
+
"stateMutability": "view",
|
|
242
|
+
"type": "function"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}],
|
|
246
|
+
"name": "transferOwnership",
|
|
247
|
+
"outputs": [],
|
|
248
|
+
"stateMutability": "nonpayable",
|
|
249
|
+
"type": "function"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"inputs": [],
|
|
253
|
+
"name": "votingDelay",
|
|
254
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
255
|
+
"stateMutability": "view",
|
|
256
|
+
"type": "function"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"inputs": [],
|
|
260
|
+
"name": "votingPeriod",
|
|
261
|
+
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
|
|
262
|
+
"stateMutability": "view",
|
|
263
|
+
"type": "function"
|
|
264
|
+
},
|
|
265
|
+
{"stateMutability": "payable", "type": "receive"}
|
|
266
|
+
]
|
|
267
|
+
}
|