mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
bump contracts to 0.5.1
This commit is contained in:
parent
82af6edcd3
commit
9b7f911934
6
package-lock.json
generated
6
package-lock.json
generated
@ -939,9 +939,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@oceanprotocol/contracts": {
|
"@oceanprotocol/contracts": {
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-0.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-0.5.1.tgz",
|
||||||
"integrity": "sha512-6HQVP/Dvbh5b+wdu0rBR78pDwH4I+KeVaK80U5q47R/CvuSin5VpGSii3ZiCLY+O6JRxzjAMzCYo9ugL1cXvbg=="
|
"integrity": "sha512-bt5uwh79D759H6O4bAv+ycGdZQISFAxi65cqIygzA9hwsu29+GuOLwu1mxrzl2lVNLs6Emxo7TaDv0jAoyqnCg=="
|
||||||
},
|
},
|
||||||
"@octokit/auth-token": {
|
"@octokit/auth-token": {
|
||||||
"version": "2.4.2",
|
"version": "2.4.2",
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ethereum-navigator/navigator": "^0.5.0",
|
"@ethereum-navigator/navigator": "^0.5.0",
|
||||||
"@oceanprotocol/contracts": "^0.5.0",
|
"@oceanprotocol/contracts": "^0.5.1",
|
||||||
"decimal.js": "^10.2.0",
|
"decimal.js": "^10.2.0",
|
||||||
"fs": "0.0.1-security",
|
"fs": "0.0.1-security",
|
||||||
"lzma": "^2.3.2",
|
"lzma": "^2.3.2",
|
||||||
|
@ -391,24 +391,23 @@ export class DataTokens {
|
|||||||
from: address
|
from: address
|
||||||
})
|
})
|
||||||
const events = await datatoken.getPastEvents('OrderStarted', {
|
const events = await datatoken.getPastEvents('OrderStarted', {
|
||||||
|
filter: { consumer: address },
|
||||||
fromBlock: 0,
|
fromBlock: 0,
|
||||||
toBlock: 'latest'
|
toBlock: 'latest'
|
||||||
})
|
})
|
||||||
for (let i = 0; i < events.length; i++) {
|
for (let i = 0; i < events.length; i++) {
|
||||||
if (
|
if (
|
||||||
String(events[i].returnValues.amount) === this.web3.utils.toWei(String(amount)) &&
|
String(events[i].returnValues.amount) === this.web3.utils.toWei(String(amount)) &&
|
||||||
String(events[i].returnValues.serviceId) === String(serviceId)
|
String(events[i].returnValues.serviceId) === String(serviceId) &&
|
||||||
|
events[i].returnValues.consumer.toLowerCase() === address.toLowerCase()
|
||||||
) {
|
) {
|
||||||
const transaction = await this.web3.eth.getTransaction(events[i].transactionHash)
|
|
||||||
if (transaction.from === address) {
|
|
||||||
if (timeout === 0) return events[i].transactionHash
|
if (timeout === 0) return events[i].transactionHash
|
||||||
const blockDetails = await this.web3.eth.getBlock(events[i].blockHash)
|
const blockDetails = await this.web3.eth.getBlock(events[i].blockHash)
|
||||||
const expiry = new BigNumber(blockDetails.timestamp).plus(timeout)
|
const expiry = new BigNumber(blockDetails.timestamp).plus(timeout)
|
||||||
const unixTime = new BigNumber(Math.floor(Date.now() / 1000))
|
const unixTime = new BigNumber(Math.floor(Date.now() / 1000))
|
||||||
if (unixTime.isLessThan(expiry)) return events[i].transactionHash
|
if (unixTime.isLessThan(expiry)) return events[i].transactionHash
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,13 +32,13 @@ const configs: ConfigHelperConfig[] = [
|
|||||||
chainId: 4,
|
chainId: 4,
|
||||||
network: 'rinkeby',
|
network: 'rinkeby',
|
||||||
nodeUri: 'https://rinkeby.infura.io/v3',
|
nodeUri: 'https://rinkeby.infura.io/v3',
|
||||||
factoryAddress: '0xA7a711A09396DF82D9be46A26B48BafdB9BB4fA6',
|
factoryAddress: '0x241D0f315d2bfe32b90282e6863AC22A309EbFa0',
|
||||||
oceanTokenAddress: '0x8967BCF84170c91B0d24D4302C2376283b0B3a07',
|
oceanTokenAddress: '0x8967BCF84170c91B0d24D4302C2376283b0B3a07',
|
||||||
metadataStoreUri: 'https://aquarius.rinkeby.v3.dev-ocean.com',
|
metadataStoreUri: 'https://aquarius.rinkeby.v3.dev-ocean.com',
|
||||||
providerUri: 'https://provider.rinkeby.v3.dev-ocean.com',
|
providerUri: 'https://provider.rinkeby.v3.dev-ocean.com',
|
||||||
poolFactoryAddress: '0x4658cD157B57E9D0053Bb2d5CbC7B2Aad06dA5E6',
|
poolFactoryAddress: '0xf32E0784F5D127471883aF938c50349A97aF7085',
|
||||||
fixedRateExchangeAddress: '0x09285F0290D74f01D3287ED9B45d2456956758B4',
|
fixedRateExchangeAddress: '0x223B65841d5BAE99c615D0Da7980b2Fc0aFF1dB2',
|
||||||
metadataContractAddress: '0x1da8E04D2ae9b7c32C24e4DB94899b93d8E4751A'
|
metadataContractAddress: '0x0220D0b4FfCC4A14C7601215aA23da06d5b1c921'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
chainId: 1,
|
chainId: 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user