Update abi and fields

This commit is contained in:
trizin 2023-08-03 11:58:48 +00:00 committed by GitHub
parent 446395ccde
commit 05a42af1be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 167 additions and 128 deletions

View File

@ -178,19 +178,6 @@
"name": "MinterProposed", "name": "MinterProposed",
"type": "event" "type": "event"
}, },
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "dispenserContract",
"type": "address"
}
],
"name": "NewDispenser",
"type": "event"
},
{ {
"anonymous": false, "anonymous": false,
"inputs": [ "inputs": [
@ -222,6 +209,37 @@
"name": "NewFixedRate", "name": "NewFixedRate",
"type": "event" "type": "event"
}, },
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "caller",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_newPaymentCollector",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
}
],
"name": "NewPaymentCollector",
"type": "event"
},
{ {
"anonymous": false, "anonymous": false,
"inputs": [ "inputs": [
@ -240,7 +258,7 @@
{ {
"indexed": false, "indexed": false,
"internalType": "uint256", "internalType": "uint256",
"name": "blocknum", "name": "epoch",
"type": "uint256" "type": "uint256"
} }
], ],
@ -524,7 +542,7 @@
{ {
"indexed": false, "indexed": false,
"internalType": "uint256", "internalType": "uint256",
"name": "blocksPerEpoch", "name": "secondsPerEpoch",
"type": "uint256" "type": "uint256"
} }
], ],
@ -537,19 +555,19 @@
{ {
"indexed": false, "indexed": false,
"internalType": "uint256", "internalType": "uint256",
"name": "blocksPerEpoch", "name": "secondsPerEpoch",
"type": "uint256" "type": "uint256"
}, },
{ {
"indexed": false, "indexed": false,
"internalType": "uint256", "internalType": "uint256",
"name": "blocksPerSubscription", "name": "secondsPerSubscription",
"type": "uint256" "type": "uint256"
}, },
{ {
"indexed": false, "indexed": false,
"internalType": "uint256", "internalType": "uint256",
"name": "trueValueSubmitTimeoutBlock", "name": "trueValueSubmitTimeout",
"type": "uint256" "type": "uint256"
}, },
{ {
@ -747,51 +765,6 @@
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{
"inputs": [
{
"internalType": "uint256",
"name": "blocknum",
"type": "uint256"
}
],
"name": "blocknumIsOnSlot",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "blocksPerEpoch",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "blocksPerSubscription",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{ {
"inputs": [ "inputs": [
{ {
@ -1055,25 +1028,6 @@
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "function" "type": "function"
}, },
{
"inputs": [
{
"internalType": "uint256",
"name": "blocknum",
"type": "uint256"
}
],
"name": "epoch",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{ {
"inputs": [ "inputs": [
{ {
@ -1110,8 +1064,40 @@
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "blocknum", "name": "epoch_start",
"type": "uint256" "type": "uint256"
},
{
"components": [
{
"internalType": "address",
"name": "userAddress",
"type": "address"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "validUntil",
"type": "uint256"
}
],
"internalType": "struct ERC20Template3.userAuth",
"name": "_userAuth",
"type": "tuple"
} }
], ],
"name": "getAggPredval", "name": "getAggPredval",
@ -1242,13 +1228,45 @@
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "blocknum", "name": "epoch_start",
"type": "uint256" "type": "uint256"
}, },
{ {
"internalType": "address", "internalType": "address",
"name": "predictoor", "name": "predictoor",
"type": "address" "type": "address"
},
{
"components": [
{
"internalType": "address",
"name": "userAddress",
"type": "address"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "validUntil",
"type": "uint256"
}
],
"internalType": "struct ERC20Template3.userAuth",
"name": "_userAuth",
"type": "tuple"
} }
], ],
"name": "getPrediction", "name": "getPrediction",
@ -1311,11 +1329,11 @@
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "blocknum", "name": "epoch_start",
"type": "uint256" "type": "uint256"
} }
], ],
"name": "getSubscriptionRevenueAtBlock", "name": "getsubscriptionRevenueAtEpoch",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
@ -1533,7 +1551,7 @@
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "blocknum", "name": "epoch_start",
"type": "uint256" "type": "uint256"
}, },
{ {
@ -1593,26 +1611,7 @@
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "blocknum", "name": "epoch_start",
"type": "uint256"
}
],
"name": "railBlocknumToSlot",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "blocknum",
"type": "uint256" "type": "uint256"
} }
], ],
@ -1648,14 +1647,40 @@
"type": "function" "type": "function"
}, },
{ {
"inputs": [ "inputs": [],
"name": "secondsPerEpoch",
"outputs": [
{ {
"internalType": "bytes", "internalType": "uint256",
"name": "_value", "name": "",
"type": "bytes" "type": "uint256"
} }
], ],
"name": "setData", "stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "secondsPerSubscription",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newFeeCollector",
"type": "address"
}
],
"name": "setFeeCollector",
"outputs": [], "outputs": [],
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"type": "function" "type": "function"
@ -1700,11 +1725,11 @@
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "prediction_block", "name": "prediction_ts",
"type": "uint256" "type": "uint256"
} }
], ],
"name": "soonestBlockToPredict", "name": "soonestEpochToPredict",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
@ -1829,7 +1854,7 @@
}, },
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "blocknum", "name": "epoch_start",
"type": "uint256" "type": "uint256"
} }
], ],
@ -1842,7 +1867,7 @@
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "blocknum", "name": "epoch_start",
"type": "uint256" "type": "uint256"
}, },
{ {
@ -1870,7 +1895,7 @@
"inputs": [ "inputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "blocknum", "name": "epoch_start",
"type": "uint256" "type": "uint256"
}, },
{ {
@ -1927,6 +1952,25 @@
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{
"inputs": [
{
"internalType": "uint256",
"name": "_timestamp",
"type": "uint256"
}
],
"name": "toEpochStart",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{ {
"inputs": [], "inputs": [],
"name": "totalSupply", "name": "totalSupply",
@ -1995,7 +2039,7 @@
}, },
{ {
"inputs": [], "inputs": [],
"name": "trueValSubmitTimeoutBlock", "name": "trueValSubmitTimeout",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
@ -2027,11 +2071,6 @@
}, },
{ {
"inputs": [ "inputs": [
{
"internalType": "uint256",
"name": "s_per_block",
"type": "uint256"
},
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "s_per_subscription", "name": "s_per_subscription",

View File

@ -742,7 +742,7 @@ type PredictSettingUpdate @entity{
predictContract: PredictContract! predictContract: PredictContract!
secondsPerEpoch: BigInt! secondsPerEpoch: BigInt!
secondsPerSubscription: BigInt! secondsPerSubscription: BigInt!
truevalSubmitTimeoutBlock: BigInt! truevalSubmitTimeout: BigInt!
stakeToken: Token stakeToken: Token
"txId" "txId"
txId: String txId: String
@ -759,7 +759,7 @@ type PredictContract @entity{
subscriptions: [PredictSubscription!] @derivedFrom(field: "predictContract") subscriptions: [PredictSubscription!] @derivedFrom(field: "predictContract")
secondsPerEpoch: BigInt! secondsPerEpoch: BigInt!
secondsPerSubscription: BigInt! secondsPerSubscription: BigInt!
truevalSubmitTimeoutBlock: BigInt! truevalSubmitTimeout: BigInt!
stakeToken: Token stakeToken: Token
"creation txId" "creation txId"
txId: String txId: String

View File

@ -134,9 +134,9 @@ export function createPredictContract(address: Address): PredictContract {
const predictContract = new PredictContract(address.toHexString()) const predictContract = new PredictContract(address.toHexString())
const token = getToken(address, true) const token = getToken(address, true)
predictContract.token = token.id predictContract.token = token.id
predictContract.blocksPerEpoch = BigInt.zero() predictContract.secondsPerEpoch = BigInt.zero()
predictContract.blocksPerSubscription = BigInt.zero() predictContract.secondsPerSubscription = BigInt.zero()
predictContract.truevalSubmitTimeoutBlock = BigInt.zero() predictContract.truevalSubmitTimeout = BigInt.zero()
predictContract.stakeToken = null predictContract.stakeToken = null
predictContract.txId = '' predictContract.txId = ''
predictContract.timestamp = 0 predictContract.timestamp = 0