mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Updating CodeExamples.md
This commit is contained in:
parent
153baef87f
commit
f8ba8b7f41
@ -614,7 +614,7 @@ Now let's console log the DID to check everything is working
|
|||||||
|
|
||||||
### 7.3 Marketplace displays fixed rate asset for sale
|
### 7.3 Marketplace displays fixed rate asset for sale
|
||||||
```Typescript
|
```Typescript
|
||||||
const fixedRate = new FixedRateExchange(web3, freAddress)
|
const fixedRate = new FixedRateExchange(freAddress, web3)
|
||||||
const oceanAmount = await (
|
const oceanAmount = await (
|
||||||
await fixedRate.calcBaseInGivenOutDT(freId, '1')
|
await fixedRate.calcBaseInGivenOutDT(freId, '1')
|
||||||
).baseTokenAmount
|
).baseTokenAmount
|
||||||
@ -655,7 +655,7 @@ Before we call the contract we have to call `approve` so that the contract can m
|
|||||||
DATATOKEN_AMOUNT
|
DATATOKEN_AMOUNT
|
||||||
)
|
)
|
||||||
|
|
||||||
const fixedRate = new FixedRateExchange(web3, freAddress)
|
const fixedRate = new FixedRateExchange(freAddress, web3)
|
||||||
```
|
```
|
||||||
Now we can make the contract call
|
Now we can make the contract call
|
||||||
```Typescript
|
```Typescript
|
||||||
@ -826,7 +826,7 @@ Now we need to encrypt file(s) using provider
|
|||||||
### 8.3 Consumer gets a dispenser data asset, and downloads it
|
### 8.3 Consumer gets a dispenser data asset, and downloads it
|
||||||
```Typescript
|
```Typescript
|
||||||
const datatoken = new Datatoken(web3)
|
const datatoken = new Datatoken(web3)
|
||||||
const dispenser = new Dispenser(web3, null, addresses.Dispenser)
|
const dispenser = new Dispenser(addresses.Dispenser, web3)
|
||||||
|
|
||||||
let consumerDTBalance = await balance(
|
let consumerDTBalance = await balance(
|
||||||
web3,
|
web3,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user