@0xsequence/provider
Advanced tools
Comparing version 1.9.17 to 1.9.18
@@ -0,1 +1,2 @@ | ||
export * from "./transactions.js"; | ||
export * from "./transports/index.js"; | ||
@@ -2,0 +3,0 @@ export * from "./types.js"; |
{ | ||
"name": "@0xsequence/provider", | ||
"version": "1.9.17", | ||
"version": "1.9.18", | ||
"description": "provider sub-package for Sequence", | ||
@@ -15,11 +15,11 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/provider", | ||
"webextension-polyfill": "^0.10.0", | ||
"@0xsequence/abi": "1.9.17", | ||
"@0xsequence/account": "1.9.17", | ||
"@0xsequence/auth": "1.9.17", | ||
"@0xsequence/core": "1.9.17", | ||
"@0xsequence/migration": "1.9.17", | ||
"@0xsequence/network": "1.9.17", | ||
"@0xsequence/relayer": "1.9.17", | ||
"@0xsequence/utils": "1.9.17", | ||
"@0xsequence/wallet": "1.9.17" | ||
"@0xsequence/abi": "1.9.18", | ||
"@0xsequence/account": "1.9.18", | ||
"@0xsequence/auth": "1.9.18", | ||
"@0xsequence/core": "1.9.18", | ||
"@0xsequence/migration": "1.9.18", | ||
"@0xsequence/network": "1.9.18", | ||
"@0xsequence/relayer": "1.9.18", | ||
"@0xsequence/utils": "1.9.18", | ||
"@0xsequence/wallet": "1.9.18" | ||
}, | ||
@@ -26,0 +26,0 @@ "peerDependencies": { |
@@ -0,1 +1,2 @@ | ||
export * from './transactions' | ||
export * from './transports' | ||
@@ -2,0 +3,0 @@ export * from './types' |
@@ -5,2 +5,15 @@ import { walletContracts } from '@0xsequence/abi' | ||
const PROHIBITED_FUNCTIONS = new Map( | ||
[ | ||
'addHook(bytes4,address)', | ||
'clearExtraImageHashes(bytes32[])', | ||
'removeHook(bytes4)', | ||
'setExtraImageHash(bytes32,uint256)', | ||
'updateIPFSRoot(bytes32)', | ||
'updateImageHash(bytes32)', | ||
'updateImageHashAndIPFS(bytes32,bytes32)', | ||
'updateImplementation(address)' | ||
].map(signature => [ethers.utils.keccak256(ethers.utils.toUtf8Bytes(signature)).slice(0, 10), signature]) | ||
) | ||
export function validateTransactionRequest(wallet: string, transaction: commons.transaction.Transactionish) { | ||
@@ -25,2 +38,12 @@ const transactions = commons.transaction.fromTransactionish(wallet, transaction) | ||
} | ||
if (transaction.data) { | ||
const data = ethers.utils.hexlify(transaction.data) | ||
const selector = data.slice(0, 10) | ||
const signature = PROHIBITED_FUNCTIONS.get(selector) | ||
if (signature) { | ||
const name = signature.slice(0, signature.indexOf('(')) | ||
throw new Error(`${name} calls are forbidden`) | ||
} | ||
} | ||
} | ||
@@ -27,0 +50,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
705239
71
17822
+ Added@0xsequence/abi@1.9.18(transitive)
+ Added@0xsequence/account@1.9.18(transitive)
+ Added@0xsequence/api@1.9.18(transitive)
+ Added@0xsequence/auth@1.9.18(transitive)
+ Added@0xsequence/core@1.9.18(transitive)
+ Added@0xsequence/indexer@1.9.18(transitive)
+ Added@0xsequence/metadata@1.9.18(transitive)
+ Added@0xsequence/migration@1.9.18(transitive)
+ Added@0xsequence/network@1.9.18(transitive)
+ Added@0xsequence/relayer@1.9.18(transitive)
+ Added@0xsequence/replacer@1.9.18(transitive)
+ Added@0xsequence/sessions@1.9.18(transitive)
+ Added@0xsequence/signhub@1.9.18(transitive)
+ Added@0xsequence/utils@1.9.18(transitive)
+ Added@0xsequence/wallet@1.9.18(transitive)
- Removed@0xsequence/abi@1.9.17(transitive)
- Removed@0xsequence/account@1.9.17(transitive)
- Removed@0xsequence/api@1.9.17(transitive)
- Removed@0xsequence/auth@1.9.17(transitive)
- Removed@0xsequence/core@1.9.17(transitive)
- Removed@0xsequence/indexer@1.9.17(transitive)
- Removed@0xsequence/metadata@1.9.17(transitive)
- Removed@0xsequence/migration@1.9.17(transitive)
- Removed@0xsequence/network@1.9.17(transitive)
- Removed@0xsequence/relayer@1.9.17(transitive)
- Removed@0xsequence/replacer@1.9.17(transitive)
- Removed@0xsequence/sessions@1.9.17(transitive)
- Removed@0xsequence/signhub@1.9.17(transitive)
- Removed@0xsequence/utils@1.9.17(transitive)
- Removed@0xsequence/wallet@1.9.17(transitive)
Updated@0xsequence/abi@1.9.18
Updated@0xsequence/account@1.9.18
Updated@0xsequence/auth@1.9.18
Updated@0xsequence/core@1.9.18
Updated@0xsequence/migration@1.9.18
Updated@0xsequence/network@1.9.18
Updated@0xsequence/relayer@1.9.18
Updated@0xsequence/utils@1.9.18
Updated@0xsequence/wallet@1.9.18