diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a378f8..d5a9b45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## Manifest Version 1.3.0 + +- refactored the wallet to use etheres V6 +- implemented EIP6963Provider +- updated all dependencies +- added ability to send native tokens +- added ability to manage ABIs +- added ability to perfrom arbitrary read calls to contracts +- added ability to perfrom arbitrary write calls to contracts +- added ability to save read or write calls for later use +- added sandbox to be able to evaluate JS code in order to pass complex parameters to read or write calls +- added base Network to templates class +- added Icon for base network +- added ability to add contacts and load them in Read contract and Write and Send token pages +- added ability to paste current selected address to both webpages and insde wallet itself + ## Manifest Version 1.2.8 - better support for estimate gas diff --git a/eval-sandbox.html b/eval-sandbox.html new file mode 100644 index 0000000..57c0550 --- /dev/null +++ b/eval-sandbox.html @@ -0,0 +1,20 @@ + + + + + +

Eval Sandbox

+ + + \ No newline at end of file diff --git a/index.html b/index.html index 2f26e1f..8f589b8 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + Clear Wallet diff --git a/package.json b/package.json index 1797ffe..c8ccdbb 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { "name": "clear-wallet", - "version": "1.2.8", + "version": "1.2.9", "private": true, + "description": "Clear Wallet (CLW) is a wallet that helps you manage your Ethereum assets and interact with Ethereum dApps and contracts with the main focus on absolute privacy.", "scripts": { "dev": "vite", - "inject": "tsc --outFile src/extension/inject.js src/extension/inject.ts", + "inject": "tsc --downlevelIteration --outFile src/extension/inject.js src/extension/inject.ts", "content": "tsc --outFile src/extension/content.js src/extension/content.ts", "post-build": "ts-node ./release-scripts/post-build.ts", "build": "yarn inject && yarn content && vue-tsc --noEmit && vite build && yarn post-build", @@ -14,45 +15,44 @@ "pub": "yarn build && yarn release && ts-node ./release-scripts/create-release.ts" }, "dependencies": { - "@capacitor/app": "^4.1.1", - "@capacitor/core": "^4.7.1", - "@capacitor/haptics": "^4.1.0", - "@capacitor/keyboard": "^4.1.1", - "@capacitor/status-bar": "^4.1.1", - "@ionic/vue": "^7.0.0", - "@ionic/vue-router": "^7.0.0", - "@types/chrome": "^0.0.227", - "core-js": "^3.29.1", - "ethers": "^5.7.2", - "vue": "^3.2.47", - "vue-router": "^4.1.6" + "@capacitor/app": "^5.0.6", + "@capacitor/core": "^5.2.3", + "@capacitor/haptics": "^5.0.6", + "@capacitor/keyboard": "^5.0.6", + "@capacitor/status-bar": "^5.0.6", + "@ionic/vue": "^7.2.3", + "@ionic/vue-router": "^7.2.3", + "@types/chrome": "^0.0.243", + "core-js": "^3.32.0", + "ethers": "^6.7.0", + "vue": "^3.3.4", + "vue-router": "^4.2.4" }, "devDependencies": { - "@capacitor/cli": "^4.7.1", + "@capacitor/cli": "^5.2.3", "@crxjs/vite-plugin": "^1.0.14", "@types/archiver": "^5.3.2", - "@types/jest": "^29.5.0", - "@types/node": "^18.15.11", - "@typescript-eslint/eslint-plugin": "^5.57.0", - "@typescript-eslint/parser": "^5.57.0", - "@vitejs/plugin-vue": "^4.1.0", - "@vue/eslint-config-typescript": "^11.0.2", + "@types/jest": "^29.5.3", + "@types/node": "^20.5.0", + "@typescript-eslint/eslint-plugin": "^6.3.0", + "@typescript-eslint/parser": "^6.3.0", + "@vitejs/plugin-vue": "^4.2.3", + "@vue/eslint-config-typescript": "^11.0.3", "archiver": "^5.3.1", - "eslint": "^8.37.0", - "eslint-plugin-vue": "^9.10.0", + "eslint": "^8.47.0", + "eslint-plugin-vue": "^9.17.0", "http-browserify": "^1.7.0", "https-browserify": "^1.0.0", - "jest": "^29.5.0", + "jest": "^29.6.2", "rollup-plugin-polyfill-node": "^0.12.0", - "sass": "^1.60.0", + "sass": "^1.65.1", "stream-browserify": "^3.0.0", - "ts-jest": "^29.0.5", + "ts-jest": "^29.1.1", "ts-node": "^10.9.1", - "typescript": "^5.0.2", + "typescript": "^5.1.6", "util": "^0.12.5", - "vite": "^4.2.1", - "vue-tsc": "^1.2.0", + "vite": "^4.4.9", + "vue-tsc": "^1.8.8", "yarn-upgrade-all": "^0.7.2" - }, - "description": "An Ionic project" + } } diff --git a/public/assets/chain-icons/base.webp b/public/assets/chain-icons/base.webp new file mode 100644 index 0000000..e901973 Binary files /dev/null and b/public/assets/chain-icons/base.webp differ diff --git a/public/index.html b/public/index.html index 3d6e6c9..2f98757 100644 --- a/public/index.html +++ b/public/index.html @@ -1,5 +1,5 @@ - + Clear Wallet diff --git a/release-scripts/post-build.ts b/release-scripts/post-build.ts index f095a0f..a09f117 100644 --- a/release-scripts/post-build.ts +++ b/release-scripts/post-build.ts @@ -1,16 +1,15 @@ (async () => { const CONTENT_BUILD_PATH = 'src/extension/content.js' - const METAMASK_STUB_PATH = 'src/extension/metamask-stub.js' + const METAMASK_INJECT_PATH = 'src/extension/inject.js' const fs = (await import('fs')).default const path = (await import('path')).default const pkg = JSON.parse(fs.readFileSync('dist/manifest.json').toString()); pkg.content_scripts[0].js[0] = CONTENT_BUILD_PATH - pkg.content_scripts[1].js[0] = METAMASK_STUB_PATH + pkg.content_scripts[1].js[0] = METAMASK_INJECT_PATH fs.writeFileSync('dist/manifest.json', JSON.stringify(pkg, null, 2)) - // fs.writeFileSync('dist/rules.js', fs.readFileSync('rules.json').toString()) fs.writeFileSync('dist/'+ CONTENT_BUILD_PATH, fs.readFileSync('src/extension/content.js').toString()) - fs.writeFileSync('dist/'+ METAMASK_STUB_PATH, fs.readFileSync('src/extension/metamask-stub.js').toString()) + fs.writeFileSync('dist/'+ METAMASK_INJECT_PATH, fs.readFileSync('src/extension/inject.js').toString()) const directory = 'dist/assets/'; fs.readdir(directory, (err, files) => { files.forEach(file => { diff --git a/src/App.vue b/src/App.vue index 2a8f6c2..11893d0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,9 +6,11 @@ diff --git a/src/views/AbiList.vue b/src/views/AbiList.vue new file mode 100644 index 0000000..d13c93b --- /dev/null +++ b/src/views/AbiList.vue @@ -0,0 +1,146 @@ + + + diff --git a/src/views/AbiSelectFunction.vue b/src/views/AbiSelectFunction.vue new file mode 100644 index 0000000..8beacdf --- /dev/null +++ b/src/views/AbiSelectFunction.vue @@ -0,0 +1,115 @@ + + + diff --git a/src/views/AccountsTab.vue b/src/views/AccountsTab.vue index a5c3d8b..caa1c1f 100644 --- a/src/views/AccountsTab.vue +++ b/src/views/AccountsTab.vue @@ -4,72 +4,81 @@ - - - - - + + + + + Accounts - + No EVM accounts found Add Account - - - + + + {{ account.name }} - - - -

{{ account.address }}

+
+
+ +

{{ account.address }}

+
- View Pk - Delete - Edit Name + View Pk + Delete + Edit Name -
+ - - - - - - Close - - View PK - - - - - - PK - - - + + + + + Close + + View PK + + + + + + PK + + + - -
diff --git a/src/views/AddAccount.vue b/src/views/AddAccount.vue index af37610..76c12ac 100644 --- a/src/views/AddAccount.vue +++ b/src/views/AddAccount.vue @@ -9,8 +9,7 @@ - Name - + Get Random Name @@ -23,8 +22,12 @@ :icon="clipboardOutline" button /> - PK - + @@ -67,6 +70,7 @@ Enter Index (default: 0) - + + + + Close Extract @@ -110,7 +117,6 @@ import { saveSelectedAccount, getAccounts, saveAccount, - getRandomPk, smallRandomString, paste, getSettings, @@ -122,7 +128,7 @@ import UnlockModal from "@/views/UnlockModal.vue"; import { encrypt, getCryptoParams } from "@/utils/webCrypto"; import { clipboardOutline } from "ionicons/icons"; -import { getFromMemonic } from "@/utils/wallet"; +import { getFromMnemonic, getRandomPk } from "@/utils/wallet"; export default defineComponent({ components: { @@ -294,7 +300,7 @@ export default defineComponent({ alertOpen.value = true; return; } - pk.value = getFromMemonic(mnemonic.value, mnemonicIndex.value); + pk.value = getFromMnemonic(mnemonic.value, mnemonicIndex.value); mnemonicModal.value = false; }; diff --git a/src/views/AddContact.vue b/src/views/AddContact.vue new file mode 100644 index 0000000..e7782a5 --- /dev/null +++ b/src/views/AddContact.vue @@ -0,0 +1,153 @@ + + + diff --git a/src/views/AddNetwork.vue b/src/views/AddNetwork.vue index 949a35d..4c3d044 100644 --- a/src/views/AddNetwork.vue +++ b/src/views/AddNetwork.vue @@ -10,31 +10,46 @@ >Add from popular chain list - Name(*) - + - ChainId(*) - + - RPC URL(*) - - Native Token Symbol(?) - + - Explorer(?) Settings + + + + + Send Tokens + + + + + Read Contract + + + + + Write Contracts + + @@ -50,9 +67,19 @@ import { IonTabBar, IonTabButton, IonLabel, - IonIcon + IonIcon, } from "@ionic/vue"; -import { personCircle, walletOutline, diamondOutline, cogOutline, receiptOutline, gitNetworkOutline } from "ionicons/icons"; +import { + personCircle, + walletOutline, + diamondOutline, + cogOutline, + receiptOutline, + gitNetworkOutline, + sendOutline, + glassesOutline, + pushOutline, +} from "ionicons/icons"; export default defineComponent({ components: { @@ -63,7 +90,7 @@ export default defineComponent({ IonTabBar, IonTabButton, IonLabel, - IonIcon + IonIcon, }, name: "AppTabs", setup() { @@ -81,8 +108,11 @@ export default defineComponent({ cogOutline, receiptOutline, gitNetworkOutline, + sendOutline, beforeTabChange, afterTabChange, + glassesOutline, + pushOutline, }; }, }); diff --git a/src/views/AssetsTab.vue b/src/views/AssetsTab.vue index 8b91ee5..c848117 100644 --- a/src/views/AssetsTab.vue +++ b/src/views/AssetsTab.vue @@ -16,6 +16,7 @@ > - +