From 4b2d428363fec6ff30badde60377f856014c50e4 Mon Sep 17 00:00:00 2001 From: BokkyPooBah Date: Mon, 12 Aug 2024 13:46:57 +1000 Subject: [PATCH] tidy --- docs/index.html | 98 +++++++++++++++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 36 deletions(-) diff --git a/docs/index.html b/docs/index.html index 1fa1f72..f332083 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,8 +43,8 @@ ERC-20 - ERC-721 - ERC-1155 + ERC-721 + ERC-1155 {{ coinbase && (coinbase.substring(0, 6) + '...' + coinbase.slice(-4)) || 'Connect' }} @@ -200,9 +200,9 @@ - + - + @@ -219,17 +219,17 @@ - + - + - + - + @@ -244,7 +244,7 @@ - + @@ -260,14 +260,14 @@ - + - + - + Transfer @@ -288,16 +288,24 @@ + + + + + + + + - + - + - + Approve @@ -318,24 +326,32 @@ + + + + + + + + - + - + - + - + - + Transfer From @@ -454,16 +470,26 @@
Troubleshooting
tabIndex: 0, erc20: { contract: null, - balanceOfOwner: null, - allowanceOwner: null, - allowanceSpender: null, - transferTo: null, - transferTokens: null, - approveSpender: null, - approveTokens: null, - transferFromFrom: null, - transferFromTo: null, - transferFromTokens: null, + balanceOf: { + owner: null, + }, + allowance: { + owner: null, + spender: null, + }, + transfer: { + to: null, + tokens: null, + }, + approve: { + spender: null, + tokens: null, + }, + transferFrom: { + from: null, + to: null, + tokens: null, + }, }, erc721: { contract: null, @@ -471,7 +497,7 @@
Troubleshooting
erc1155: { contract: null, }, - version: 4, + version: 5, }, erc20: { symbol: null, @@ -721,7 +747,7 @@
Troubleshooting
const decimals = await contract.decimals(); Vue.set(this.erc20, 'decimals', decimals.toString()); - const balanceOf = await contract.balanceOf(this.settings.erc20.balanceOfOwner); + const balanceOf = await contract.balanceOf(this.settings.erc20.balanceOf.owner); Vue.set(this.erc20, 'balanceOf', balanceOf); // console.log(moment().format("HH:mm:ss") + " retrieveERC20BalanceOf - erc20.balanceOf: " + balanceOf); // console.log(moment().format("HH:mm:ss") + " retrieveERC20BalanceOf END - erc20: " + JSON.stringify(this.erc20, null, 2)); @@ -738,7 +764,7 @@
Troubleshooting
const decimals = await contract.decimals(); Vue.set(this.erc20, 'decimals', decimals.toString()); - const allowance = await contract.allowance(this.settings.erc20.allowanceOwner, this.settings.erc20.allowanceSpender); + const allowance = await contract.allowance(this.settings.erc20.allowance.owner, this.settings.erc20.allowance.spender); Vue.set(this.erc20, 'allowance', allowance); // console.log(moment().format("HH:mm:ss") + " retrieveERC20Allowance - erc20.allowance: " + allowance); // console.log(moment().format("HH:mm:ss") + " retrieveERC20Allowance END - erc20: " + JSON.stringify(this.erc20, null, 2)); @@ -752,7 +778,7 @@
Troubleshooting
const contractWithSigner = contract.connect(provider.getSigner()); const decimals = await contract.decimals(); try { - const tx = await contractWithSigner.transfer(this.settings.erc20.transferTo, ethers.utils.parseUnits(this.settings.erc20.transferTokens, decimals)); + const tx = await contractWithSigner.transfer(this.settings.erc20.transfer.to, ethers.utils.parseUnits(this.settings.erc20.transfer.tokens, decimals)); console.log(moment().format("HH:mm:ss") + " transferERC20 - tx: " + JSON.stringify(tx)); Vue.set(this.erc20, 'transferTxHash', tx && tx.hash || null); Vue.set(this.erc20, 'transferTxResult', JSON.stringify(tx, null, 2)); @@ -773,7 +799,7 @@
Troubleshooting
const contractWithSigner = contract.connect(provider.getSigner()); const decimals = await contract.decimals(); try { - const tx = await contractWithSigner.approve(this.settings.erc20.approveSpender, ethers.utils.parseUnits(this.settings.erc20.approveTokens, decimals)); + const tx = await contractWithSigner.approve(this.settings.erc20.approve.spender, ethers.utils.parseUnits(this.settings.erc20.approve.tokens, decimals)); console.log(moment().format("HH:mm:ss") + " approveERC20 - tx: " + JSON.stringify(tx)); Vue.set(this.erc20, 'approveTxHash', tx && tx.hash || null); Vue.set(this.erc20, 'approveTxResult', JSON.stringify(tx, null, 2)); @@ -794,7 +820,7 @@
Troubleshooting
const contractWithSigner = contract.connect(provider.getSigner()); const decimals = await contract.decimals(); try { - const tx = await contractWithSigner.transferFrom(this.settings.erc20.transferFromFrom, this.settings.erc20.transferFromTo, ethers.utils.parseUnits(this.settings.erc20.transferFromTokens, decimals)); + const tx = await contractWithSigner.transferFrom(this.settings.erc20.transferFrom.from, this.settings.erc20.transferFrom.to, ethers.utils.parseUnits(this.settings.erc20.transferFrom.tokens, decimals)); console.log(moment().format("HH:mm:ss") + " transferFromERC20 - tx: " + JSON.stringify(tx)); Vue.set(this.erc20, 'transferFromTxHash', tx && tx.hash || null); Vue.set(this.erc20, 'transferFromTxResult', JSON.stringify(tx, null, 2));