Skip to content

Commit

Permalink
Fix issue with wrong function name in tutorial text
Browse files Browse the repository at this point in the history
  • Loading branch information
cehali committed Sep 14, 2023
1 parent 7505929 commit c2d9656
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@ The second thing to do is adjust the Typescript code of the dApp. Please take a
```js
import { WrapperBuilder } from "@redstone-finance/evm-connector";

async function getContractInstance(contractName) {
...
return new ethers.Contract(address, abi, signer);
}

async function buy(orderId: string) {
const marketplace = await getContractInstance("marketplace");

Expand All @@ -183,7 +178,7 @@ async function buy(orderId: string) {
const expectedEthAmount = await wrappedMarketplaceContract.getPrice(orderId);

// Sending buy tx
const buyTx = await wrappedMarketplaceContract.wi(orderId, {
const buyTx = await wrappedMarketplaceContract.buy(orderId, {
value: expectedEthAmount.mul(101).div(100), // a buffer for price movements
});
await buyTx.wait();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Web3Provider, Contract } from "zksync-web3";
import { WrapperBuilder } from "@redstone-finance/evm-connector";
import { ethers, utils } from "ethers";
// import { WrapperBuilder } from "@redstone-finance/evm-connector";
import { utils } from "ethers";
import localAddresses from "../config/zkSyncTestnet-addresses.json";
import nftAbi from "../config/nft-abi.json";
import marketplaceAbi from "../config/marketplace-abi.json";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe("Stable marketplace core functions test", function () {
const orderId = 0;

// Get expected ETH amount
const expectedEthAmount = await stableMarketplaceContract.getPrice(
const expectedEthAmount = await wrappedMarketplaceContract.getPrice(
orderId
);
logExpectedAmount(expectedEthAmount);
Expand Down

0 comments on commit c2d9656

Please sign in to comment.