diff --git a/docs/deploymentData.js b/docs/deploymentData.js index 857f81e..8b53d97 100644 --- a/docs/deploymentData.js +++ b/docs/deploymentData.js @@ -17,3 +17,8 @@ ERC1155ABI = [{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"ad const CHAINID_MAINNET = 1; const CHAINID_SEPOLIA = 11155111; + +const CHAINS = { + 1: "Mainnet", + 11155111: "Sepolia", +}; diff --git a/docs/online.html b/docs/online.html index 00dfa33..6279f15 100644 --- a/docs/online.html +++ b/docs/online.html @@ -236,14 +236,24 @@ + + + + Refresh + - - - - - - + + + + + + @@ -280,9 +290,6 @@ - - Refresh - @@ -668,6 +675,8 @@
Troubleshooting
// data: null, // nonce: null, // signature: null, + chainId: null, + estimatedGas: null, transactionCount: null, }, @@ -1284,6 +1293,7 @@
Troubleshooting
console.log(moment().format("HH:mm:ss") + " prepareEthTxRefresh: " + JSON.stringify(this.settings.prepareEthTx, null, 2)); const provider = new ethers.providers.Web3Provider(window.ethereum); if (this.settings.prepareEthTx.from) { + this.settings.prepareEthTx.chainId = this.chainId; this.settings.prepareEthTx.transactionCount = await provider.getTransactionCount(this.settings.prepareEthTx.from); const signer = new ethers.VoidSigner(this.settings.prepareEthTx.from, provider); @@ -1294,18 +1304,17 @@
Troubleshooting
to: this.settings.prepareEthTx.to, // gasLimit: 50000, // gasPrice: 1000000, - type: 2, - maxFeePerGas: 1234000, - maxPriorityFeePerGas: 1234000, - value: 1, + // type: 2, + // maxFeePerGas: 1234000, + // maxPriorityFeePerGas: 1234000, + value: ethers.utils.parseUnits(this.settings.prepareEthTx.amount, this.settings.prepareEthTx.amountUnit).toString(), data: null, - nonce: this.settings.prepareEthTx.transactionCount, - chainId: this.chainId, + // nonce: this.settings.prepareEthTx.transactionCount, + // chainId: this.chainId, }; - const estimatedGas = await signer.estimateGas(tx); - console.log(moment().format("HH:mm:ss") + " prepareEthTxRefresh - estimatedGas: " + estimatedGas.toString()); - - + console.log(moment().format("HH:mm:ss") + " prepareEthTxRefresh - tx: " + JSON.stringify(tx, null, 2)); + this.settings.prepareEthTx.estimatedGas = (await signer.estimateGas(tx)).toString(); + console.log(moment().format("HH:mm:ss") + " prepareEthTxRefresh - estimatedGas: " + this.settings.prepareEthTx.estimatedGas.toString()); } else { this.settings.prepareEthTx.transactionCount = null; diff --git a/docs/wallettool.html b/docs/wallettool.html index 1922465..62a5d1b 100644 --- a/docs/wallettool.html +++ b/docs/wallettool.html @@ -99,7 +99,10 @@
- + + + +
@@ -198,6 +201,7 @@ phrase: null, phraseError: null, passphrase: null, + confirmPassphrase: null, path: "m/44'/60'/0'/0/0", // null, locale: null, }, @@ -296,7 +300,7 @@ generateDerivedAddresses() { console.log(moment().format("HH:mm:ss") + " generateDerivedAddresses - this.wallet: " + JSON.stringify(this.wallet, null, 2)); const results = []; - if (this.wallet.tab == 0 && this.wallet.mnemonic.phrase) { + if (this.wallet.tab == 0 && this.wallet.mnemonic.phrase && (this.wallet.mnemonic.passphrase == this.wallet.mnemonic.confirmPassphrase)) { try { const node = ethers.utils.HDNode.fromMnemonic(this.wallet.mnemonic.phrase, this.wallet.mnemonic.passphrase); for (let i = 0; i < this.wallet.pageSize; i++) {