1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

added back and fixed remaining tests

This commit is contained in:
Bogdan Fazakas 2021-11-10 19:23:40 +02:00
parent d6bc48655e
commit f35a58dfcf
4 changed files with 203 additions and 252 deletions

289
package-lock.json generated
View File

@ -2047,15 +2047,15 @@
}
},
"node_modules/@ethereumjs/block": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-3.5.1.tgz",
"integrity": "sha512-MoY9bHKABOBK6BW0v1N1Oc0Cve4x/giX67M3TtrVBUsKQTj2eznLGKpydoitxWSZ+WgKKSVhfRMzbCGRwk7T5w==",
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-3.6.0.tgz",
"integrity": "sha512-dqLo1LtsLG+Oelu5S5tWUDG0pah3QUwV5TJZy2cm19BXDr4ka/S9XBSgao0i09gTcuPlovlHgcs6d7EZ37urjQ==",
"peer": true,
"dependencies": {
"@ethereumjs/common": "^2.5.0",
"@ethereumjs/tx": "^3.3.1",
"ethereumjs-util": "^7.1.1",
"merkle-patricia-tree": "^4.2.1"
"@ethereumjs/common": "^2.6.0",
"@ethereumjs/tx": "^3.4.0",
"ethereumjs-util": "^7.1.3",
"merkle-patricia-tree": "^4.2.2"
}
},
"node_modules/@ethereumjs/block/node_modules/level-ws": {
@ -2102,19 +2102,18 @@
}
},
"node_modules/@ethereumjs/blockchain": {
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.4.2.tgz",
"integrity": "sha512-AOAAwz/lw2lciG9gf5wHi7M/qknraXXnLR66lYgbQ04qfyFC3ZE5x/5rLVm1Vu+kfJLlKrYZTmA0IbOkc7kvgw==",
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.5.0.tgz",
"integrity": "sha512-879YVmWbM8OUKLVj+OuEZ+sZFkQOnXYGeak5oi7O1hOjaRv//je+fK2axGP04cbttu7sPCp41zy7O6xw4cut8A==",
"peer": true,
"dependencies": {
"@ethereumjs/block": "^3.5.1",
"@ethereumjs/common": "^2.5.0",
"@ethereumjs/block": "^3.6.0",
"@ethereumjs/common": "^2.6.0",
"@ethereumjs/ethash": "^1.1.0",
"debug": "^2.2.0",
"ethereumjs-util": "^7.1.1",
"ethereumjs-util": "^7.1.3",
"level-mem": "^5.0.1",
"lru-cache": "^5.1.1",
"rlp": "^2.2.4",
"semaphore-async-await": "^1.5.1"
}
},
@ -2134,12 +2133,12 @@
"peer": true
},
"node_modules/@ethereumjs/common": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.5.0.tgz",
"integrity": "sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg==",
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.0.tgz",
"integrity": "sha512-Cq2qS0FTu6O2VU1sgg+WyU9Ps0M6j/BEMHN+hRaECXCV/r0aI78u4N6p52QW/BDVhwWZpCdrvG8X7NJdzlpNUA==",
"dependencies": {
"crc-32": "^1.2.0",
"ethereumjs-util": "^7.1.1"
"ethereumjs-util": "^7.1.3"
}
},
"node_modules/@ethereumjs/ethash": {
@ -2165,33 +2164,32 @@
}
},
"node_modules/@ethereumjs/tx": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.2.tgz",
"integrity": "sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog==",
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.4.0.tgz",
"integrity": "sha512-WWUwg1PdjHKZZxPPo274ZuPsJCWV3SqATrEKQP1n2DrVYVP1aZIYpo/mFaA0BDoE0tIQmBeimRCEA0Lgil+yYw==",
"dependencies": {
"@ethereumjs/common": "^2.5.0",
"ethereumjs-util": "^7.1.2"
"@ethereumjs/common": "^2.6.0",
"ethereumjs-util": "^7.1.3"
}
},
"node_modules/@ethereumjs/vm": {
"version": "5.5.3",
"resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-5.5.3.tgz",
"integrity": "sha512-0k5OreWnlgXYs54wohgO11jtGI05GDasj2EYxzuaStxTi15CS3vow5wGYELC1pG9xngE1F/mFmKi/f14XRuDow==",
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-5.6.0.tgz",
"integrity": "sha512-J2m/OgjjiGdWF2P9bj/4LnZQ1zRoZhY8mRNVw/N3tXliGI8ai1sI1mlDPkLpeUUM4vq54gH6n0ZlSpz8U/qlYQ==",
"peer": true,
"dependencies": {
"@ethereumjs/block": "^3.5.0",
"@ethereumjs/blockchain": "^5.4.1",
"@ethereumjs/common": "^2.5.0",
"@ethereumjs/tx": "^3.3.1",
"@ethereumjs/block": "^3.6.0",
"@ethereumjs/blockchain": "^5.5.0",
"@ethereumjs/common": "^2.6.0",
"@ethereumjs/tx": "^3.4.0",
"async-eventemitter": "^0.2.4",
"core-js-pure": "^3.0.1",
"debug": "^2.2.0",
"ethereumjs-util": "^7.1.1",
"ethereumjs-util": "^7.1.3",
"functional-red-black-tree": "^1.0.1",
"mcl-wasm": "^0.7.1",
"merkle-patricia-tree": "^4.2.1",
"rustbn.js": "~0.2.0",
"util.promisify": "^1.0.1"
"merkle-patricia-tree": "^4.2.2",
"rustbn.js": "~0.2.0"
}
},
"node_modules/@ethereumjs/vm/node_modules/debug": {
@ -3053,7 +3051,7 @@
"node_modules/@oceanprotocol/contracts": {
"name": "hardhat-project",
"version": "v1.0.0-alpha.1",
"resolved": "git+ssh://git@github.com/oceanprotocol/contracts.git#a8292971264794219e86c46c4f5d8eb9d5ce9d37",
"resolved": "git+ssh://git@github.com/oceanprotocol/contracts.git#c1bea5033dfc9071105a11b63ce86d8e8f612b7b",
"dependencies": {
"@balancer-labs/v2-pool-utils": "^1.0.0",
"@openzeppelin/contracts": "^4.2.0",
@ -3552,9 +3550,9 @@
"integrity": "sha512-BFo/nyxwhoHqPrqBQA1EAmSxeNnspGLiOCMa9pAL7WYSjyNBlrHaqCMO/F2O87G+NUK/u06E70DiSP2BFP0ZZw=="
},
"node_modules/@truffle/codec": {
"version": "0.11.17",
"resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.11.17.tgz",
"integrity": "sha512-WO9D5TVyTf9czqdsfK/qqYeSS//zWcHBgQgSNKPlCDb6koCNLxG5yGbb4P+0bZvTUNS2e2iIdN92QHg00wMbSQ==",
"version": "0.11.18",
"resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.11.18.tgz",
"integrity": "sha512-OCsKQHOBAmjr+9DypTkTxWYqHmCd388astUvC+ycwlmAqGKIYy2GzpOIX4pX7YX0q/g2iuixEMCTlF440YiNMA==",
"dependencies": {
"@truffle/abi-utils": "^0.2.4",
"@truffle/compile-common": "^0.7.22",
@ -3653,17 +3651,18 @@
}
},
"node_modules/@truffle/contract": {
"version": "4.3.38",
"resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.3.38.tgz",
"integrity": "sha512-11HL9IJTmd45pVXJvEaRYeyuhf8GmAgRD7bTYBZj2CiMBnt0337Fg7Zz/GuTpUUW2h3fbyTYO4hgOntxdQjZ5A==",
"version": "4.3.39",
"resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.3.39.tgz",
"integrity": "sha512-ZBCrFUWaTtOvKlJw2J2bDwaBghGDvb5AeVU1WxHvwLnzGqCHzIE6dhZixItdFQgbuZ2gJAxzFQVT38miiK7ufA==",
"dependencies": {
"@ensdomains/ensjs": "^2.0.1",
"@truffle/blockchain-utils": "^0.0.31",
"@truffle/contract-schema": "^3.4.3",
"@truffle/debug-utils": "^5.1.18",
"@truffle/debug-utils": "^5.1.19",
"@truffle/error": "^0.0.14",
"@truffle/interface-adapter": "^0.5.8",
"bignumber.js": "^7.2.1",
"debug": "^4.3.1",
"ethers": "^4.0.32",
"web3": "1.5.3",
"web3-core-helpers": "1.5.3",
@ -3709,9 +3708,9 @@
}
},
"node_modules/@truffle/contract/node_modules/@types/node": {
"version": "12.20.36",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.36.tgz",
"integrity": "sha512-+5haRZ9uzI7rYqzDznXgkuacqb6LJhAti8mzZKWxIXn/WEtvB+GHVJ7AuMwcN1HMvXOSJcrvA6PPoYHYOYYebA=="
"version": "12.20.37",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.37.tgz",
"integrity": "sha512-i1KGxqcvJaLQali+WuypQnXwcplhtNtjs66eNsZpp2P2FL/trJJxx/VWsM0YCL2iMoIJrbXje48lvIQAQ4p2ZA=="
},
"node_modules/@truffle/contract/node_modules/cacheable-request": {
"version": "6.1.0",
@ -4147,11 +4146,11 @@
}
},
"node_modules/@truffle/debug-utils": {
"version": "5.1.18",
"resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.1.18.tgz",
"integrity": "sha512-QBq1vA/YozksQZGjyA7o482AuT8KW5gvO8VmYM/PIDllCIqDruEZuz4DZ+zpVUPXyVoJycFo+RKnM/TLE1AZRQ==",
"version": "5.1.19",
"resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.1.19.tgz",
"integrity": "sha512-MWk2DszA6Alme1r4SrWu7BZgz7RNf1TsxdJuSToSltGiJE7DDwV+qsfQ+AGY/PoLKPTQ2xW/sd23BQheA+W9qA==",
"dependencies": {
"@truffle/codec": "^0.11.17",
"@truffle/codec": "^0.11.18",
"@trufflesuite/chromafi": "^2.2.2",
"bn.js": "^5.1.3",
"chalk": "^2.4.2",
@ -4244,9 +4243,9 @@
}
},
"node_modules/@truffle/interface-adapter/node_modules/@types/node": {
"version": "12.20.36",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.36.tgz",
"integrity": "sha512-+5haRZ9uzI7rYqzDznXgkuacqb6LJhAti8mzZKWxIXn/WEtvB+GHVJ7AuMwcN1HMvXOSJcrvA6PPoYHYOYYebA=="
"version": "12.20.37",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.37.tgz",
"integrity": "sha512-i1KGxqcvJaLQali+WuypQnXwcplhtNtjs66eNsZpp2P2FL/trJJxx/VWsM0YCL2iMoIJrbXje48lvIQAQ4p2ZA=="
},
"node_modules/@truffle/interface-adapter/node_modules/bignumber.js": {
"version": "9.0.1",
@ -7469,9 +7468,9 @@
}
},
"node_modules/core-js-pure": {
"version": "3.19.0",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.0.tgz",
"integrity": "sha512-UEQk8AxyCYvNAs6baNoPqDADv7BX0AmBLGxVsrAifPPx/C8EAzV4Q+2ZUJqVzfI2TQQEZITnwUkWcHpgc/IubQ==",
"version": "3.19.1",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.1.tgz",
"integrity": "sha512-Q0Knr8Es84vtv62ei6/6jXH/7izKmOrtrxH9WJTHLCMAVeU+8TF8z8Nr08CsH4Ot0oJKzBzJJL9SJBYIv7WlfQ==",
"hasInstallScript": true,
"peer": true,
"funding": {
@ -11108,15 +11107,6 @@
}
}
},
"node_modules/for-each": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
"integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
"peer": true,
"dependencies": {
"is-callable": "^1.1.3"
}
},
"node_modules/for-in": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
@ -12662,9 +12652,9 @@
}
},
"node_modules/hardhat": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.6.7.tgz",
"integrity": "sha512-Mua01f6ZN1feQLktHSH2p5A5LCdA+Wf7+O2lJDH6wClvWPtI2eqKNNY2gxBwYXoQ28GZrT3K6mqQOZeRWAca6Q==",
"version": "2.6.8",
"resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.6.8.tgz",
"integrity": "sha512-iRVd5DgcIVV3rNXMlogOfwlXAhHp7Wy/OjjFiUhTey8Unvo6oq5+Is5ANiKVN+Iw07Pcb/HpkGt7jCB6a4ITgg==",
"peer": true,
"dependencies": {
"@ethereumjs/block": "^3.4.0",
@ -13779,9 +13769,9 @@
}
},
"node_modules/highlightjs-solidity": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.1.tgz",
"integrity": "sha512-9YY+HQpXMTrF8HgRByjeQhd21GXAz2ktMPTcs6oWSj5HJR52fgsNoelMOmgigwcpt9j4tu4IVSaWaJB2n2TbvQ=="
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.2.tgz",
"integrity": "sha512-q0aYUKiZ9MPQg41qx/KpXKaCpqql50qTvmwGYyLFfcjt9AE/+C9CwjVIdJZc7EYj6NGgJuFJ4im1gfgrzUU1fQ=="
},
"node_modules/hmac-drbg": {
"version": "1.0.1",
@ -23186,22 +23176,6 @@
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"node_modules/util.promisify": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.1.1.tgz",
"integrity": "sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw==",
"peer": true,
"dependencies": {
"call-bind": "^1.0.0",
"define-properties": "^1.1.3",
"for-each": "^0.3.3",
"has-symbols": "^1.0.1",
"object.getownpropertydescriptors": "^2.1.1"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
@ -27215,15 +27189,15 @@
}
},
"@ethereumjs/block": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-3.5.1.tgz",
"integrity": "sha512-MoY9bHKABOBK6BW0v1N1Oc0Cve4x/giX67M3TtrVBUsKQTj2eznLGKpydoitxWSZ+WgKKSVhfRMzbCGRwk7T5w==",
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-3.6.0.tgz",
"integrity": "sha512-dqLo1LtsLG+Oelu5S5tWUDG0pah3QUwV5TJZy2cm19BXDr4ka/S9XBSgao0i09gTcuPlovlHgcs6d7EZ37urjQ==",
"peer": true,
"requires": {
"@ethereumjs/common": "^2.5.0",
"@ethereumjs/tx": "^3.3.1",
"ethereumjs-util": "^7.1.1",
"merkle-patricia-tree": "^4.2.1"
"@ethereumjs/common": "^2.6.0",
"@ethereumjs/tx": "^3.4.0",
"ethereumjs-util": "^7.1.3",
"merkle-patricia-tree": "^4.2.2"
},
"dependencies": {
"level-ws": {
@ -27266,19 +27240,18 @@
}
},
"@ethereumjs/blockchain": {
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.4.2.tgz",
"integrity": "sha512-AOAAwz/lw2lciG9gf5wHi7M/qknraXXnLR66lYgbQ04qfyFC3ZE5x/5rLVm1Vu+kfJLlKrYZTmA0IbOkc7kvgw==",
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.5.0.tgz",
"integrity": "sha512-879YVmWbM8OUKLVj+OuEZ+sZFkQOnXYGeak5oi7O1hOjaRv//je+fK2axGP04cbttu7sPCp41zy7O6xw4cut8A==",
"peer": true,
"requires": {
"@ethereumjs/block": "^3.5.1",
"@ethereumjs/common": "^2.5.0",
"@ethereumjs/block": "^3.6.0",
"@ethereumjs/common": "^2.6.0",
"@ethereumjs/ethash": "^1.1.0",
"debug": "^2.2.0",
"ethereumjs-util": "^7.1.1",
"ethereumjs-util": "^7.1.3",
"level-mem": "^5.0.1",
"lru-cache": "^5.1.1",
"rlp": "^2.2.4",
"semaphore-async-await": "^1.5.1"
},
"dependencies": {
@ -27300,12 +27273,12 @@
}
},
"@ethereumjs/common": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.5.0.tgz",
"integrity": "sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg==",
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.0.tgz",
"integrity": "sha512-Cq2qS0FTu6O2VU1sgg+WyU9Ps0M6j/BEMHN+hRaECXCV/r0aI78u4N6p52QW/BDVhwWZpCdrvG8X7NJdzlpNUA==",
"requires": {
"crc-32": "^1.2.0",
"ethereumjs-util": "^7.1.1"
"ethereumjs-util": "^7.1.3"
}
},
"@ethereumjs/ethash": {
@ -27333,33 +27306,32 @@
}
},
"@ethereumjs/tx": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.2.tgz",
"integrity": "sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog==",
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.4.0.tgz",
"integrity": "sha512-WWUwg1PdjHKZZxPPo274ZuPsJCWV3SqATrEKQP1n2DrVYVP1aZIYpo/mFaA0BDoE0tIQmBeimRCEA0Lgil+yYw==",
"requires": {
"@ethereumjs/common": "^2.5.0",
"ethereumjs-util": "^7.1.2"
"@ethereumjs/common": "^2.6.0",
"ethereumjs-util": "^7.1.3"
}
},
"@ethereumjs/vm": {
"version": "5.5.3",
"resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-5.5.3.tgz",
"integrity": "sha512-0k5OreWnlgXYs54wohgO11jtGI05GDasj2EYxzuaStxTi15CS3vow5wGYELC1pG9xngE1F/mFmKi/f14XRuDow==",
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-5.6.0.tgz",
"integrity": "sha512-J2m/OgjjiGdWF2P9bj/4LnZQ1zRoZhY8mRNVw/N3tXliGI8ai1sI1mlDPkLpeUUM4vq54gH6n0ZlSpz8U/qlYQ==",
"peer": true,
"requires": {
"@ethereumjs/block": "^3.5.0",
"@ethereumjs/blockchain": "^5.4.1",
"@ethereumjs/common": "^2.5.0",
"@ethereumjs/tx": "^3.3.1",
"@ethereumjs/block": "^3.6.0",
"@ethereumjs/blockchain": "^5.5.0",
"@ethereumjs/common": "^2.6.0",
"@ethereumjs/tx": "^3.4.0",
"async-eventemitter": "^0.2.4",
"core-js-pure": "^3.0.1",
"debug": "^2.2.0",
"ethereumjs-util": "^7.1.1",
"ethereumjs-util": "^7.1.3",
"functional-red-black-tree": "^1.0.1",
"mcl-wasm": "^0.7.1",
"merkle-patricia-tree": "^4.2.1",
"rustbn.js": "~0.2.0",
"util.promisify": "^1.0.1"
"merkle-patricia-tree": "^4.2.2",
"rustbn.js": "~0.2.0"
},
"dependencies": {
"debug": {
@ -27883,7 +27855,7 @@
}
},
"@oceanprotocol/contracts": {
"version": "git+ssh://git@github.com/oceanprotocol/contracts.git#a8292971264794219e86c46c4f5d8eb9d5ce9d37",
"version": "git+ssh://git@github.com/oceanprotocol/contracts.git#c1bea5033dfc9071105a11b63ce86d8e8f612b7b",
"from": "@oceanprotocol/contracts@github:oceanprotocol/contracts#v4main",
"requires": {
"@balancer-labs/v2-pool-utils": "^1.0.0",
@ -28318,9 +28290,9 @@
"integrity": "sha512-BFo/nyxwhoHqPrqBQA1EAmSxeNnspGLiOCMa9pAL7WYSjyNBlrHaqCMO/F2O87G+NUK/u06E70DiSP2BFP0ZZw=="
},
"@truffle/codec": {
"version": "0.11.17",
"resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.11.17.tgz",
"integrity": "sha512-WO9D5TVyTf9czqdsfK/qqYeSS//zWcHBgQgSNKPlCDb6koCNLxG5yGbb4P+0bZvTUNS2e2iIdN92QHg00wMbSQ==",
"version": "0.11.18",
"resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.11.18.tgz",
"integrity": "sha512-OCsKQHOBAmjr+9DypTkTxWYqHmCd388astUvC+ycwlmAqGKIYy2GzpOIX4pX7YX0q/g2iuixEMCTlF440YiNMA==",
"requires": {
"@truffle/abi-utils": "^0.2.4",
"@truffle/compile-common": "^0.7.22",
@ -28413,17 +28385,18 @@
}
},
"@truffle/contract": {
"version": "4.3.38",
"resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.3.38.tgz",
"integrity": "sha512-11HL9IJTmd45pVXJvEaRYeyuhf8GmAgRD7bTYBZj2CiMBnt0337Fg7Zz/GuTpUUW2h3fbyTYO4hgOntxdQjZ5A==",
"version": "4.3.39",
"resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.3.39.tgz",
"integrity": "sha512-ZBCrFUWaTtOvKlJw2J2bDwaBghGDvb5AeVU1WxHvwLnzGqCHzIE6dhZixItdFQgbuZ2gJAxzFQVT38miiK7ufA==",
"requires": {
"@ensdomains/ensjs": "^2.0.1",
"@truffle/blockchain-utils": "^0.0.31",
"@truffle/contract-schema": "^3.4.3",
"@truffle/debug-utils": "^5.1.18",
"@truffle/debug-utils": "^5.1.19",
"@truffle/error": "^0.0.14",
"@truffle/interface-adapter": "^0.5.8",
"bignumber.js": "^7.2.1",
"debug": "^4.3.1",
"ethers": "^4.0.32",
"web3": "1.5.3",
"web3-core-helpers": "1.5.3",
@ -28454,9 +28427,9 @@
}
},
"@types/node": {
"version": "12.20.36",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.36.tgz",
"integrity": "sha512-+5haRZ9uzI7rYqzDznXgkuacqb6LJhAti8mzZKWxIXn/WEtvB+GHVJ7AuMwcN1HMvXOSJcrvA6PPoYHYOYYebA=="
"version": "12.20.37",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.37.tgz",
"integrity": "sha512-i1KGxqcvJaLQali+WuypQnXwcplhtNtjs66eNsZpp2P2FL/trJJxx/VWsM0YCL2iMoIJrbXje48lvIQAQ4p2ZA=="
},
"cacheable-request": {
"version": "6.1.0",
@ -28820,11 +28793,11 @@
}
},
"@truffle/debug-utils": {
"version": "5.1.18",
"resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.1.18.tgz",
"integrity": "sha512-QBq1vA/YozksQZGjyA7o482AuT8KW5gvO8VmYM/PIDllCIqDruEZuz4DZ+zpVUPXyVoJycFo+RKnM/TLE1AZRQ==",
"version": "5.1.19",
"resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.1.19.tgz",
"integrity": "sha512-MWk2DszA6Alme1r4SrWu7BZgz7RNf1TsxdJuSToSltGiJE7DDwV+qsfQ+AGY/PoLKPTQ2xW/sd23BQheA+W9qA==",
"requires": {
"@truffle/codec": "^0.11.17",
"@truffle/codec": "^0.11.18",
"@trufflesuite/chromafi": "^2.2.2",
"bn.js": "^5.1.3",
"chalk": "^2.4.2",
@ -28915,9 +28888,9 @@
}
},
"@types/node": {
"version": "12.20.36",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.36.tgz",
"integrity": "sha512-+5haRZ9uzI7rYqzDznXgkuacqb6LJhAti8mzZKWxIXn/WEtvB+GHVJ7AuMwcN1HMvXOSJcrvA6PPoYHYOYYebA=="
"version": "12.20.37",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.37.tgz",
"integrity": "sha512-i1KGxqcvJaLQali+WuypQnXwcplhtNtjs66eNsZpp2P2FL/trJJxx/VWsM0YCL2iMoIJrbXje48lvIQAQ4p2ZA=="
},
"bignumber.js": {
"version": "9.0.1",
@ -31528,9 +31501,9 @@
}
},
"core-js-pure": {
"version": "3.19.0",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.0.tgz",
"integrity": "sha512-UEQk8AxyCYvNAs6baNoPqDADv7BX0AmBLGxVsrAifPPx/C8EAzV4Q+2ZUJqVzfI2TQQEZITnwUkWcHpgc/IubQ==",
"version": "3.19.1",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.1.tgz",
"integrity": "sha512-Q0Knr8Es84vtv62ei6/6jXH/7izKmOrtrxH9WJTHLCMAVeU+8TF8z8Nr08CsH4Ot0oJKzBzJJL9SJBYIv7WlfQ==",
"peer": true
},
"core-util-is": {
@ -34462,15 +34435,6 @@
"integrity": "sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==",
"peer": true
},
"for-each": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
"integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
"peer": true,
"requires": {
"is-callable": "^1.1.3"
}
},
"for-in": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
@ -35507,9 +35471,9 @@
}
},
"hardhat": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.6.7.tgz",
"integrity": "sha512-Mua01f6ZN1feQLktHSH2p5A5LCdA+Wf7+O2lJDH6wClvWPtI2eqKNNY2gxBwYXoQ28GZrT3K6mqQOZeRWAca6Q==",
"version": "2.6.8",
"resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.6.8.tgz",
"integrity": "sha512-iRVd5DgcIVV3rNXMlogOfwlXAhHp7Wy/OjjFiUhTey8Unvo6oq5+Is5ANiKVN+Iw07Pcb/HpkGt7jCB6a4ITgg==",
"peer": true,
"requires": {
"@ethereumjs/block": "^3.4.0",
@ -36376,9 +36340,9 @@
"integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="
},
"highlightjs-solidity": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.1.tgz",
"integrity": "sha512-9YY+HQpXMTrF8HgRByjeQhd21GXAz2ktMPTcs6oWSj5HJR52fgsNoelMOmgigwcpt9j4tu4IVSaWaJB2n2TbvQ=="
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.2.tgz",
"integrity": "sha512-q0aYUKiZ9MPQg41qx/KpXKaCpqql50qTvmwGYyLFfcjt9AE/+C9CwjVIdJZc7EYj6NGgJuFJ4im1gfgrzUU1fQ=="
},
"hmac-drbg": {
"version": "1.0.1",
@ -43650,19 +43614,6 @@
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"util.promisify": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.1.1.tgz",
"integrity": "sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw==",
"peer": true,
"requires": {
"call-bind": "^1.0.0",
"define-properties": "^1.1.3",
"for-each": "^0.3.3",
"has-symbols": "^1.0.1",
"object.getownpropertydescriptors": "^2.1.1"
}
},
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",

View File

@ -633,76 +633,76 @@ describe('Pool unit test', () => {
expect(await erc20Contract.methods.balanceOf(user2).call()).to.equal('0')
})
// it('#calcPoolOutGivenSingleIn - should get the amount of pool OUT for exact token IN', async () => {
// // since rate is 1 and the pool is just created
// // amount of pool out received for same amount of different token In is equal
// const tokenInAmount = '10' // 10 USDC or 10 DTs
// expect(
// await pool.calcPoolOutGivenSingleIn(poolAddress, erc20Token, tokenInAmount)
// ).to.equal(
// await pool.calcPoolOutGivenSingleIn(
// poolAddress,
// contracts.usdcAddress,
// tokenInAmount
// )
// )
// // console.log(await pool.calcPoolOutGivenSingleIn(poolAddress, erc20Token, tokenInAmount))
// })
it('#calcPoolOutGivenSingleIn - should get the amount of pool OUT for exact token IN', async () => {
// since rate is 1 and the pool is just created
// amount of pool out received for same amount of different token In is equal
const tokenInAmount = '10' // 10 USDC or 10 DTs
expect(
await pool.calcPoolOutGivenSingleIn(poolAddress, erc20Token, tokenInAmount)
).to.equal(
await pool.calcPoolOutGivenSingleIn(
poolAddress,
contracts.usdcAddress,
tokenInAmount
)
)
// console.log(await pool.calcPoolOutGivenSingleIn(poolAddress, erc20Token, tokenInAmount))
})
// it('#calcSingleInGivenPoolOut - should get the amount of token IN for exact pool token OUT', async () => {
// // since rate is 1 and the pool is just created
// // amount of different token In for getting same pool amount out is equal
// const poolAmountOut = '1'
// expect(
// parseInt(
// await pool.calcSingleInGivenPoolOut(poolAddress, erc20Token, poolAmountOut)
// )
// ).to.be.closeTo(
// parseInt(
// await pool.calcSingleInGivenPoolOut(
// poolAddress,
// contracts.usdcAddress,
// poolAmountOut
// )
// ),
// 1e9
// )
// })
it('#calcSingleInGivenPoolOut - should get the amount of token IN for exact pool token OUT', async () => {
// since rate is 1 and the pool is just created
// amount of different token In for getting same pool amount out is equal
const poolAmountOut = '1'
expect(
parseInt(
await pool.calcSingleInGivenPoolOut(poolAddress, erc20Token, poolAmountOut)
)
).to.be.closeTo(
parseInt(
await pool.calcSingleInGivenPoolOut(
poolAddress,
contracts.usdcAddress,
poolAmountOut
)
),
1e9
)
})
// it('#calcSingleOutGivenPoolIn - should get the amount of token OUT for exact pool token IN', async () => {
// // since rate is 1 and the pool is just created
// // amount amount of different token Out for rediming the same pool In is equal
// const poolAmountIn = '10'
// expect(
// await pool.calcSingleOutGivenPoolIn(poolAddress, erc20Token, poolAmountIn)
// ).to.equal(
// await pool.calcSingleOutGivenPoolIn(
// poolAddress,
// contracts.usdcAddress,
// poolAmountIn
// )
// )
// })
it('#calcSingleOutGivenPoolIn - should get the amount of token OUT for exact pool token IN', async () => {
// since rate is 1 and the pool is just created
// amount amount of different token Out for rediming the same pool In is equal
const poolAmountIn = '10'
expect(
await pool.calcSingleOutGivenPoolIn(poolAddress, erc20Token, poolAmountIn)
).to.equal(
await pool.calcSingleOutGivenPoolIn(
poolAddress,
contracts.usdcAddress,
poolAmountIn
)
)
})
// it('#calcPoolInGivenSingleOut - should get the amount of pool IN for exact token OUT', async () => {
// // since rate is 1 and the pool is just created
// // amount of pool In for getting the same amount of different token Out is equal
// const tokenAmountOut = '10'
// expect(
// parseInt(
// await pool.calcPoolInGivenSingleOut(poolAddress, erc20Token, tokenAmountOut)
// )
// ).to.be.closeTo(
// parseInt(
// await pool.calcPoolInGivenSingleOut(
// poolAddress,
// contracts.usdcAddress,
// tokenAmountOut
// )
// ),
// 1e11
// )
// })
it('#calcPoolInGivenSingleOut - should get the amount of pool IN for exact token OUT', async () => {
// since rate is 1 and the pool is just created
// amount of pool In for getting the same amount of different token Out is equal
const tokenAmountOut = '10'
expect(
parseInt(
await pool.calcPoolInGivenSingleOut(poolAddress, erc20Token, tokenAmountOut)
)
).to.be.closeTo(
parseInt(
await pool.calcPoolInGivenSingleOut(
poolAddress,
contracts.usdcAddress,
tokenAmountOut
)
),
1e11
)
})
it('#sharesBalance - should return user shares balance (datatoken balance, LPT balance, etc) ', async () => {
expect(await usdcContract.methods.balanceOf(user2).call()).to.equal(

View File

@ -133,7 +133,7 @@ describe('Fixed Rate unit test', () => {
marketFeeCollector: user3,
baseTokenDecimals: 18,
dataTokenDecimals: 18,
fixedRate: '1',
fixedRate: web3.utils.toWei('1'),
marketFee: 1e15,
allowedConsumer: ADDRESS_ZERO,
withMint: false
@ -218,9 +218,9 @@ describe('Fixed Rate unit test', () => {
expect(exchangeIds[0]).to.equal(exchangeId)
})
// it('#getRate - should return rate', async () => {
// expect(await fixedRate.getRate(exchangeId)).to.equal('1')
// })
it('#getRate - should return rate', async () => {
expect(await fixedRate.getRate(exchangeId)).to.equal('1')
})
it('#setRate - set new rate if exchangeOwner', async () => {
await fixedRate.setRate(exchangeOwner, exchangeId, '2')
@ -461,7 +461,7 @@ describe('Fixed Rate unit test', () => {
marketFeeCollector: user3,
baseTokenDecimals: 6,
dataTokenDecimals: 18,
fixedRate: '1',
fixedRate: web3.utils.toWei('1'),
marketFee: 1e15,
allowedConsumer: ADDRESS_ZERO,
withMint: false
@ -550,9 +550,9 @@ describe('Fixed Rate unit test', () => {
expect(exchangeIds[1]).to.equal(exchangeId)
})
// it('#getRate - should return rate', async () => {
// expect(await fixedRate.getRate(exchangeId)).to.equal('1')
// })
it('#getRate - should return rate', async () => {
expect(await fixedRate.getRate(exchangeId)).to.equal('1')
})
it('#setRate - set new rate if exchangeOwner', async () => {
await fixedRate.setRate(exchangeOwner, exchangeId, '2')

View File

@ -203,14 +203,14 @@ describe('SideStaking unit test', () => {
)
).to.equal(web3.utils.toWei('12000'))
})
// it('#getDataTokenCurrentCirculatingSupply - should get datatoken supply in circulation ', async () => {
// expect(
// await sideStaking.getDataTokenCurrentCirculatingSupply(
// contracts.sideStakingAddress,
// erc20Token
// )
// ).to.equal(web3.utils.toWei('2000'))
// })
it('#getDataTokenCurrentCirculatingSupply - should get datatoken supply in circulation ', async () => {
expect(
await sideStaking.getDataTokenCurrentCirculatingSupply(
contracts.sideStakingAddress,
erc20Token
)
).to.equal(web3.utils.toWei('2000'))
})
it('#getBasetoken - should get basetoken address', async () => {
expect(await sideStaking.getBasetoken(sideStakingAddress, erc20Token)).to.equal(
contracts.daiAddress