new: added hermoine version of the exit ERC1155 functions
MODIFY
src/index.ts
src/index.ts
@@ -281,7 +281,12 @@ export class MaticPOSClient extends SDKClient {
if (options && !options.from) {
throw new Error(`options.from is missing`)
}
+
+ if (options && options.legacyProof) {
return this.posRootChainManager.exitSingleERC1155(txHash, options)
+ } else {
+ return this.posRootChainManager.exitSingleERC1155Hermoine(txHash, options)
+ }
}
isSingleERC1155ExitProcessed(txHash: string) {
@@ -298,7 +303,12 @@ export class MaticPOSClient extends SDKClient {
if (options && !options.from) {
throw new Error(`options.from is missing`)
}
+
+ if (options && options.legacyProof) {
return this.posRootChainManager.exitBatchERC1155(txHash, options)
+ } else {
+ return this.posRootChainManager.exitBatchERC1155Hermoine(txHash, options)
+ }
}
isBatchERC1155ExitProcessed(txHash: string) {

MODIFY
src/root/POSRootChainManager.ts
src/root/POSRootChainManager.ts
@@ -349,6 +349,10 @@ export default class POSRootChainManager extends ContractsBase {
return this.exit(burnTxHash, ERC1155_TRANSFER_SINGLE_EVENT_SIG, options)
}
+ async exitSingleERC1155Hermoine(burnTxHash: string, options?: SendOptions) {
+ return this.exitHermoine(burnTxHash, ERC1155_TRANSFER_SINGLE_EVENT_SIG, options)
+ }
+
async isSingleERC1155ExitProcessed(burnTxHash: string) {
return this.isExitProcessed(burnTxHash, ERC1155_TRANSFER_SINGLE_EVENT_SIG)
}
@@ -357,6 +361,10 @@ export default class POSRootChainManager extends ContractsBase {
return this.exit(burnTxHash, ERC1155_TRANSFER_BATCH_EVENT_SIG, options)
}
+ async exitBatchERC1155Hermoine(burnTxHash: string, options?: SendOptions) {
+ return this.exitHermoine(burnTxHash, ERC1155_TRANSFER_BATCH_EVENT_SIG, options)
+ }
+
async isBatchERC1155ExitProcessed(burnTxHash: string) {
return this.isExitProcessed(burnTxHash, ERC1155_TRANSFER_BATCH_EVENT_SIG)
}

new: added hermoine version of the exit ERC1155 functions