Fix conflicts.
This commit is contained in:
commit
f309bcf98f
|
@ -4,9 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d
|
|||
|
||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
#### [v3.0.7](https://github.com/oceanprotocol/ocean-subgraph/compare/v3.0.6...v3.0.7)
|
||||
|
||||
- switch amount from wei to numeric [`#666`](https://github.com/oceanprotocol/ocean-subgraph/pull/666)
|
||||
|
||||
#### [v3.0.6](https://github.com/oceanprotocol/ocean-subgraph/compare/v3.0.5...v3.0.6)
|
||||
|
||||
> 28 April 2023
|
||||
|
||||
- proper veDelegation [`#663`](https://github.com/oceanprotocol/ocean-subgraph/pull/663)
|
||||
- Release 3.0.6 [`9fd0553`](https://github.com/oceanprotocol/ocean-subgraph/commit/9fd055333705185b5f507fddcdf0f5502add1f1c)
|
||||
|
||||
#### [v3.0.5](https://github.com/oceanprotocol/ocean-subgraph/compare/v3.0.4...v3.0.5)
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "ocean-subgraph",
|
||||
"version": "3.0.6",
|
||||
"version": "3.0.7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ocean-subgraph",
|
||||
"version": "3.0.6",
|
||||
"version": "3.0.7",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@oceanprotocol/contracts": "^1.1.12",
|
||||
|
@ -17,7 +17,7 @@
|
|||
"devDependencies": {
|
||||
"@graphprotocol/graph-cli": "^0.38.0",
|
||||
"@graphprotocol/graph-ts": "^0.29.3",
|
||||
"@types/chai": "^4.3.4",
|
||||
"@types/chai": "^4.3.5",
|
||||
"@types/chai-spies": "^1.0.3",
|
||||
"@types/mocha": "^10.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||
|
@ -35,7 +35,7 @@
|
|||
"mocha": "^10.2.0",
|
||||
"mock-local-storage": "^1.1.23",
|
||||
"prettier": "^2.8.8",
|
||||
"release-it": "^15.10.1",
|
||||
"release-it": "^15.10.2",
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-node": "^10.9.1",
|
||||
"ts-node-dev": "^2.0.0",
|
||||
|
@ -1245,9 +1245,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@types/chai": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz",
|
||||
"integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==",
|
||||
"version": "4.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz",
|
||||
"integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/chai-spies": {
|
||||
|
@ -1717,9 +1717,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/ansi-escapes": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.1.0.tgz",
|
||||
"integrity": "sha512-bQyg9bzRntwR/8b89DOEhGwctcwCrbWW/TuqTQnpqpy5Fz3aovcOTj5i8NJV6AHc8OGNdMaqdxAWww8pz2kiKg==",
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz",
|
||||
"integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"type-fest": "^3.0.0"
|
||||
|
@ -1732,9 +1732,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/ansi-escapes/node_modules/type-fest": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.7.0.tgz",
|
||||
"integrity": "sha512-A2qUJ/j8vkKIT+UorxayZjFJoEdNkIPZkjOJSWezoAbRQd7QEhnz2iJlfVy4Or0GuEnCXts5cNorQNUvdLkaSQ==",
|
||||
"version": "3.9.0",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.9.0.tgz",
|
||||
"integrity": "sha512-hR8JP2e8UiH7SME5JZjsobBlEiatFoxpzCP+R3ZeCo7kAaG1jXQE5X/buLzogM6GJu8le9Y4OcfNuIQX0rZskA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=14.16"
|
||||
|
@ -6884,9 +6884,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/inquirer": {
|
||||
"version": "9.1.5",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.1.5.tgz",
|
||||
"integrity": "sha512-3ygAIh8gcZavV9bj6MTdYddG2zPSYswP808fKS46NOwlF0zZljVpnLCHODDqItWJDbDpLb3aouAxGaJbkxoppA==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.0.tgz",
|
||||
"integrity": "sha512-WWERbVqjsTXjXub1ZW0ZHDit1dyHqy0T9XIkky9TnmKAPrjU9Jkd59nZPK0dUuM3s73GZAZu2Jo4iFU3XSPVLA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ansi-escapes": "^6.0.0",
|
||||
|
@ -11079,9 +11079,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/release-it": {
|
||||
"version": "15.10.1",
|
||||
"resolved": "https://registry.npmjs.org/release-it/-/release-it-15.10.1.tgz",
|
||||
"integrity": "sha512-Wkk4aFHSo27vQwHIlcEy77lJwnQlh4UDQckc53gh5tKo7F22mAUEAe8SYQZJcFh7icdkf0OV70onhB1dDmeClA==",
|
||||
"version": "15.10.2",
|
||||
"resolved": "https://registry.npmjs.org/release-it/-/release-it-15.10.2.tgz",
|
||||
"integrity": "sha512-fm1MtEG6IFxMMmOhUzpw9FTx8k9Ln5iiM+bikjrg3oZ5JLJO1uR1yxloPqc4A2gIXUq+bQp8/g4wipOwgDmEcw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@iarna/toml": "2.2.5",
|
||||
|
@ -11091,9 +11091,9 @@
|
|||
"cosmiconfig": "8.1.3",
|
||||
"execa": "7.1.1",
|
||||
"git-url-parse": "13.1.0",
|
||||
"globby": "13.1.3",
|
||||
"globby": "13.1.4",
|
||||
"got": "12.6.0",
|
||||
"inquirer": "9.1.5",
|
||||
"inquirer": "9.2.0",
|
||||
"is-ci": "3.0.1",
|
||||
"issue-parser": "6.0.0",
|
||||
"lodash": "4.17.21",
|
||||
|
@ -11105,7 +11105,7 @@
|
|||
"os-name": "5.1.0",
|
||||
"promise.allsettled": "1.0.6",
|
||||
"proxy-agent": "5.0.0",
|
||||
"semver": "7.3.8",
|
||||
"semver": "7.5.0",
|
||||
"shelljs": "0.8.5",
|
||||
"update-notifier": "6.0.2",
|
||||
"url-join": "5.0.0",
|
||||
|
@ -11275,9 +11275,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/release-it/node_modules/globby": {
|
||||
"version": "13.1.3",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz",
|
||||
"integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==",
|
||||
"version": "13.1.4",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz",
|
||||
"integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"dir-glob": "^3.0.1",
|
||||
|
@ -11587,9 +11587,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/release-it/node_modules/semver": {
|
||||
"version": "7.3.8",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||
"version": "7.5.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz",
|
||||
"integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
|
@ -11983,9 +11983,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/rxjs": {
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz",
|
||||
"integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==",
|
||||
"version": "7.8.1",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
|
||||
"integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.1.0"
|
||||
|
@ -15654,9 +15654,9 @@
|
|||
}
|
||||
},
|
||||
"@types/chai": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz",
|
||||
"integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==",
|
||||
"version": "4.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz",
|
||||
"integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/chai-spies": {
|
||||
|
@ -16014,18 +16014,18 @@
|
|||
"dev": true
|
||||
},
|
||||
"ansi-escapes": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.1.0.tgz",
|
||||
"integrity": "sha512-bQyg9bzRntwR/8b89DOEhGwctcwCrbWW/TuqTQnpqpy5Fz3aovcOTj5i8NJV6AHc8OGNdMaqdxAWww8pz2kiKg==",
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz",
|
||||
"integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"type-fest": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"type-fest": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.7.0.tgz",
|
||||
"integrity": "sha512-A2qUJ/j8vkKIT+UorxayZjFJoEdNkIPZkjOJSWezoAbRQd7QEhnz2iJlfVy4Or0GuEnCXts5cNorQNUvdLkaSQ==",
|
||||
"version": "3.9.0",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.9.0.tgz",
|
||||
"integrity": "sha512-hR8JP2e8UiH7SME5JZjsobBlEiatFoxpzCP+R3ZeCo7kAaG1jXQE5X/buLzogM6GJu8le9Y4OcfNuIQX0rZskA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
@ -19982,9 +19982,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "9.1.5",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.1.5.tgz",
|
||||
"integrity": "sha512-3ygAIh8gcZavV9bj6MTdYddG2zPSYswP808fKS46NOwlF0zZljVpnLCHODDqItWJDbDpLb3aouAxGaJbkxoppA==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.0.tgz",
|
||||
"integrity": "sha512-WWERbVqjsTXjXub1ZW0ZHDit1dyHqy0T9XIkky9TnmKAPrjU9Jkd59nZPK0dUuM3s73GZAZu2Jo4iFU3XSPVLA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-escapes": "^6.0.0",
|
||||
|
@ -23193,9 +23193,9 @@
|
|||
}
|
||||
},
|
||||
"release-it": {
|
||||
"version": "15.10.1",
|
||||
"resolved": "https://registry.npmjs.org/release-it/-/release-it-15.10.1.tgz",
|
||||
"integrity": "sha512-Wkk4aFHSo27vQwHIlcEy77lJwnQlh4UDQckc53gh5tKo7F22mAUEAe8SYQZJcFh7icdkf0OV70onhB1dDmeClA==",
|
||||
"version": "15.10.2",
|
||||
"resolved": "https://registry.npmjs.org/release-it/-/release-it-15.10.2.tgz",
|
||||
"integrity": "sha512-fm1MtEG6IFxMMmOhUzpw9FTx8k9Ln5iiM+bikjrg3oZ5JLJO1uR1yxloPqc4A2gIXUq+bQp8/g4wipOwgDmEcw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@iarna/toml": "2.2.5",
|
||||
|
@ -23205,9 +23205,9 @@
|
|||
"cosmiconfig": "8.1.3",
|
||||
"execa": "7.1.1",
|
||||
"git-url-parse": "13.1.0",
|
||||
"globby": "13.1.3",
|
||||
"globby": "13.1.4",
|
||||
"got": "12.6.0",
|
||||
"inquirer": "9.1.5",
|
||||
"inquirer": "9.2.0",
|
||||
"is-ci": "3.0.1",
|
||||
"issue-parser": "6.0.0",
|
||||
"lodash": "4.17.21",
|
||||
|
@ -23219,7 +23219,7 @@
|
|||
"os-name": "5.1.0",
|
||||
"promise.allsettled": "1.0.6",
|
||||
"proxy-agent": "5.0.0",
|
||||
"semver": "7.3.8",
|
||||
"semver": "7.5.0",
|
||||
"shelljs": "0.8.5",
|
||||
"update-notifier": "6.0.2",
|
||||
"url-join": "5.0.0",
|
||||
|
@ -23329,9 +23329,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"globby": {
|
||||
"version": "13.1.3",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz",
|
||||
"integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==",
|
||||
"version": "13.1.4",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz",
|
||||
"integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"dir-glob": "^3.0.1",
|
||||
|
@ -23525,9 +23525,9 @@
|
|||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.8",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||
"version": "7.5.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz",
|
||||
"integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
|
@ -23804,9 +23804,9 @@
|
|||
}
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz",
|
||||
"integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==",
|
||||
"version": "7.8.1",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
|
||||
"integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^2.1.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ocean-subgraph",
|
||||
"version": "3.0.6",
|
||||
"version": "3.0.7",
|
||||
"scripts": {
|
||||
"start": "",
|
||||
"quickstart:development": "node ./scripts/generatenetworkssubgraphs.js development && npm run codegen && npm run create:local && npm run deploy:local",
|
||||
|
@ -46,7 +46,7 @@
|
|||
"devDependencies": {
|
||||
"@graphprotocol/graph-cli": "^0.38.0",
|
||||
"@graphprotocol/graph-ts": "^0.29.3",
|
||||
"@types/chai": "^4.3.4",
|
||||
"@types/chai": "^4.3.5",
|
||||
"@types/chai-spies": "^1.0.3",
|
||||
"@types/mocha": "^10.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||
|
@ -64,7 +64,7 @@
|
|||
"mocha": "^10.2.0",
|
||||
"mock-local-storage": "^1.1.23",
|
||||
"prettier": "^2.8.8",
|
||||
"release-it": "^15.10.1",
|
||||
"release-it": "^15.10.2",
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-node": "^10.9.1",
|
||||
"ts-node-dev": "^2.0.0",
|
||||
|
|
|
@ -480,7 +480,7 @@ type VeDelegation @entity {
|
|||
delegator: VeOCEAN!
|
||||
receiver: VeOCEAN!
|
||||
tokenId: BigInt!
|
||||
amount: BigInt!
|
||||
amount: BigDecimal!
|
||||
cancelTime: BigInt!
|
||||
expireTime: BigInt!
|
||||
updates: [VeDelegationUpdate!] @derivedFrom(field: "veDelegation")
|
||||
|
@ -495,7 +495,7 @@ type VeDelegationUpdate @entity {
|
|||
tx: String!
|
||||
eventIndex: Int!
|
||||
sender: String!
|
||||
amount: BigInt!
|
||||
amount: BigDecimal!
|
||||
cancelTime: BigInt!
|
||||
expireTime: BigInt!
|
||||
"type: CREATE_BOOST = 0, EXTEND_BOOST = 1, BURN_BOOST = 2"
|
||||
|
|
|
@ -13,7 +13,7 @@ export function getGlobalStats(): GlobalStatistic {
|
|||
let globalStats = GlobalStatistic.load(GLOBAL_ID)
|
||||
if (!globalStats) {
|
||||
globalStats = new GlobalStatistic(GLOBAL_ID)
|
||||
globalStats.version = '3.0.6'
|
||||
globalStats.version = '3.0.7'
|
||||
globalStats.orderCount = 0
|
||||
globalStats.fixedCount = 0
|
||||
globalStats.datatokenCount = 0
|
||||
|
|
|
@ -137,7 +137,7 @@ export function getveDelegation(
|
|||
veDelegation.cancelTime = BigInt.zero()
|
||||
veDelegation.expireTime = BigInt.zero()
|
||||
veDelegation.tokenId = BigInt.zero()
|
||||
veDelegation.amount = BigInt.zero()
|
||||
veDelegation.amount = BigDecimal.zero()
|
||||
veDelegation.receiver = ''
|
||||
veDelegation.delegator = ''
|
||||
veDelegation.save()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { BigInt } from '@graphprotocol/graph-ts'
|
||||
import { BigDecimal, BigInt } from '@graphprotocol/graph-ts'
|
||||
import { VeDelegationUpdate } from '../@types/schema'
|
||||
import {
|
||||
BurnBoost,
|
||||
|
@ -6,6 +6,7 @@ import {
|
|||
ExtendBoost,
|
||||
TransferBoost
|
||||
} from '../@types/veDelegation/veDelegation'
|
||||
import { weiToDecimal } from './utils/generic'
|
||||
import { getveDelegation, getveOCEAN } from './utils/veUtils'
|
||||
|
||||
export function handleDelegation(event: DelegateBoost): void {
|
||||
|
@ -23,7 +24,10 @@ export function handleDelegation(event: DelegateBoost): void {
|
|||
veDelegation.delegator = _delegator
|
||||
veDelegation.receiver = _receiver
|
||||
veDelegation.tokenId = _tokenId
|
||||
veDelegation.amount = _amount
|
||||
veDelegation.amount = weiToDecimal(
|
||||
_amount.toBigDecimal(),
|
||||
BigInt.fromI32(18).toI32()
|
||||
)
|
||||
veDelegation.cancelTime = _cancelTime
|
||||
veDelegation.expireTime = _expireTime
|
||||
veDelegation.save()
|
||||
|
@ -37,7 +41,7 @@ export function handleDelegation(event: DelegateBoost): void {
|
|||
veDelegationUpdate.timestamp = event.block.timestamp.toI32()
|
||||
veDelegationUpdate.tx = event.transaction.hash.toHex()
|
||||
veDelegationUpdate.eventIndex = event.logIndex.toI32()
|
||||
veDelegationUpdate.amount = _amount
|
||||
veDelegationUpdate.amount = veDelegation.amount
|
||||
veDelegationUpdate.cancelTime = _cancelTime
|
||||
veDelegationUpdate.expireTime = _expireTime
|
||||
veDelegationUpdate.sender = event.transaction.from.toHex()
|
||||
|
@ -60,7 +64,10 @@ export function handleExtendBoost(event: ExtendBoost): void {
|
|||
veDelegation.delegator = _delegator
|
||||
veDelegation.receiver = _receiver
|
||||
veDelegation.tokenId = _tokenId
|
||||
veDelegation.amount = _amount
|
||||
veDelegation.amount = weiToDecimal(
|
||||
_amount.toBigDecimal(),
|
||||
BigInt.fromI32(18).toI32()
|
||||
)
|
||||
veDelegation.cancelTime = _cancelTime
|
||||
veDelegation.expireTime = _expireTime
|
||||
veDelegation.save()
|
||||
|
@ -74,7 +81,7 @@ export function handleExtendBoost(event: ExtendBoost): void {
|
|||
veDelegationUpdate.timestamp = event.block.timestamp.toI32()
|
||||
veDelegationUpdate.tx = event.transaction.hash.toHex()
|
||||
veDelegationUpdate.eventIndex = event.logIndex.toI32()
|
||||
veDelegationUpdate.amount = _amount
|
||||
veDelegationUpdate.amount = veDelegation.amount
|
||||
veDelegationUpdate.cancelTime = _cancelTime
|
||||
veDelegationUpdate.expireTime = _expireTime
|
||||
veDelegationUpdate.sender = event.transaction.from.toHex()
|
||||
|
@ -95,7 +102,7 @@ export function handleBurnBoost(event: BurnBoost): void {
|
|||
|
||||
// delete
|
||||
const veDelegation = getveDelegation(event.address, _tokenId.toHex())
|
||||
veDelegation.amount = BigInt.zero()
|
||||
veDelegation.amount = BigDecimal.zero()
|
||||
veDelegation.save()
|
||||
|
||||
const veDelegationUpdate = new VeDelegationUpdate(
|
||||
|
|
|
@ -799,7 +799,7 @@ describe('veOcean tests', async () => {
|
|||
'Invalid expireTime'
|
||||
)
|
||||
assert(
|
||||
delegations[0].updates[0].amount ==
|
||||
web3.utils.toWei(delegations[0].updates[0].amount) ==
|
||||
tx3.events.DelegateBoost.returnValues._amount,
|
||||
'Invalid amount'
|
||||
)
|
||||
|
@ -819,7 +819,7 @@ describe('veOcean tests', async () => {
|
|||
'Invalid expireTime for extend boost'
|
||||
)
|
||||
assert(
|
||||
delegations[0].updates[1].amount ==
|
||||
web3.utils.toWei(delegations[0].updates[1].amount) ==
|
||||
tx4.events.ExtendBoost.returnValues._amount,
|
||||
'Invalid amount for extend boost'
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue