@graphprotocol/toolshed
Version:
A collection of tools and utilities for the Graph Protocol Typescript components
18 lines • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateLegacyIndexingDisputeId = generateLegacyIndexingDisputeId;
exports.generateLegacyQueryDisputeId = generateLegacyQueryDisputeId;
exports.generateLegacyTypeDisputeId = generateLegacyTypeDisputeId;
const ethers_1 = require("ethers");
// For disputes in the legacy dispute manager contract
function generateLegacyIndexingDisputeId(allocationId) {
return ethers_1.ethers.solidityPackedKeccak256(['address'], [allocationId]);
}
function generateLegacyQueryDisputeId(queryHash, responseHash, subgraphDeploymentId, indexer, fisherman) {
return ethers_1.ethers.solidityPackedKeccak256(['bytes32', 'bytes32', 'bytes32', 'address', 'address'], [queryHash, responseHash, subgraphDeploymentId, indexer, fisherman]);
}
// For legacy dispute type in dispute manager contract
function generateLegacyTypeDisputeId(allocationId) {
return ethers_1.ethers.solidityPackedKeccak256(['address', 'string'], [allocationId, 'legacy']);
}
//# sourceMappingURL=disputes.js.map