mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
remove hardhat deps
This commit is contained in:
parent
13827001e8
commit
5611eab817
2154
package-lock.json
generated
2154
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -53,13 +53,11 @@
|
|||||||
"web3": "^1.8.0"
|
"web3": "^1.8.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nomiclabs/hardhat-ethers": "^2.2.3",
|
|
||||||
"@oceanprotocol/contracts": "^2.2.0",
|
"@oceanprotocol/contracts": "^2.2.0",
|
||||||
"cross-fetch": "^4.0.0",
|
"cross-fetch": "^4.0.0",
|
||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.1.1",
|
||||||
"decimal.js": "^10.4.1",
|
"decimal.js": "^10.4.1",
|
||||||
"ethers": "^5.7.2",
|
"ethers": "^5.7.2"
|
||||||
"hardhat": "^2.22.10"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@truffle/hdwallet-provider": "^2.0.14",
|
"@truffle/hdwallet-provider": "^2.0.14",
|
||||||
|
@ -1,8 +1,21 @@
|
|||||||
import { assert } from 'chai'
|
import { assert } from 'chai'
|
||||||
import { KNOWN_CONFIDENTIAL_EVMS } from '../../src/config'
|
import { KNOWN_CONFIDENTIAL_EVMS } from '../../src/config'
|
||||||
import { calculateTemplateIndex, isConfidentialEVM } from '../../src/utils'
|
import { provider, getAddresses } from '../config'
|
||||||
|
import {
|
||||||
|
calculateActiveTemplateIndex,
|
||||||
|
calculateTemplateIndex,
|
||||||
|
isConfidentialEVM
|
||||||
|
} from '../../src/utils'
|
||||||
|
import { Signer } from 'ethers/lib/ethers'
|
||||||
|
|
||||||
|
let nftOwner: Signer
|
||||||
|
let addresses: any
|
||||||
describe('Asset utils (createAsset)', () => {
|
describe('Asset utils (createAsset)', () => {
|
||||||
|
before(async () => {
|
||||||
|
nftOwner = (await provider.getSigner(0)) as Signer
|
||||||
|
addresses = await getAddresses()
|
||||||
|
})
|
||||||
|
|
||||||
it('should check if confidential EVM', async () => {
|
it('should check if confidential EVM', async () => {
|
||||||
for (const network of KNOWN_CONFIDENTIAL_EVMS.networks) {
|
for (const network of KNOWN_CONFIDENTIAL_EVMS.networks) {
|
||||||
network.name.map((networkName) => {
|
network.name.map((networkName) => {
|
||||||
@ -79,4 +92,21 @@ describe('Asset utils (createAsset)', () => {
|
|||||||
)
|
)
|
||||||
assert(notOkIndexNonConfidential === -1, 'Template 3 should not exist on sepolia!')
|
assert(notOkIndexNonConfidential === -1, 'Template 3 should not exist on sepolia!')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// checking if active by connecting to the smart contract as well
|
||||||
|
it('V2 - should get correct template index from contract artifacts (using template ID as template)', async () => {
|
||||||
|
const okTemplate = await calculateActiveTemplateIndex(
|
||||||
|
nftOwner,
|
||||||
|
addresses.ERC721Factory,
|
||||||
|
3
|
||||||
|
)
|
||||||
|
assert(okTemplate === 3, 'wrong template index, should be index 3!')
|
||||||
|
|
||||||
|
const wrongOne = await calculateActiveTemplateIndex(
|
||||||
|
nftOwner,
|
||||||
|
addresses.ERC721Factory,
|
||||||
|
6
|
||||||
|
)
|
||||||
|
assert(wrongOne === -1, 'wrong template index, should only exist 3!')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user