356 lines
5.7 KiB
JavaScript
356 lines
5.7 KiB
JavaScript
myABI = [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "uint256",
|
|
"name": "challengeID",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "ChallengeAddedOrUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "uint256",
|
|
"name": "challengeID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "solver",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "ChallengeSolved",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "challengeID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "obscuredFlag",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "worth",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "descriptionFingerprint",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bool",
|
|
"name": "onlyFirstSolver",
|
|
"type": "bool"
|
|
},
|
|
{
|
|
"internalType": "string",
|
|
"name": "skill",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"name": "addOrUpdateChallenge",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "contests",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "admin",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "deadline",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "string",
|
|
"name": "password",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "string",
|
|
"name": "password",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"name": "createContest",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "getContestDeadline",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "player",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getPlayerScore",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "player",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "getPlayerStatus",
|
|
"outputs": [
|
|
{
|
|
"internalType": "enum CryptoCTFX.PlayerStatus",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "messageHash",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "signature",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "recoverSigner",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "string",
|
|
"name": "password",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"name": "register",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "newAdmin",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "setAdmin",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "deadline",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "setContestDeadline",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "player",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "enum CryptoCTFX.PlayerStatus",
|
|
"name": "status",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"name": "setPlayerStatus",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "sig",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "splitSignature",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "r",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "s",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "v",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "contestID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "challengeID",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "signature",
|
|
"type": "bytes"
|
|
}
|
|
],
|
|
"name": "submitFlag",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
] |