Merge pull request 'Update frontend/abi.js' (#1) from username/DCTF:main into main

Reviewed-on: #1
main
six 2023-08-24 10:08:29 +00:00
commit 7d26cb80fb
1 changed files with 356 additions and 798 deletions

View File

@ -1,19 +1,22 @@
myABI = [ myABI = [
{ {
"anonymous": false,
"inputs": [ "inputs": [
{ {
"indexed": false,
"internalType": "uint256", "internalType": "uint256",
"name": "_volMaxPoints", "name": "contestID",
"type": "uint256" "type": "uint256"
}, },
{ {
"indexed": true,
"internalType": "uint256", "internalType": "uint256",
"name": "_powDiff", "name": "challengeID",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "nonpayable", "name": "ChallengeAddedOrUpdated",
"type": "constructor" "type": "event"
}, },
{ {
"anonymous": false, "anonymous": false,
@ -21,52 +24,13 @@ myABI = [
{ {
"indexed": false, "indexed": false,
"internalType": "uint256", "internalType": "uint256",
"name": "timestamp", "name": "contestID",
"type": "uint256"
}
],
"name": "CCTFStarted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "flagId",
"type": "uint256" "type": "uint256"
}, },
{
"indexed": false,
"internalType": "address",
"name": "flagSigner",
"type": "address"
}
],
"name": "FlagAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ {
"indexed": true, "indexed": true,
"internalType": "uint256", "internalType": "uint256",
"name": "flagId", "name": "challengeID",
"type": "uint256"
}
],
"name": "FlagRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "flagId",
"type": "uint256" "type": "uint256"
}, },
{ {
@ -76,160 +40,75 @@ myABI = [
"type": "address" "type": "address"
} }
], ],
"name": "FlagSolved", "name": "ChallengeSolved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "player",
"type": "address"
},
{
"indexed": false,
"internalType": "enum CCTF9.PlayerStatus",
"name": "newStatus",
"type": "uint8"
}
],
"name": "PlayerStatusChanged",
"type": "event" "type": "event"
}, },
{ {
"inputs": [ "inputs": [
{ {
"internalType": "bytes32", "internalType": "uint256",
"name": "_message", "name": "contestID",
"type": "bytes32" "type": "uint256"
},
{
"internalType": "bytes",
"name": "signature",
"type": "bytes"
}, },
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "_submitFor", "name": "challengeID",
"type": "uint256" "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": "SubmitFlag", "name": "addOrUpdateChallenge",
"outputs": [], "outputs": [],
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [
"name": "TIME_DECAY_MAX",
"outputs": [
{ {
"internalType": "uint8", "internalType": "uint256",
"name": "", "name": "",
"type": "uint8" "type": "uint256"
} }
], ],
"stateMutability": "view", "name": "contests",
"type": "function" "outputs": [
},
{ {
"inputs": [], "internalType": "address",
"name": "admin", "name": "admin",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "endTime",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "flagCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "flagList",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "flags",
"outputs": [
{
"internalType": "address",
"name": "signer",
"type": "address" "type": "address"
}, },
{
"internalType": "enum CCTF9.FlagType",
"name": "flagType",
"type": "uint8"
},
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "solveCount", "name": "deadline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "points",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "currentPoints",
"type": "uint256" "type": "uint256"
}, },
{ {
"internalType": "string", "internalType": "string",
"name": "skill_name", "name": "password",
"type": "string" "type": "string"
} }
], ],
@ -240,112 +119,29 @@ myABI = [
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "_idx", "name": "contestID",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_count",
"type": "uint256"
}
],
"name": "getFlags",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "signer",
"type": "address"
},
{
"internalType": "enum CCTF9.FlagType",
"name": "flagType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "solveCount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "points",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "currentPoints",
"type": "uint256" "type": "uint256"
}, },
{ {
"internalType": "string", "internalType": "string",
"name": "skill_name", "name": "password",
"type": "string" "type": "string"
} }
], ],
"internalType": "struct CCTF9.Flag[]", "name": "createContest",
"name": "flagListRet", "outputs": [],
"type": "tuple[]" "stateMutability": "nonpayable",
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getFlags",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "signer",
"type": "address"
},
{
"internalType": "enum CCTF9.FlagType",
"name": "flagType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "solveCount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "points",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "currentPoints",
"type": "uint256"
},
{
"internalType": "string",
"name": "skill_name",
"type": "string"
}
],
"internalType": "struct CCTF9.Flag[]",
"name": "flagListRet",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [ "inputs": [
{ {
"internalType": "address", "internalType": "uint256",
"name": "_player", "name": "contestID",
"type": "address" "type": "uint256"
} }
], ],
"name": "getPlayerPoints", "name": "getContestDeadline",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
@ -358,16 +154,45 @@ myABI = [
}, },
{ {
"inputs": [ "inputs": [
{
"internalType": "uint256",
"name": "contestID",
"type": "uint256"
},
{ {
"internalType": "address", "internalType": "address",
"name": "_player", "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" "type": "address"
} }
], ],
"name": "getPlayerStatus", "name": "getPlayerStatus",
"outputs": [ "outputs": [
{ {
"internalType": "enum CCTF9.PlayerStatus", "internalType": "enum CryptoCTFX.PlayerStatus",
"name": "", "name": "",
"type": "uint8" "type": "uint8"
} }
@ -375,184 +200,16 @@ myABI = [
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{
"inputs": [
{
"internalType": "uint256",
"name": "_idx",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_count",
"type": "uint256"
}
],
"name": "getPlayers",
"outputs": [
{
"components": [
{
"internalType": "enum CCTF9.PlayerStatus",
"name": "status",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "points",
"type": "uint256"
},
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "uint256[2][]",
"name": "pointsPerFlag",
"type": "uint256[2][]"
}
],
"internalType": "struct CCTF9.Player[]",
"name": "playerListRet",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getPlayers",
"outputs": [
{
"components": [
{
"internalType": "enum CCTF9.PlayerStatus",
"name": "status",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "points",
"type": "uint256"
},
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "uint256[2][]",
"name": "pointsPerFlag",
"type": "uint256[2][]"
}
],
"internalType": "struct CCTF9.Player[]",
"name": "playerListRet",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getSuccessfulSubmissionCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "playerCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "playerList",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "players",
"outputs": [
{
"internalType": "enum CCTF9.PlayerStatus",
"name": "status",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "points",
"type": "uint256"
},
{
"internalType": "string",
"name": "name",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "powDiff",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{ {
"inputs": [ "inputs": [
{ {
"internalType": "bytes32", "internalType": "bytes32",
"name": "_ethSignedMessageHash", "name": "messageHash",
"type": "bytes32" "type": "bytes32"
}, },
{ {
"internalType": "bytes", "internalType": "bytes",
"name": "_signature", "name": "signature",
"type": "bytes" "type": "bytes"
} }
], ],
@ -570,13 +227,13 @@ myABI = [
{ {
"inputs": [ "inputs": [
{ {
"internalType": "string", "internalType": "uint256",
"name": "_RTFM", "name": "contestID",
"type": "string" "type": "uint256"
}, },
{ {
"internalType": "string", "internalType": "string",
"name": "_name", "name": "password",
"type": "string" "type": "string"
} }
], ],
@ -587,9 +244,14 @@ myABI = [
}, },
{ {
"inputs": [ "inputs": [
{
"internalType": "uint256",
"name": "contestID",
"type": "uint256"
},
{ {
"internalType": "address", "internalType": "address",
"name": "_admin", "name": "newAdmin",
"type": "address" "type": "address"
} }
], ],
@ -602,24 +264,16 @@ myABI = [
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "_endTime", "name": "contestID",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256" "type": "uint256"
} }
], ],
"name": "setCCTFEndTime", "name": "setContestDeadline",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bool",
"name": "_paused",
"type": "bool"
}
],
"name": "setCCTFPaused",
"outputs": [], "outputs": [],
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "function" "type": "function"
@ -628,57 +282,16 @@ myABI = [
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "_startTime", "name": "contestID",
"type": "uint256"
}
],
"name": "setCCTFStartTime",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_flagId",
"type": "uint256" "type": "uint256"
}, },
{
"internalType": "address",
"name": "_flagSigner",
"type": "address"
},
{
"internalType": "enum CCTF9.FlagType",
"name": "_flagType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "_points",
"type": "uint256"
},
{
"internalType": "string",
"name": "_skill",
"type": "string"
}
],
"name": "setFlag",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ {
"internalType": "address", "internalType": "address",
"name": "player", "name": "player",
"type": "address" "type": "address"
}, },
{ {
"internalType": "enum CCTF9.PlayerStatus", "internalType": "enum CryptoCTFX.PlayerStatus",
"name": "status", "name": "status",
"type": "uint8" "type": "uint8"
} }
@ -688,19 +301,6 @@ myABI = [
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "function" "type": "function"
}, },
{
"inputs": [
{
"internalType": "uint256",
"name": "_powDiff",
"type": "uint256"
}
],
"name": "setPowDiff",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{ {
"inputs": [ "inputs": [
{ {
@ -731,68 +331,26 @@ myABI = [
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [
"name": "startTime",
"outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "contestID",
"type": "uint256" "type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}, },
{
"inputs": [],
"name": "started",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "submission_success_count",
"outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "challengeID",
"type": "uint256" "type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}, },
{ {
"inputs": [], "internalType": "bytes",
"name": "volMaxPoints", "name": "signature",
"outputs": [ "type": "bytes"
{
"internalType": "uint256",
"name": "",
"type": "uint256"
} }
], ],
"stateMutability": "view", "name": "submitFlag",
"type": "function" "outputs": [],
}, "stateMutability": "nonpayable",
{
"inputs": [],
"name": "volStart",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function" "type": "function"
} }
] ]