mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
Updating test
This commit is contained in:
parent
84b85a83d7
commit
6f2a45e9d8
16
package-lock.json
generated
16
package-lock.json
generated
@ -33,7 +33,6 @@
|
|||||||
"eslint-plugin-standard": "^5.0.0",
|
"eslint-plugin-standard": "^5.0.0",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
"mock-local-storage": "^1.1.23",
|
"mock-local-storage": "^1.1.23",
|
||||||
"moment": "2.29.4",
|
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^2.8.4",
|
||||||
"release-it": "^15.7.0",
|
"release-it": "^15.7.0",
|
||||||
"source-map-support": "^0.5.21",
|
"source-map-support": "^0.5.21",
|
||||||
@ -9202,15 +9201,6 @@
|
|||||||
"global": "^4.3.2"
|
"global": "^4.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/moment": {
|
|
||||||
"version": "2.29.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
|
||||||
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
@ -21471,12 +21461,6 @@
|
|||||||
"global": "^4.3.2"
|
"global": "^4.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"moment": {
|
|
||||||
"version": "2.29.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
|
||||||
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
|
@ -61,7 +61,6 @@
|
|||||||
"eslint-plugin-standard": "^5.0.0",
|
"eslint-plugin-standard": "^5.0.0",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
"mock-local-storage": "^1.1.23",
|
"mock-local-storage": "^1.1.23",
|
||||||
"moment": "2.29.4",
|
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^2.8.4",
|
||||||
"release-it": "^15.7.0",
|
"release-it": "^15.7.0",
|
||||||
"source-map-support": "^0.5.21",
|
"source-map-support": "^0.5.21",
|
||||||
|
@ -13,7 +13,6 @@ import { homedir } from 'os'
|
|||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import { fetch } from 'cross-fetch'
|
import { fetch } from 'cross-fetch'
|
||||||
import veDelegation from '@oceanprotocol/contracts/artifacts/contracts/ve/veDelegation.vy/veDelegation.json'
|
import veDelegation from '@oceanprotocol/contracts/artifacts/contracts/ve/veDelegation.vy/veDelegation.json'
|
||||||
import moment from 'moment'
|
|
||||||
|
|
||||||
const data = JSON.parse(
|
const data = JSON.parse(
|
||||||
fs.readFileSync(
|
fs.readFileSync(
|
||||||
@ -140,18 +139,7 @@ describe('veOcean tests', async () => {
|
|||||||
assert(info[0].lockedAmount === currentBalance)
|
assert(info[0].lockedAmount === currentBalance)
|
||||||
assert(info[0].unlockTime === currentLock)
|
assert(info[0].unlockTime === currentLock)
|
||||||
|
|
||||||
console.log('Alice', Alice)
|
|
||||||
|
|
||||||
const estGas = await calculateEstimatedGas(
|
|
||||||
Alice,
|
|
||||||
delegateContract.methods.setApprovalForAll,
|
|
||||||
Alice,
|
|
||||||
0
|
|
||||||
)
|
|
||||||
console.log('estGas', estGas)
|
|
||||||
console.log('info[0].unlockTime.unix', moment().unix())
|
|
||||||
const lockTime = await veOcean.lockEnd(Alice)
|
const lockTime = await veOcean.lockEnd(Alice)
|
||||||
console.log('lockTime', lockTime)
|
|
||||||
|
|
||||||
const tx1 = await delegateContract.methods
|
const tx1 = await delegateContract.methods
|
||||||
.setApprovalForAll(Alice, true)
|
.setApprovalForAll(Alice, true)
|
||||||
@ -161,7 +149,7 @@ describe('veOcean tests', async () => {
|
|||||||
console.log('TX1: ', tx1)
|
console.log('TX1: ', tx1)
|
||||||
|
|
||||||
const tx = await delegateContract.methods
|
const tx = await delegateContract.methods
|
||||||
.create_boost(Bob, Alice, 1000, 0, lockTime, 0)
|
.create_boost(Alice, Bob, 100, 0, lockTime, 0)
|
||||||
.send({
|
.send({
|
||||||
from: Bob
|
from: Bob
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user