diff --git a/package-lock.json b/package-lock.json index d4f38a2a..9a8d6de8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1488,28 +1488,26 @@ } }, "node_modules/@nomicfoundation/edr": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.3.4.tgz", - "integrity": "sha512-e4jzVeJ+VTKBFzNgKDbSVnGVbHYNZHIfMdgifQBugXPiIa6QEUzZqleh2+y4lhkXcCthnFyrTYe3jiEpUzr3cA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.3.5.tgz", + "integrity": "sha512-dPSM9DuI1sr71gqWUMgLo8MjHQWO4+WNDm3iWaT6P4vUFJReZX5qwA5X+3UwIPBry8GvNY084u7yWUvB3/8rqA==", "engines": { "node": ">= 18" }, "optionalDependencies": { - "@nomicfoundation/edr-darwin-arm64": "0.3.4", - "@nomicfoundation/edr-darwin-x64": "0.3.4", - "@nomicfoundation/edr-linux-arm64-gnu": "0.3.4", - "@nomicfoundation/edr-linux-arm64-musl": "0.3.4", - "@nomicfoundation/edr-linux-x64-gnu": "0.3.4", - "@nomicfoundation/edr-linux-x64-musl": "0.3.4", - "@nomicfoundation/edr-win32-arm64-msvc": "0.3.4", - "@nomicfoundation/edr-win32-ia32-msvc": "0.3.4", - "@nomicfoundation/edr-win32-x64-msvc": "0.3.4" + "@nomicfoundation/edr-darwin-arm64": "0.3.5", + "@nomicfoundation/edr-darwin-x64": "0.3.5", + "@nomicfoundation/edr-linux-arm64-gnu": "0.3.5", + "@nomicfoundation/edr-linux-arm64-musl": "0.3.5", + "@nomicfoundation/edr-linux-x64-gnu": "0.3.5", + "@nomicfoundation/edr-linux-x64-musl": "0.3.5", + "@nomicfoundation/edr-win32-x64-msvc": "0.3.5" } }, "node_modules/@nomicfoundation/edr-darwin-arm64": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.4.tgz", - "integrity": "sha512-tjavrUFLWnkn0PI+jk0D83hP2jjbmeXT1QLd5NtIleyGrJ00ZWVl+sfuA2Lle3kzfOceoI2VTR0n1pZB4KJGbQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.5.tgz", + "integrity": "sha512-gIXUIiPMUy6roLHpNlxf15DumU7/YhffUf7XIB+WUjMecaySfTGyZsTGnCMJZqrDyiYqWPyPKwCV/2u/jqFAUg==", "cpu": [ "arm64" ], @@ -1522,9 +1520,9 @@ } }, "node_modules/@nomicfoundation/edr-darwin-x64": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.3.4.tgz", - "integrity": "sha512-dXO0vlIoBosp8gf5/ah3dESMymjwit0Daef1E4Ew3gZ8q3LAdku0RC+YEQJi9f0I3QNfdgIrBTzibRZUoP+kVA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.3.5.tgz", + "integrity": "sha512-0MrpOCXUK8gmplpYZ2Cy0holHEylvWoNeecFcrP2WJ5DLQzrB23U5JU2MvUzOJ7aL76Za1VXNBWi/UeTWdHM+w==", "cpu": [ "x64" ], @@ -1537,9 +1535,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-arm64-gnu": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.3.4.tgz", - "integrity": "sha512-dv38qmFUaqkkeeA9S0JjerqruytTfHav7gbPLpZUAEXPlJGo49R0+HQxd45I0msbm6NAXbkmKEchTLApp1ohaA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.3.5.tgz", + "integrity": "sha512-aw9f7AZMiY1dZFNePJGKho2k+nEgFgzUAyyukiKfSqUIMXoFXMf1U3Ujv848czrSq9c5XGcdDa2xnEf3daU3xg==", "cpu": [ "arm64" ], @@ -1552,9 +1550,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-arm64-musl": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.3.4.tgz", - "integrity": "sha512-CfEsb6gdCMVIlRSpWYTxoongEKHB60V6alE/y8mkfjIo7tA95wyiuvCtyo3fpiia3wQV7XoMYgIJHObHiKLKtA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.3.5.tgz", + "integrity": "sha512-cVFRQjyABBlsbDj+XTczYBfrCHprZ6YNzN8gGGSqAh+UGIJkAIRomK6ar27GyJLNx3HkgbuDoi/9kA0zOo/95w==", "cpu": [ "arm64" ], @@ -1567,9 +1565,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-x64-gnu": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.3.4.tgz", - "integrity": "sha512-V0CpJA2lYWulgTR+zP11ftBAEwkpMAAki/AuMu3vd7HoPfjwIDzWDQR5KFU17qFmqAVz0ICRxsxDlvvBZ/PUxA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.3.5.tgz", + "integrity": "sha512-CjOg85DfR1Vt0fQWn5U0qi26DATK9tVzo3YOZEyI0JBsnqvk43fUTPv3uUAWBrPIRg5O5kOc9xG13hSpCBBxBg==", "cpu": [ "x64" ], @@ -1582,9 +1580,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-x64-musl": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.3.4.tgz", - "integrity": "sha512-0sgTrwZajarukerU/QSb+oRdlQLnJdd7of8OlXq2wtpeTNTqemgCOwY2l2qImbWboMpVrYgcmGbINXNVPCmuJw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.3.5.tgz", + "integrity": "sha512-hvX8bBGpBydAVevzK8jsu2FlqVZK1RrCyTX6wGHnltgMuBaoGLHYtNHiFpteOaJw2byYMiORc2bvj+98LhJ0Ew==", "cpu": [ "x64" ], @@ -1596,40 +1594,10 @@ "node": ">= 18" } }, - "node_modules/@nomicfoundation/edr-win32-arm64-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-arm64-msvc/-/edr-win32-arm64-msvc-0.3.4.tgz", - "integrity": "sha512-bOl3vhMtV0W9ozUMF5AZRBWw1183hhhx+e1YJdDLMaqNkBUFYi2CZbMYefDylq2OKQtOQ0gPLhZvn+z2D21Ztw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nomicfoundation/edr-win32-ia32-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-ia32-msvc/-/edr-win32-ia32-msvc-0.3.4.tgz", - "integrity": "sha512-yKQCpAX0uB2dalsSwOkau3yfNXkwBJa/Ks2OPl9AjHqJ+E8AqvBEB9jRpfQrdPzElMsgZuN4mqE+wh+JxY+0Aw==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 18" - } - }, "node_modules/@nomicfoundation/edr-win32-x64-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.3.4.tgz", - "integrity": "sha512-fResvsL/fSucep1K5W6iOs8lqqKKovHLsAmigMzAYVovqkyZKgCGVS/D8IVxA0nxuGCOlNxFnVmwWtph3pbKWA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.3.5.tgz", + "integrity": "sha512-IJXjW13DY5UPsx/eG5DGfXtJ7Ydwrvw/BTZ2Y93lRLHzszVpSmeVmlxjZP5IW2afTSgMLaAAsqNw4NhppRGN8A==", "cpu": [ "x64" ], @@ -2138,7 +2106,7 @@ }, "node_modules/@rsksmart/rif-relay-contracts": { "version": "2.1.0-beta.0", - "resolved": "git+ssh://git@github.com/rsksmart/rif-relay-contracts.git#c1ad3c93b53cc01690536075fcef95718ddc4a55", + "resolved": "git+ssh://git@github.com/rsksmart/rif-relay-contracts.git#de10bafbb9a9811df6641c3c247a19870ed209ed", "license": "MIT", "dependencies": { "@metamask/eth-sig-util": "^4.0.1", @@ -2846,9 +2814,9 @@ "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==" }, "node_modules/@types/qs": { - "version": "6.9.14", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.14.tgz", - "integrity": "sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA==" + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" }, "node_modules/@types/range-parser": { "version": "1.2.7", @@ -4975,9 +4943,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.736", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.736.tgz", - "integrity": "sha512-Rer6wc3ynLelKNM4lOCg7/zPQj8tPOCB2hzD32PX9wd3hgRRi9MxEbmkFCokzcEhRVMiOVLjnL9ig9cefJ+6+Q==" + "version": "1.4.737", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.737.tgz", + "integrity": "sha512-QvLTxaLHKdy5YxvixAw/FfHq2eWLUL9KvsPjp0aHK1gI5d3EDuDgITkvj0nFO2c6zUY3ZqVAJQiBYyQP9tQpfw==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -13055,73 +13023,59 @@ } }, "@nomicfoundation/edr": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.3.4.tgz", - "integrity": "sha512-e4jzVeJ+VTKBFzNgKDbSVnGVbHYNZHIfMdgifQBugXPiIa6QEUzZqleh2+y4lhkXcCthnFyrTYe3jiEpUzr3cA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.3.5.tgz", + "integrity": "sha512-dPSM9DuI1sr71gqWUMgLo8MjHQWO4+WNDm3iWaT6P4vUFJReZX5qwA5X+3UwIPBry8GvNY084u7yWUvB3/8rqA==", "requires": { - "@nomicfoundation/edr-darwin-arm64": "0.3.4", - "@nomicfoundation/edr-darwin-x64": "0.3.4", - "@nomicfoundation/edr-linux-arm64-gnu": "0.3.4", - "@nomicfoundation/edr-linux-arm64-musl": "0.3.4", - "@nomicfoundation/edr-linux-x64-gnu": "0.3.4", - "@nomicfoundation/edr-linux-x64-musl": "0.3.4", - "@nomicfoundation/edr-win32-arm64-msvc": "0.3.4", - "@nomicfoundation/edr-win32-ia32-msvc": "0.3.4", - "@nomicfoundation/edr-win32-x64-msvc": "0.3.4" + "@nomicfoundation/edr-darwin-arm64": "0.3.5", + "@nomicfoundation/edr-darwin-x64": "0.3.5", + "@nomicfoundation/edr-linux-arm64-gnu": "0.3.5", + "@nomicfoundation/edr-linux-arm64-musl": "0.3.5", + "@nomicfoundation/edr-linux-x64-gnu": "0.3.5", + "@nomicfoundation/edr-linux-x64-musl": "0.3.5", + "@nomicfoundation/edr-win32-x64-msvc": "0.3.5" } }, "@nomicfoundation/edr-darwin-arm64": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.4.tgz", - "integrity": "sha512-tjavrUFLWnkn0PI+jk0D83hP2jjbmeXT1QLd5NtIleyGrJ00ZWVl+sfuA2Lle3kzfOceoI2VTR0n1pZB4KJGbQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.5.tgz", + "integrity": "sha512-gIXUIiPMUy6roLHpNlxf15DumU7/YhffUf7XIB+WUjMecaySfTGyZsTGnCMJZqrDyiYqWPyPKwCV/2u/jqFAUg==", "optional": true }, "@nomicfoundation/edr-darwin-x64": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.3.4.tgz", - "integrity": "sha512-dXO0vlIoBosp8gf5/ah3dESMymjwit0Daef1E4Ew3gZ8q3LAdku0RC+YEQJi9f0I3QNfdgIrBTzibRZUoP+kVA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.3.5.tgz", + "integrity": "sha512-0MrpOCXUK8gmplpYZ2Cy0holHEylvWoNeecFcrP2WJ5DLQzrB23U5JU2MvUzOJ7aL76Za1VXNBWi/UeTWdHM+w==", "optional": true }, "@nomicfoundation/edr-linux-arm64-gnu": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.3.4.tgz", - "integrity": "sha512-dv38qmFUaqkkeeA9S0JjerqruytTfHav7gbPLpZUAEXPlJGo49R0+HQxd45I0msbm6NAXbkmKEchTLApp1ohaA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.3.5.tgz", + "integrity": "sha512-aw9f7AZMiY1dZFNePJGKho2k+nEgFgzUAyyukiKfSqUIMXoFXMf1U3Ujv848czrSq9c5XGcdDa2xnEf3daU3xg==", "optional": true }, "@nomicfoundation/edr-linux-arm64-musl": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.3.4.tgz", - "integrity": "sha512-CfEsb6gdCMVIlRSpWYTxoongEKHB60V6alE/y8mkfjIo7tA95wyiuvCtyo3fpiia3wQV7XoMYgIJHObHiKLKtA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.3.5.tgz", + "integrity": "sha512-cVFRQjyABBlsbDj+XTczYBfrCHprZ6YNzN8gGGSqAh+UGIJkAIRomK6ar27GyJLNx3HkgbuDoi/9kA0zOo/95w==", "optional": true }, "@nomicfoundation/edr-linux-x64-gnu": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.3.4.tgz", - "integrity": "sha512-V0CpJA2lYWulgTR+zP11ftBAEwkpMAAki/AuMu3vd7HoPfjwIDzWDQR5KFU17qFmqAVz0ICRxsxDlvvBZ/PUxA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.3.5.tgz", + "integrity": "sha512-CjOg85DfR1Vt0fQWn5U0qi26DATK9tVzo3YOZEyI0JBsnqvk43fUTPv3uUAWBrPIRg5O5kOc9xG13hSpCBBxBg==", "optional": true }, "@nomicfoundation/edr-linux-x64-musl": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.3.4.tgz", - "integrity": "sha512-0sgTrwZajarukerU/QSb+oRdlQLnJdd7of8OlXq2wtpeTNTqemgCOwY2l2qImbWboMpVrYgcmGbINXNVPCmuJw==", - "optional": true - }, - "@nomicfoundation/edr-win32-arm64-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-arm64-msvc/-/edr-win32-arm64-msvc-0.3.4.tgz", - "integrity": "sha512-bOl3vhMtV0W9ozUMF5AZRBWw1183hhhx+e1YJdDLMaqNkBUFYi2CZbMYefDylq2OKQtOQ0gPLhZvn+z2D21Ztw==", - "optional": true - }, - "@nomicfoundation/edr-win32-ia32-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-ia32-msvc/-/edr-win32-ia32-msvc-0.3.4.tgz", - "integrity": "sha512-yKQCpAX0uB2dalsSwOkau3yfNXkwBJa/Ks2OPl9AjHqJ+E8AqvBEB9jRpfQrdPzElMsgZuN4mqE+wh+JxY+0Aw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.3.5.tgz", + "integrity": "sha512-hvX8bBGpBydAVevzK8jsu2FlqVZK1RrCyTX6wGHnltgMuBaoGLHYtNHiFpteOaJw2byYMiORc2bvj+98LhJ0Ew==", "optional": true }, "@nomicfoundation/edr-win32-x64-msvc": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.3.4.tgz", - "integrity": "sha512-fResvsL/fSucep1K5W6iOs8lqqKKovHLsAmigMzAYVovqkyZKgCGVS/D8IVxA0nxuGCOlNxFnVmwWtph3pbKWA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.3.5.tgz", + "integrity": "sha512-IJXjW13DY5UPsx/eG5DGfXtJ7Ydwrvw/BTZ2Y93lRLHzszVpSmeVmlxjZP5IW2afTSgMLaAAsqNw4NhppRGN8A==", "optional": true }, "@nomicfoundation/ethereumjs-common": { @@ -13440,7 +13394,7 @@ } }, "@rsksmart/rif-relay-contracts": { - "version": "git+ssh://git@github.com/rsksmart/rif-relay-contracts.git#c1ad3c93b53cc01690536075fcef95718ddc4a55", + "version": "git+ssh://git@github.com/rsksmart/rif-relay-contracts.git#de10bafbb9a9811df6641c3c247a19870ed209ed", "from": "@rsksmart/rif-relay-contracts@github:rsksmart/rif-relay-contracts#RREL-020/insufficient-verification", "requires": { "@metamask/eth-sig-util": "^4.0.1", @@ -14095,9 +14049,9 @@ "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==" }, "@types/qs": { - "version": "6.9.14", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.14.tgz", - "integrity": "sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA==" + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" }, "@types/range-parser": { "version": "1.2.7", @@ -15697,9 +15651,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "electron-to-chromium": { - "version": "1.4.736", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.736.tgz", - "integrity": "sha512-Rer6wc3ynLelKNM4lOCg7/zPQj8tPOCB2hzD32PX9wd3hgRRi9MxEbmkFCokzcEhRVMiOVLjnL9ig9cefJ+6+Q==" + "version": "1.4.737", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.737.tgz", + "integrity": "sha512-QvLTxaLHKdy5YxvixAw/FfHq2eWLUL9KvsPjp0aHK1gI5d3EDuDgITkvj0nFO2c6zUY3ZqVAJQiBYyQP9tQpfw==" }, "elliptic": { "version": "6.5.4", diff --git a/test/RelayHub.test.ts b/test/RelayHub.test.ts index bc8cbc7f..91aebd97 100644 --- a/test/RelayHub.test.ts +++ b/test/RelayHub.test.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { ethers } from 'hardhat'; -import { BigNumber, Wallet, constants, providers, utils } from 'ethers'; +import { BigNumber, Wallet, constants, providers } from 'ethers'; import { UtilToken, SmartWalletFactory, @@ -39,6 +39,7 @@ import { evmMineMany, deployRelayHub, deployContract, + addSwapHash, } from './utils/TestUtils'; import { RelayWorkersAddedEvent } from 'typechain-types/@rsksmart/rif-relay-contracts/contracts/RelayHub'; @@ -1006,32 +1007,13 @@ describe('RelayHub', function () { constants.AddressZero, nextWalletIndex ); - claimedValue = ethers.utils.parseEther('0.5'); - const refundAddress = Wallet.createRandom().address; - const timelock = 500; - const preimageHash = utils.soliditySha256( - ['bytes32'], - [constants.HashZero] - ); - data = swap.interface.encodeFunctionData( - 'claim(bytes32,uint256,address,address,uint256)', - [ - constants.HashZero, - claimedValue, - smartWalletAddress, - refundAddress, - timelock, - ] - ); - const hash = await swap.hashValues( - preimageHash, - claimedValue, - smartWalletAddress, - refundAddress, - timelock - ); - await swap.addSwap(hash); + data = await addSwapHash({ + swap, + amount: claimedValue, + claimAddress: smartWalletAddress, + refundAddress: Wallet.createRandom().address, + }); }); it('should fail if revert from destination contract', async function () { @@ -1223,9 +1205,6 @@ describe('RelayHub', function () { let minimalBoltzFactory: MinimalBoltzSmartWalletFactory; let claimedValue: BigNumber; let smartWalletAddress: string; - const timelock = 500; - let refundAddress: string; - let preimageHash: string; beforeEach(async function () { const smartWalletTemplate = @@ -1248,42 +1227,24 @@ describe('RelayHub', function () { constants.AddressZero, nextWalletIndex ); - - refundAddress = Wallet.createRandom().address; claimedValue = ethers.utils.parseEther('0.5'); - preimageHash = utils.soliditySha256( - ['bytes32'], - [constants.HashZero] - ); - data = swap.interface.encodeFunctionData( - 'claim(bytes32,uint256,address,address,uint256)', - [ - constants.HashZero, - claimedValue, - smartWalletAddress, - refundAddress, - timelock, - ] - ); - const hash = await swap.hashValues( - preimageHash, - claimedValue, - smartWalletAddress, - refundAddress, - timelock - ); - await swap.addSwap(hash); + data = await addSwapHash({ + swap, + amount: claimedValue, + claimAddress: smartWalletAddress, + refundAddress: Wallet.createRandom().address, + }); }); it('should fail if revert from destination contract', async function () { data = swap.interface.encodeFunctionData( 'claim(bytes32,uint256,address,address,uint256)', [ - preimageHash, + constants.HashZero, ethers.utils.parseEther('2'), smartWalletAddress, - refundAddress, - timelock, + constants.AddressZero, + 500, ] ); diff --git a/test/relayclient/RelayClient.test.ts b/test/relayclient/RelayClient.test.ts index 0fd67b5b..d1b99c30 100644 --- a/test/relayclient/RelayClient.test.ts +++ b/test/relayclient/RelayClient.test.ts @@ -1,5 +1,6 @@ import { expect } from 'chai'; import { + addSwapHash, assertLog, createSmartWalletFactory, createSupportedSmartWallet, @@ -29,7 +30,7 @@ import { HttpClient, HttpWrapper, } from '@rsksmart/rif-relay-client'; -import { constants, utils, Wallet } from 'ethers'; +import { constants, Wallet } from 'ethers'; import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { loadConfiguration } from '../relayserver/ServerTestUtils'; @@ -560,31 +561,13 @@ describe('RelayClient', function () { constants.AddressZero, nextWalletIndex ); - const refundAddress = Wallet.createRandom().address; const claimedValue = ethers.utils.parseEther('0.5'); - const preimageHash = utils.soliditySha256( - ['bytes32'], - [constants.HashZero] - ); - const timelock = 500; - data = swap.interface.encodeFunctionData( - 'claim(bytes32,uint256,address,address,uint256)', - [ - constants.HashZero, - claimedValue, - smartWalletAddress, - refundAddress, - timelock, - ] - ); - const hash = await swap.hashValues( - preimageHash, - claimedValue, - smartWalletAddress, - refundAddress, - timelock - ); - await swap.addSwap(hash); + data = await addSwapHash({ + swap, + amount: claimedValue, + claimAddress: smartWalletAddress, + refundAddress: Wallet.createRandom().address, + }); }); it('without tokenGas', async function () { diff --git a/test/relayserver/RelayServer.test.ts b/test/relayserver/RelayServer.test.ts index 9b977881..e4ef3dee 100644 --- a/test/relayserver/RelayServer.test.ts +++ b/test/relayserver/RelayServer.test.ts @@ -33,6 +33,7 @@ import { createRelayUserDefinedRequest, createDeployUserDefinedRequest, getSmartWalletTemplate, + addSwapHash, } from '../utils/TestUtils'; import config from 'config'; import { @@ -56,7 +57,7 @@ import { RelayRequestBody, setEnvelopingConfig, } from '@rsksmart/rif-relay-client'; -import { BigNumber, constants, utils, Wallet } from 'ethers'; +import { BigNumber, constants, Wallet } from 'ethers'; import { spy, match } from 'sinon'; import { TestDeployVerifierConfigurableMisbehavior, @@ -728,39 +729,20 @@ describe('RelayServer', function () { let index = 1; beforeEach(async function () { + index++; swap = await deployContract('TestSwap'); const smartWalletAddress = await boltzFactory.getSmartWalletAddress( owner.address, constants.AddressZero, index ); - const claimedValue = ethers.utils.parseEther('0.5'); - const refundAddress = Wallet.createRandom().address; - const timelock = 500; - const preimageHash = utils.soliditySha256( - ['bytes32'], - [constants.HashZero] - ); - encodedData = swap.interface.encodeFunctionData( - 'claim(bytes32,uint256,address,address,uint256)', - [ - constants.HashZero, - claimedValue, - smartWalletAddress, - refundAddress, - timelock, - ] - ); - const hash = await swap.hashValues( - preimageHash, - claimedValue, - smartWalletAddress, - refundAddress, - timelock - ); - await swap.addSwap(hash); + encodedData = await addSwapHash({ + swap, + amount: ethers.utils.parseEther('0.5'), + claimAddress: smartWalletAddress, + refundAddress: Wallet.createRandom().address, + }); await boltzVerifier.acceptContract(swap.address); - index++; }); it('should relay deploy transaction with contract execution', async function () { @@ -823,7 +805,7 @@ describe('RelayServer', function () { relayServer.createRelayTransaction( stringifyEnvelopingTx(envelopingTxRequest) ) - ).to.be.rejectedWith('Claiming value lower than fees'); + ).to.be.rejectedWith('Native balance too lo'); }); // FIXME - Should bubble up error but its failing with a different error @@ -868,30 +850,12 @@ describe('RelayServer', function () { index ); const claimedValue = ethers.utils.parseEther('0.5'); - const refundAddress = Wallet.createRandom().address; - const timelock = 500; - const preimageHash = utils.soliditySha256( - ['bytes32'], - [constants.HashZero] - ); - encodedData = swap.interface.encodeFunctionData( - 'claim(bytes32,uint256,address,address,uint256)', - [ - constants.HashZero, - claimedValue, - smartWalletAddress, - refundAddress, - timelock, - ] - ); - const hash = await swap.hashValues( - preimageHash, - claimedValue, - smartWalletAddress, - refundAddress, - timelock - ); - await swap.addSwap(hash); + encodedData = await addSwapHash({ + swap, + amount: claimedValue, + claimAddress: smartWalletAddress, + refundAddress: Wallet.createRandom().address, + }); await minimalBoltzVerifier.acceptContract(swap.address); index++; }); @@ -956,7 +920,7 @@ describe('RelayServer', function () { relayServer.createRelayTransaction( stringifyEnvelopingTx(envelopingTxRequest) ) - ).to.be.rejectedWith('Claiming value lower than fees'); + ).to.be.rejectedWith('Native balance too low'); }); }); }); diff --git a/test/relayserver/RelayServerNoClient.test.ts b/test/relayserver/RelayServerNoClient.test.ts index c1aaaab9..a87d57b0 100644 --- a/test/relayserver/RelayServerNoClient.test.ts +++ b/test/relayserver/RelayServerNoClient.test.ts @@ -15,7 +15,7 @@ import { import axios, { AxiosResponse } from 'axios'; import { expect } from 'chai'; import config from 'config'; -import { Wallet, constants, utils } from 'ethers'; +import { Wallet, constants } from 'ethers'; import { ethers } from 'hardhat'; import { EnvelopingRequestOptional, @@ -31,6 +31,7 @@ import { } from 'typechain-types'; import { RSK_URL, + addSwapHash, assertLog, createSmartWalletFactory, deployContract, @@ -194,30 +195,12 @@ describe('RelayServerNoClient', function () { 0 ); const claimedValue = ethers.utils.parseEther('0.5'); - const refundAddress = Wallet.createRandom().address; - const timelock = 500; - const preimageHash = utils.soliditySha256( - ['bytes32'], - [constants.HashZero] - ); - data = swap.interface.encodeFunctionData( - 'claim(bytes32,uint256,address,address,uint256)', - [ - constants.HashZero, - claimedValue, - smartWalletAddress, - refundAddress, - timelock, - ] - ); - const hash = await swap.hashValues( - preimageHash, - claimedValue, - smartWalletAddress, - refundAddress, - timelock - ); - await swap.addSwap(hash); + data = await addSwapHash({ + swap, + amount: claimedValue, + claimAddress: smartWalletAddress, + refundAddress: Wallet.createRandom().address, + }); baseRequestFields = { request: { @@ -292,30 +275,12 @@ describe('RelayServerNoClient', function () { 0 ); const claimedValue = ethers.utils.parseEther('0.5'); - const refundAddress = Wallet.createRandom().address; - const timelock = 500; - const preimageHash = utils.soliditySha256( - ['bytes32'], - [constants.HashZero] - ); - data = swap.interface.encodeFunctionData( - 'claim(bytes32,uint256,address,address,uint256)', - [ - constants.HashZero, - claimedValue, - smartWalletAddress, - refundAddress, - timelock, - ] - ); - const hash = await swap.hashValues( - preimageHash, - claimedValue, - smartWalletAddress, - refundAddress, - timelock - ); - await swap.addSwap(hash); + data = await addSwapHash({ + swap, + amount: claimedValue, + claimAddress: smartWalletAddress, + refundAddress: Wallet.createRandom().address, + }); baseRequestFields = { request: { diff --git a/test/utils/TestUtils.ts b/test/utils/TestUtils.ts index 90aa4b9a..cdc840e9 100644 --- a/test/utils/TestUtils.ts +++ b/test/utils/TestUtils.ts @@ -62,6 +62,7 @@ import SmartWalletJson from '../../artifacts/@rsksmart/rif-relay-contracts/contr import CustomSmartWalletJson from '../../artifacts/@rsksmart/rif-relay-contracts/contracts/smartwallet/CustomSmartWallet.sol/CustomSmartWallet.json'; import BoltzSmartWalletJson from '../../artifacts/@rsksmart/rif-relay-contracts/contracts/smartwallet/BoltzSmartWallet.sol/BoltzSmartWallet.json'; import MinimalBoltzSmartWalletJson from '../../artifacts/@rsksmart/rif-relay-contracts/contracts/smartwallet/MinimalBoltzSmartWallet.sol/MinimalBoltzSmartWallet.json'; +import { TestSwap } from '../../typechain-types'; use(chaiAsPromised); @@ -306,7 +307,7 @@ const createSupportedSmartWallet = async < return new Contract(swAddress, abis[type], owner) as T; }; -export const signEnvelopingRequest = async ( +const signEnvelopingRequest = async ( envelopingRequest: EnvelopingRequest, signer: Wallet ) => { @@ -579,6 +580,48 @@ const assertLog = async ({ expect(log?.args?.at(index), 'Log value expected').to.be.equal(value); }; +type AddSwapParams = { + swap: TestSwap; + amount: BigNumberish; + claimAddress: string; + refundAddress: string; + preimage?: string; + timelock?: BigNumberish; + external?: boolean; +}; + +const addSwapHash = async ({ + swap, + amount, + claimAddress, + refundAddress, + preimage = constants.HashZero, + timelock = 500, + external = false, +}: AddSwapParams): Promise => { + const preimageHash = utils.soliditySha256(['bytes32'], [preimage]); + const hash = await swap.hashValues( + preimageHash, + amount, + claimAddress, + refundAddress, + timelock + ); + await swap.addSwap(hash); + + if (external) { + return swap.interface.encodeFunctionData( + 'claim(bytes32,uint256,address,uint256)', + [preimage, amount, refundAddress, timelock] + ); + } + + return swap.interface.encodeFunctionData( + 'claim(bytes32,uint256,address,address,uint256)', + [preimage, amount, claimAddress, refundAddress, timelock] + ); +}; + export { evmMine, evmMineMany, @@ -598,11 +641,13 @@ export { generateRandomAddress, getSuffixDataAndSignature, createSupportedSmartWallet, + signEnvelopingRequest, RSK_URL, deployContract, getSmartWalletAddress, getSmartWalletTemplate, assertLog, + addSwapHash, }; export type { diff --git a/test/verifier/verifiers.test.ts b/test/verifier/verifiers.test.ts index 05b87f1f..34e93e86 100644 --- a/test/verifier/verifiers.test.ts +++ b/test/verifier/verifiers.test.ts @@ -12,9 +12,10 @@ import chai, { expect } from 'chai'; import chaiAsPromised from 'chai-as-promised'; import { ethers as hardhat } from 'hardhat'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; -import { Wallet, providers, constants, utils } from 'ethers'; +import { Wallet, providers, constants } from 'ethers'; import { prepareToken } from '../smartwallet/utils'; import { + addSwapHash, createDeployEnvelopingRequest, createRelayEnvelopingRequest, createSupportedSmartWallet, @@ -451,6 +452,7 @@ describe('Verifiers tests', function () { testToken = (await prepareToken('TestToken')) as TestToken; await testToken.mint(TOKEN_AMOUNT_TO_TRANSFER + 10, expectedAddress); await deployVerifier.acceptToken(testToken.address); + await deployVerifier.acceptContract(constants.AddressZero); }); it('Should succeed when the deploy is correct', async function () { @@ -525,7 +527,7 @@ describe('Verifiers tests', function () { let swap: TestSwap; let data: string; let refundAddress: string; - let timelock: number; + const timelock = 500; beforeEach(async function () { swap = await deployContract('TestSwap'); @@ -536,30 +538,15 @@ describe('Verifiers tests', function () { SMART_WALLET_INDEX ); refundAddress = Wallet.createRandom().address; - timelock = 500; - const preimageHash = utils.soliditySha256( - ['bytes32'], - [constants.HashZero] - ); - data = swap.interface.encodeFunctionData( - 'claim(bytes32,uint256,address,address,uint256)', - [ - constants.HashZero, - TOKEN_AMOUNT_TO_TRANSFER, - smartWalletAddress, - refundAddress, - timelock, - ] - ); - const hash = await swap.hashValues( - preimageHash, - TOKEN_AMOUNT_TO_TRANSFER, - smartWalletAddress, + data = await addSwapHash({ + swap, + amount: TOKEN_AMOUNT_TO_TRANSFER, + claimAddress: smartWalletAddress, refundAddress, - timelock - ); - await swap.addSwap(hash); + timelock, + }); await deployVerifier.acceptContract(swap.address); + await deployVerifier.acceptContract(constants.AddressZero); }); it('Should succeed destination contract provide enough balance (public method)', async function () { @@ -708,7 +695,7 @@ describe('Verifiers tests', function () { await expect( deployVerifier.verifyRelayedCall(deployRequest, signature) - ).to.be.rejectedWith('Claiming value lower than fees'); + ).to.be.rejectedWith('Native balance too low'); }); }); }); @@ -721,7 +708,7 @@ describe('Verifiers tests', function () { let deployVerifier: MinimalBoltzDeployVerifier; let smartWalletFactory: MinimalBoltzSmartWalletFactory; let refundAddress: string; - let timelock: number; + const timelock = 500; beforeEach(async function () { swap = await deployContract('TestSwap'); @@ -755,29 +742,13 @@ describe('Verifiers tests', function () { SMART_WALLET_INDEX ); refundAddress = Wallet.createRandom().address; - timelock = 500; - const preimageHash = utils.soliditySha256( - ['bytes32'], - [constants.HashZero] - ); - data = swap.interface.encodeFunctionData( - 'claim(bytes32,uint256,address,address,uint256)', - [ - constants.HashZero, - TOKEN_AMOUNT_TO_TRANSFER, - smartWalletAddress, - refundAddress, - timelock, - ] - ); - const hash = await swap.hashValues( - preimageHash, - TOKEN_AMOUNT_TO_TRANSFER, - smartWalletAddress, + data = await addSwapHash({ + swap, + amount: TOKEN_AMOUNT_TO_TRANSFER, + claimAddress: smartWalletAddress, refundAddress, - timelock - ); - await swap.addSwap(hash); + timelock, + }); await deployVerifier.acceptContract(swap.address); }); @@ -878,7 +849,7 @@ describe('Verifiers tests', function () { await expect( deployVerifier.verifyRelayedCall(deployRequest, signature) - ).to.be.rejectedWith('Claiming value lower than fees'); + ).to.be.rejectedWith('Native balance too low'); }); it('Should fail if the destination contract is not allowed', async function () {