Skip to content

Commit

Permalink
Update for Web3.js v4.15.0 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
danforbes authored Nov 8, 2024
1 parent 4875b30 commit 52146f1
Show file tree
Hide file tree
Showing 9 changed files with 249 additions and 377 deletions.
86 changes: 43 additions & 43 deletions templates/demo/web3js-react-dapp-demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions templates/demo/web3js-react-dapp-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"typescript": "^4.9.5",
"uuid": "^10.0.0",
"web-vitals": "^2.1.4",
"web3": "^4.14.0",
"web3-eth": "^4.10.0",
"web3-eth-contract": "^4.7.0"
"web3": "^4.15.0",
"web3-eth": "^4.11.0",
"web3-eth-contract": "^4.7.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
4 changes: 2 additions & 2 deletions templates/demo/web3js-react-dapp-demo/src/Erc20Detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ function Erc20Detail({ address }: { address: string }) {
setIsFormValid(false);

const gas: bigint = await erc20.methods
.transfer(to, amount)
.transfer(to as string, amount as string)
.estimateGas({ from: account });

const gasPrice: bigint = await web3Context.web3.eth.getGasPrice();
erc20.methods.transfer(to, amount).send({
erc20.methods.transfer(to as string, amount as string).send({
from: account,
gas: gas.toString(),
gasPrice: gasPrice.toString(),
Expand Down
Loading

0 comments on commit 52146f1

Please sign in to comment.