Comparing version 1.3.7 to 1.3.8
@@ -5,17 +5,6 @@ export declare const zkETHABI: ({ | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
anonymous?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
inputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
anonymous?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
anonymous: boolean; | ||
@@ -58,4 +47,4 @@ inputs: { | ||
inputs?: undefined; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
anonymous?: undefined; | ||
outputs?: undefined; | ||
@@ -67,7 +56,9 @@ })[]; | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
anonymous?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
anonymous: boolean; | ||
inputs: { | ||
indexed: boolean; | ||
internalType: string; | ||
@@ -80,18 +71,10 @@ name: string; | ||
stateMutability?: undefined; | ||
anonymous?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
anonymous: boolean; | ||
inputs: { | ||
indexed: boolean; | ||
inputs: ({ | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
inputs: ({ | ||
components?: undefined; | ||
} | { | ||
components: ({ | ||
@@ -115,10 +98,25 @@ internalType: string; | ||
type: string; | ||
} | { | ||
})[]; | ||
name: string; | ||
outputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
})[]; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | { | ||
inputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
internalType: string; | ||
@@ -125,0 +123,0 @@ name: string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ERC20ABI = exports.zkETHRelayerABI = exports.zkETHABI = void 0; | ||
exports.zkETHABI = [ | ||
{ | ||
"inputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "target", | ||
"type": "address" | ||
} | ||
], | ||
"name": "AddressEmptyCode", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "account", | ||
"type": "address" | ||
} | ||
], | ||
"name": "AddressInsufficientBalance", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "FailedInnerCall", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "InvalidInitialization", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "NotInitializing", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "owner", | ||
"type": "address" | ||
} | ||
], | ||
"name": "OwnableInvalidOwner", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "account", | ||
"type": "address" | ||
} | ||
], | ||
"name": "OwnableUnauthorizedAccount", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "token", | ||
"type": "address" | ||
} | ||
], | ||
"name": "SafeERC20FailedOperation", | ||
"type": "error" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "token", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "from", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "onBehalfOf", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint248", | ||
"name": "amount", | ||
"type": "uint248" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint248", | ||
"name": "queryId", | ||
"type": "uint248" | ||
} | ||
], | ||
"name": "DepositERC20Received", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "from", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "onBehalfOf", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint248", | ||
"name": "amount", | ||
"type": "uint248" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint248", | ||
"name": "queryId", | ||
"type": "uint248" | ||
} | ||
], | ||
"name": "DepositNativeReceived", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "uint64", | ||
"name": "version", | ||
"type": "uint64" | ||
} | ||
], | ||
"name": "Initialized", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "previousOwner", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "newOwner", | ||
"type": "address" | ||
} | ||
], | ||
"name": "OwnershipTransferred", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "token", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "to", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint248", | ||
"name": "amount", | ||
"type": "uint248" | ||
} | ||
], | ||
"name": "Withdrawal", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "tokenAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "from", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint248", | ||
"name": "amount", | ||
"type": "uint248" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "onBehalfOf", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint248", | ||
"name": "queryId", | ||
"type": "uint248" | ||
} | ||
], | ||
"name": "depositERC20", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "onBehalfOf", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint248", | ||
"name": "queryId", | ||
"type": "uint248" | ||
} | ||
], | ||
"name": "depositNative", | ||
"outputs": [], | ||
"stateMutability": "payable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "initialize", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "owner", | ||
"outputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "renounceOwnership", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "newOwner", | ||
"type": "address" | ||
} | ||
], | ||
"name": "transferOwnership", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "token", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "to", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint248", | ||
"name": "amount", | ||
"type": "uint248" | ||
} | ||
], | ||
"name": "withdraw", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"stateMutability": "payable", | ||
"type": "receive" | ||
} | ||
]; | ||
exports.zkETHRelayerABI = [ | ||
{ | ||
"inputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "ECDSAInvalidSignature", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "length", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "ECDSAInvalidSignatureLength", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "s", | ||
"type": "bytes32" | ||
} | ||
], | ||
"name": "ECDSAInvalidSignatureS", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "InvalidInitialization", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "NotInitializing", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "owner", | ||
"type": "address" | ||
} | ||
], | ||
"name": "OwnableInvalidOwner", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "account", | ||
"type": "address" | ||
} | ||
], | ||
"name": "OwnableUnauthorizedAccount", | ||
"type": "error" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [], | ||
"name": "EIP712DomainChanged", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "uint64", | ||
"name": "version", | ||
"type": "uint64" | ||
} | ||
], | ||
"name": "Initialized", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "previousOwner", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "newOwner", | ||
"type": "address" | ||
} | ||
], | ||
"name": "OwnershipTransferred", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "uint248", | ||
"name": "queryId", | ||
"type": "uint248" | ||
} | ||
], | ||
"name": "QueryFulfilled", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "uint248", | ||
"name": "queryId", | ||
"type": "uint248" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "sender", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "string", | ||
"name": "queryString", | ||
"type": "string" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes", | ||
"name": "queryParamsblob", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint248", | ||
"name": "timeout", | ||
"type": "uint248" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "address", | ||
"name": "callbackClientContractAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes", | ||
"name": "callbackData", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes32", | ||
"name": "queryHash", | ||
"type": "bytes32" | ||
} | ||
], | ||
"name": "QueryReceived", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "verifier", | ||
"type": "address" | ||
} | ||
], | ||
"name": "VerifierAdded", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "verifier", | ||
"type": "address" | ||
} | ||
], | ||
"name": "VerifierRemoved", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "verifier", | ||
"type": "address" | ||
} | ||
], | ||
"name": "addVerifier", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "eip712Domain", | ||
"outputs": [ | ||
{ | ||
"internalType": "bytes1", | ||
"name": "fields", | ||
"type": "bytes1" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "name", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "version", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "chainId", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "verifyingContract", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "salt", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint256[]", | ||
"name": "extensions", | ||
"type": "uint256[]" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "string", | ||
"name": "name", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "solidityType", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "values", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct CommonStructs.Column", | ||
"name": "col", | ||
"type": "tuple" | ||
} | ||
], | ||
"name": "encodeColumn", | ||
"outputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "", | ||
"type": "bytes32" | ||
} | ||
], | ||
"stateMutability": "pure", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "queryHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "executionTimestamp", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "string", | ||
"name": "name", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "solidityType", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "values", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct CommonStructs.Column[]", | ||
"name": "columns", | ||
"type": "tuple[]" | ||
} | ||
], | ||
"internalType": "struct CommonStructs.QueryResult", | ||
"name": "queryResult", | ||
"type": "tuple" | ||
} | ||
], | ||
"name": "encodeQueryResult", | ||
"outputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "", | ||
"type": "bytes32" | ||
} | ||
], | ||
"stateMutability": "pure", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "initialize", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "verifier", | ||
"type": "address" | ||
} | ||
], | ||
"name": "isVerifier", | ||
"outputs": [ | ||
{ | ||
"internalType": "bool", | ||
"name": "", | ||
"type": "bool" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "latestQueryId", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint248", | ||
"name": "", | ||
"type": "uint248" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "owner", | ||
"outputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "string", | ||
"name": "queryString", | ||
"type": "string" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "string", | ||
"name": "solidityType", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "value", | ||
"type": "bytes" | ||
} | ||
], | ||
"internalType": "struct CommonStructs.QueryParameter[]", | ||
"name": "queryParameters", | ||
"type": "tuple[]" | ||
}, | ||
{ | ||
"internalType": "uint248", | ||
"name": "timeout", | ||
"type": "uint248" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "callbackClientContractAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "callbackData", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "query", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint248", | ||
"name": "", | ||
"type": "uint248" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint248", | ||
"name": "", | ||
"type": "uint248" | ||
} | ||
], | ||
"name": "queryHashes", | ||
"outputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "", | ||
"type": "bytes32" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "tokenAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint248", | ||
"name": "amount", | ||
"type": "uint248" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "queryString", | ||
"type": "string" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "string", | ||
"name": "solidityType", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "value", | ||
"type": "bytes" | ||
} | ||
], | ||
"internalType": "struct CommonStructs.QueryParameter[]", | ||
"name": "queryParameters", | ||
"type": "tuple[]" | ||
}, | ||
{ | ||
"internalType": "uint248", | ||
"name": "timeout", | ||
"type": "uint248" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "callbackClientContractAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "callbackData", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "queryWithERC20", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint248", | ||
"name": "", | ||
"type": "uint248" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "string", | ||
"name": "queryString", | ||
"type": "string" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "string", | ||
"name": "solidityType", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "value", | ||
"type": "bytes" | ||
} | ||
], | ||
"internalType": "struct CommonStructs.QueryParameter[]", | ||
"name": "queryParameters", | ||
"type": "tuple[]" | ||
}, | ||
{ | ||
"internalType": "uint248", | ||
"name": "timeout", | ||
"type": "uint248" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "callbackClientContractAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "callbackData", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "queryWithNative", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint248", | ||
"name": "", | ||
"type": "uint248" | ||
} | ||
], | ||
"stateMutability": "payable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "verifier", | ||
"type": "address" | ||
} | ||
], | ||
"name": "removeVerifier", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "renounceOwnership", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint248", | ||
"name": "queryId", | ||
"type": "uint248" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "queryString", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "queryParamsblob", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "uint248", | ||
"name": "timeout", | ||
"type": "uint248" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "callbackAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "callbackData", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "queryHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "executionTimestamp", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "string", | ||
"name": "name", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "solidityType", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "values", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct CommonStructs.Column[]", | ||
"name": "columns", | ||
"type": "tuple[]" | ||
} | ||
], | ||
"internalType": "struct CommonStructs.QueryResult", | ||
"name": "queryResult", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "signature", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"internalType": "uint248", | ||
"name": "gasLimit", | ||
"type": "uint248" | ||
} | ||
], | ||
"name": "sendResults", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "_zkETHAddress", | ||
"type": "address" | ||
} | ||
], | ||
"name": "setZkETHContractAddress", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "newOwner", | ||
"type": "address" | ||
} | ||
], | ||
"name": "transferOwnership", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "", | ||
"type": "address" | ||
} | ||
], | ||
"name": "verifiers", | ||
"outputs": [ | ||
{ | ||
"internalType": "bool", | ||
"name": "", | ||
"type": "bool" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "queryHash", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "executionTimestamp", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "string", | ||
"name": "name", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "solidityType", | ||
"type": "string" | ||
}, | ||
{ | ||
"internalType": "bytes[]", | ||
"name": "values", | ||
"type": "bytes[]" | ||
} | ||
], | ||
"internalType": "struct CommonStructs.Column[]", | ||
"name": "columns", | ||
"type": "tuple[]" | ||
} | ||
], | ||
"internalType": "struct CommonStructs.QueryResult", | ||
"name": "queryResult", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "signature", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "verify", | ||
"outputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "zkETHContractAddress", | ||
"outputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
} | ||
]; | ||
exports.zkETHABI = [{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "token", "type": "address" }, { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "onBehalfOf", "type": "address" }, { "indexed": false, "internalType": "uint248", "name": "amount", "type": "uint248" }], "name": "DepositERC20Received", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "onBehalfOf", "type": "address" }, { "indexed": false, "internalType": "uint248", "name": "amount", "type": "uint248" }], "name": "DepositNativeReceived", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "token", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint248", "name": "amount", "type": "uint248" }], "name": "Withdrawal", "type": "event" }, { "inputs": [{ "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "uint248", "name": "amount", "type": "uint248" }, { "internalType": "address", "name": "onBehalfOf", "type": "address" }], "name": "depositERC20", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "onBehalfOf", "type": "address" }], "name": "depositNative", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint248", "name": "amount", "type": "uint248" }], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "stateMutability": "payable", "type": "receive" }]; | ||
exports.zkETHRelayerABI = [{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [], "name": "EIP712DomainChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint248", "name": "amount", "type": "uint248" }, { "indexed": true, "internalType": "address", "name": "source", "type": "address" }], "name": "NewQueryPayment", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "token", "type": "address" }, { "indexed": true, "internalType": "address", "name": "source", "type": "address" }, { "indexed": false, "internalType": "uint248", "name": "amount", "type": "uint248" }], "name": "PaymentRefunded", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint248", "name": "usedAmount", "type": "uint248" }, { "indexed": false, "internalType": "uint248", "name": "remainingAmount", "type": "uint248" }], "name": "PaymentSettled", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }], "name": "QueryCanceled", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint8", "name": "code", "type": "uint8" }, { "indexed": false, "internalType": "string", "name": "message", "type": "string" }], "name": "QueryErrorHandled", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }], "name": "QueryFulfilled", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint128", "name": "queryId", "type": "uint128" }, { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "string", "name": "queryString", "type": "string" }, { "indexed": false, "internalType": "uint8", "name": "queryType", "type": "uint8" }, { "indexed": false, "internalType": "bytes", "name": "queryParamsblob", "type": "bytes" }, { "indexed": false, "internalType": "uint64", "name": "timeout", "type": "uint64" }, { "indexed": false, "internalType": "address", "name": "callbackClientContractAddress", "type": "address" }, { "indexed": false, "internalType": "uint64", "name": "callbackGasLimit", "type": "uint64" }, { "indexed": false, "internalType": "bytes", "name": "callbackData", "type": "bytes" }, { "indexed": false, "internalType": "bool", "name": "zkProven", "type": "bool" }, { "indexed": false, "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }], "name": "QueryReceived", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }], "name": "TrustedRelayerAdded", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }], "name": "TrustedRelayerRemoved", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "verifier", "type": "address" }], "name": "VerifierAdded", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "verifier", "type": "address" }], "name": "VerifierRemoved", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "newAddress", "type": "address" }], "name": "ZkETHContractAddressUpdated", "type": "event" }, { "inputs": [{ "internalType": "address", "name": "relayer", "type": "address" }], "name": "addTrustedRelayer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "verifier", "type": "address" }], "name": "addVerifier", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }], "name": "cancelQueryPayment", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "eip712Domain", "outputs": [{ "internalType": "bytes1", "name": "fields", "type": "bytes1" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "version", "type": "string" }, { "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "verifyingContract", "type": "address" }, { "internalType": "bytes32", "name": "salt", "type": "bytes32" }, { "internalType": "uint256[]", "name": "extensions", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "solidityType", "type": "string" }, { "internalType": "bytes[]", "name": "values", "type": "bytes[]" }], "internalType": "struct CommonStructs.Column", "name": "col", "type": "tuple" }], "name": "encodeColumn", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "internalType": "uint64", "name": "executionTimestamp", "type": "uint64" }, { "components": [{ "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "solidityType", "type": "string" }, { "internalType": "bytes[]", "name": "values", "type": "bytes[]" }], "internalType": "struct CommonStructs.Column[]", "name": "columns", "type": "tuple[]" }], "internalType": "struct CommonStructs.QueryResult", "name": "queryResult", "type": "tuple" }], "name": "encodeQueryResult", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "uint128", "name": "queryId", "type": "uint128" }, { "components": [{ "internalType": "string", "name": "queryString", "type": "string" }, { "internalType": "uint8", "name": "queryType", "type": "uint8" }, { "components": [{ "internalType": "string", "name": "solidityType", "type": "string" }, { "internalType": "bytes", "name": "value", "type": "bytes" }], "internalType": "struct CommonStructs.QueryParameter[]", "name": "queryParameters", "type": "tuple[]" }, { "internalType": "uint64", "name": "timeout", "type": "uint64" }, { "internalType": "address", "name": "callbackClientContractAddress", "type": "address" }, { "internalType": "uint64", "name": "callbackGasLimit", "type": "uint64" }, { "internalType": "bytes", "name": "callbackData", "type": "bytes" }, { "internalType": "bool", "name": "zkProven", "type": "bool" }], "internalType": "struct CommonStructs.QueryData", "name": "queryData", "type": "tuple" }, { "components": [{ "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "internalType": "uint64", "name": "executionTimestamp", "type": "uint64" }, { "components": [{ "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "solidityType", "type": "string" }, { "internalType": "bytes[]", "name": "values", "type": "bytes[]" }], "internalType": "struct CommonStructs.Column[]", "name": "columns", "type": "tuple[]" }], "internalType": "struct CommonStructs.QueryResult", "name": "queryResult", "type": "tuple" }, { "internalType": "bytes", "name": "verificationSignature", "type": "bytes" }, { "internalType": "uint248", "name": "costAmountInPaymentToken", "type": "uint248" }, { "components": [{ "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "internalType": "uint8", "name": "code", "type": "uint8" }, { "internalType": "string", "name": "message", "type": "string" }], "internalType": "struct CommonStructs.ZkETHError", "name": "error", "type": "tuple" }], "name": "fulfillQuery", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint128", "name": "queryId", "type": "uint128" }, { "components": [{ "internalType": "string", "name": "queryString", "type": "string" }, { "internalType": "uint8", "name": "queryType", "type": "uint8" }, { "components": [{ "internalType": "string", "name": "solidityType", "type": "string" }, { "internalType": "bytes", "name": "value", "type": "bytes" }], "internalType": "struct CommonStructs.QueryParameter[]", "name": "queryParameters", "type": "tuple[]" }, { "internalType": "uint64", "name": "timeout", "type": "uint64" }, { "internalType": "address", "name": "callbackClientContractAddress", "type": "address" }, { "internalType": "uint64", "name": "callbackGasLimit", "type": "uint64" }, { "internalType": "bytes", "name": "callbackData", "type": "bytes" }, { "internalType": "bool", "name": "zkProven", "type": "bool" }], "internalType": "struct CommonStructs.QueryData", "name": "queryData", "type": "tuple" }], "name": "generateQueryHash", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }], "name": "getQueryPaymentByQueryHash", "outputs": [{ "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint248", "name": "amount", "type": "uint248" }, { "internalType": "address", "name": "source", "type": "address" }], "internalType": "struct CommonStructs.QueryPayment", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "relayer", "type": "address" }], "name": "isTrustedRelayer", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "verifier", "type": "address" }], "name": "isVerifier", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestQueryId", "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "string", "name": "queryString", "type": "string" }, { "internalType": "uint8", "name": "queryType", "type": "uint8" }, { "components": [{ "internalType": "string", "name": "solidityType", "type": "string" }, { "internalType": "bytes", "name": "value", "type": "bytes" }], "internalType": "struct CommonStructs.QueryParameter[]", "name": "queryParameters", "type": "tuple[]" }, { "internalType": "uint64", "name": "timeout", "type": "uint64" }, { "internalType": "address", "name": "callbackClientContractAddress", "type": "address" }, { "internalType": "uint64", "name": "callbackGasLimit", "type": "uint64" }, { "internalType": "bytes", "name": "callbackData", "type": "bytes" }, { "internalType": "bool", "name": "zkProven", "type": "bool" }], "internalType": "struct CommonStructs.QueryData", "name": "queryData", "type": "tuple" }], "name": "query", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "name": "queryIds", "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "name": "queryPayments", "outputs": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint248", "name": "amount", "type": "uint248" }, { "internalType": "address", "name": "source", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "uint248", "name": "amount", "type": "uint248" }, { "components": [{ "internalType": "string", "name": "queryString", "type": "string" }, { "internalType": "uint8", "name": "queryType", "type": "uint8" }, { "components": [{ "internalType": "string", "name": "solidityType", "type": "string" }, { "internalType": "bytes", "name": "value", "type": "bytes" }], "internalType": "struct CommonStructs.QueryParameter[]", "name": "queryParameters", "type": "tuple[]" }, { "internalType": "uint64", "name": "timeout", "type": "uint64" }, { "internalType": "address", "name": "callbackClientContractAddress", "type": "address" }, { "internalType": "uint64", "name": "callbackGasLimit", "type": "uint64" }, { "internalType": "bytes", "name": "callbackData", "type": "bytes" }, { "internalType": "bool", "name": "zkProven", "type": "bool" }], "internalType": "struct CommonStructs.QueryData", "name": "queryData", "type": "tuple" }], "name": "queryWithERC20", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "string", "name": "queryString", "type": "string" }, { "internalType": "uint8", "name": "queryType", "type": "uint8" }, { "components": [{ "internalType": "string", "name": "solidityType", "type": "string" }, { "internalType": "bytes", "name": "value", "type": "bytes" }], "internalType": "struct CommonStructs.QueryParameter[]", "name": "queryParameters", "type": "tuple[]" }, { "internalType": "uint64", "name": "timeout", "type": "uint64" }, { "internalType": "address", "name": "callbackClientContractAddress", "type": "address" }, { "internalType": "uint64", "name": "callbackGasLimit", "type": "uint64" }, { "internalType": "bytes", "name": "callbackData", "type": "bytes" }, { "internalType": "bool", "name": "zkProven", "type": "bool" }], "internalType": "struct CommonStructs.QueryData", "name": "queryData", "type": "tuple" }], "name": "queryWithNative", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "payable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "relayer", "type": "address" }], "name": "removeTrustedRelayer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "verifier", "type": "address" }], "name": "removeVerifier", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_zkETHAddress", "type": "address" }], "name": "setZkETHContractAddress", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "trustedRelayers", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "verifiers", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "internalType": "uint64", "name": "executionTimestamp", "type": "uint64" }, { "components": [{ "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "solidityType", "type": "string" }, { "internalType": "bytes[]", "name": "values", "type": "bytes[]" }], "internalType": "struct CommonStructs.Column[]", "name": "columns", "type": "tuple[]" }], "internalType": "struct CommonStructs.QueryResult", "name": "queryResult", "type": "tuple" }, { "internalType": "bytes", "name": "signature", "type": "bytes" }], "name": "verify", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "zkETHContractAddress", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }]; | ||
exports.ERC20ABI = [{ "inputs": [{ "internalType": "string", "name": "name_", "type": "string" }, { "internalType": "string", "name": "symbol_", "type": "string" }, { "internalType": "uint8", "name": "decimals_", "type": "uint8" }, { "internalType": "address", "name": "childChainManager", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "userAddress", "type": "address" }, { "indexed": false, "internalType": "address payable", "name": "relayerAddress", "type": "address" }, { "indexed": false, "internalType": "bytes", "name": "functionSignature", "type": "bytes" }], "name": "MetaTransactionExecuted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" }, { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" }], "name": "RoleAdminChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }], "name": "RoleGranted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }], "name": "RoleRevoked", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }], "name": "Transfer", "type": "event" }, { "inputs": [], "name": "CHILD_CHAIN_ID", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "CHILD_CHAIN_ID_BYTES", "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "DEFAULT_ADMIN_ROLE", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "DEPOSITOR_ROLE", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ERC712_VERSION", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ROOT_CHAIN_ID", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ROOT_CHAIN_ID_BYTES", "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" }], "name": "allowance", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "approve", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], "name": "balanceOf", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" }], "name": "decreaseAllowance", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "bytes", "name": "depositData", "type": "bytes" }], "name": "deposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "userAddress", "type": "address" }, { "internalType": "bytes", "name": "functionSignature", "type": "bytes" }, { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, { "internalType": "uint8", "name": "sigV", "type": "uint8" }], "name": "executeMetaTransaction", "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "getChainId", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "getDomainSeperator", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], "name": "getNonce", "outputs": [{ "internalType": "uint256", "name": "nonce", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], "name": "getRoleAdmin", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "getRoleMember", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], "name": "getRoleMemberCount", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" }], "name": "grantRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" }], "name": "hasRole", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "addedValue", "type": "uint256" }], "name": "increaseAllowance", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "name", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" }], "name": "renounceRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "account", "type": "address" }], "name": "revokeRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "transfer", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "transferFrom", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }]; |
@@ -1,2 +0,2 @@ | ||
export declare const supportedChains: readonly ["1", "137", "17000"]; | ||
export declare const supportedChains: readonly ["1", "137", "17000", "300", "324"]; | ||
export type SupportedChain = typeof supportedChains[number]; | ||
@@ -3,0 +3,0 @@ export declare const zkETHContractItem: readonly ["zkETH", "zkETHRelayer"]; |
@@ -11,3 +11,5 @@ "use strict"; | ||
'137', // polygon | ||
'17000' // holesky | ||
'17000', // holesky | ||
'300', // zksyncSepolia | ||
'324' // zkSyncEraMainnet | ||
]; | ||
@@ -35,2 +37,14 @@ exports.zkETHContractItem = ["zkETH", "zkETHRelayer"]; | ||
}, | ||
300: { | ||
usdt: '0x6d209e78033c4AC7fC7317ae9ff9a3a2E68B8b88', | ||
usdc: '0x6d209e78033c4AC7fC7317ae9ff9a3a2E68B8b88', | ||
link: '0x6d209e78033c4AC7fC7317ae9ff9a3a2E68B8b88', | ||
wsteth: '0x6d209e78033c4AC7fC7317ae9ff9a3a2E68B8b88' | ||
}, | ||
324: { | ||
usdt: '0x493257fD37EDB34451f62EDf8D2a0C418852bA4C', | ||
usdc: '0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4', | ||
link: '0x082faDe8b84B18C441d506e1D3a43a387Cc59D20', | ||
wsteth: '0xCafB42a2654C20cb3739F04243E925aa47302bec' | ||
} | ||
}; | ||
@@ -69,2 +83,10 @@ const tokenListsWithMetadata = Object.fromEntries(Object.entries(tokenLists).map(([chainId, tokens]) => [ | ||
}, | ||
300: { | ||
zkETH: "0xC936F75184909E90F80796797FA1541da70B2175", | ||
zkETHRelayer: "0x3857084C6518aA51653FfE2B07A237Db8BbAcaB4", | ||
}, | ||
324: { | ||
zkETH: "0xF2d254A5b1904E2aa11E0637C181A0dbe3de78cE", | ||
zkETHRelayer: "0x6A283250cC1152c9b1466DDf2179A19e604fEe5E", | ||
}, | ||
}; | ||
@@ -71,0 +93,0 @@ const getTokenList = (chainId) => { |
@@ -19,8 +19,8 @@ import { ethers } from "ethers"; | ||
getTokenContract: (token: TokenName) => Promise<ethers.Contract>; | ||
depositNative: (amountInWei: bigint, onBehalfOf: string, queryId?: number) => Promise<any>; | ||
depositNative: (amountInWei: bigint, onBehalfOf: string) => Promise<any>; | ||
approve: (token: TokenName, amount: bigint) => Promise<any>; | ||
allowance: (token: TokenName) => Promise<bigint>; | ||
revokeApprove: (token: TokenName) => Promise<any>; | ||
depositTokens: (token: TokenName, amount: bigint, onBehalfOf: string, queryId?: number) => Promise<any>; | ||
depositTokens: (token: TokenName, amount: bigint, onBehalfOf: string) => Promise<any>; | ||
authentication: (baseUrl: string, secretsProxyUrl: string) => Authentication; | ||
} |
@@ -40,6 +40,5 @@ "use strict"; | ||
}); | ||
this.depositNative = (amountInWei, onBehalfOf, queryId) => __awaiter(this, void 0, void 0, function* () { | ||
queryId = queryId !== null && queryId !== void 0 ? queryId : 0; | ||
this.depositNative = (amountInWei, onBehalfOf) => __awaiter(this, void 0, void 0, function* () { | ||
const zkETH = yield this.getZkETHContract(); | ||
const tx = yield zkETH.depositNative(onBehalfOf, queryId, { | ||
const tx = yield zkETH.depositNative(onBehalfOf, { | ||
value: amountInWei, | ||
@@ -63,8 +62,7 @@ }); | ||
}); | ||
this.depositTokens = (token, amount, onBehalfOf, queryId) => __awaiter(this, void 0, void 0, function* () { | ||
queryId = queryId !== null && queryId !== void 0 ? queryId : 0; | ||
this.depositTokens = (token, amount, onBehalfOf) => __awaiter(this, void 0, void 0, function* () { | ||
const tokenAddress = this.getTokenAddress(token); | ||
const zkETH = yield this.getZkETHContract(); | ||
const from = yield this.signer.getAddress(); | ||
const tx = yield zkETH.depositERC20(tokenAddress, from, amount, onBehalfOf, queryId); | ||
const tx = yield zkETH.depositERC20(tokenAddress, from, amount, onBehalfOf); | ||
return tx; | ||
@@ -71,0 +69,0 @@ }); |
{ | ||
"name": "zkt-sdk", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"description": "zkToken | JS SDK", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -33,3 +33,3 @@ # zkt-sdk | ||
// Define the chain ID (e.g., 17000 for holesky) | ||
const zkEth = new ZkEth(signer, '17000'); // holesky | ||
const zkEth = new ZkEth(signer, 17000); // holesky | ||
@@ -155,4 +155,3 @@ try { | ||
amountInWei: bigint, | ||
onBehalfOf: string, | ||
queryId?: number | ||
onBehalfOf: string | ||
): Promise<any> | ||
@@ -165,3 +164,2 @@ ``` | ||
onBehalfOf: The address on whose behalf the deposit is made. | ||
queryId: (Optional) A query ID for tracking purposes. | ||
@@ -187,2 +185,11 @@ - approve | ||
- allowance | ||
```ts | ||
async allowance(token: TokenName): Promise<any> | ||
get the allowed amount for the zkETH contract to spend on specified token. | ||
``` | ||
token: The name of the token. | ||
- depositTokens | ||
@@ -194,4 +201,3 @@ | ||
amount: bigint, | ||
onBehalfOf: string, | ||
queryId?: number | ||
onBehalfOf: string | ||
): Promise<any> | ||
@@ -205,3 +211,2 @@ ``` | ||
onBehalfOf: The address on whose behalf the deposit is made. | ||
queryId: (Optional) A query ID for tracking purposes. | ||
@@ -208,0 +213,0 @@ # Development |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
220
66407
744
1