@parifi/sdk
Version:
Parifi SDK with common utility functions
42 lines • 1.18 kB
JavaScript
// src/utils/subgraph-helper.ts
import { ethers } from "ethers";
import { contracts } from "@parifi/references";
var subgraphHelperAbi = [
{
anonymous: false,
inputs: [{ indexed: false, internalType: "bytes32[]", name: "orderIds", type: "bytes32[]" }],
name: "OrderUpdateRequest",
type: "event"
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: "bytes32[]", name: "positionIds", type: "bytes32[]" }],
name: "PositionUpdateRequest",
type: "event"
},
{
inputs: [{ internalType: "bytes32[]", name: "orderIds", type: "bytes32[]" }],
name: "triggerOrderUpdate",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [{ internalType: "bytes32[]", name: "positionIds", type: "bytes32[]" }],
name: "triggerPositionUpdate",
outputs: [],
stateMutability: "nonpayable",
type: "function"
}
];
var getSubgraphHelperInstance = (chain) => {
try {
return new ethers.Contract(contracts[42161].SubgraphHelper.address, subgraphHelperAbi);
} catch (error) {
throw error;
}
};
export {
getSubgraphHelperInstance
};
//# sourceMappingURL=subgraph-helper.mjs.map