Skip to content

Commit

Permalink
ethers6 lib migration
Browse files Browse the repository at this point in the history
  • Loading branch information
clbrge committed Apr 18, 2023
1 parent b5daf82 commit 6ec06ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/rouge.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0

import { Buffer } from 'buffer'
import { utils, constants, BigNumber, ethers } from 'ethers'
import { utils, constants, ethers } from 'ethers'

import { TokenAmount } from 'erc-token-js'

Expand Down Expand Up @@ -87,7 +87,7 @@ export const calculateStampProof = async ({ contract, signer, secret, tokenId, c
if (tokenId) {
if (!contract) fatal('not enough element to calculate stamp proof')
void({ channelId } = await contract.getTokenInfos(tokenId))
const event = (await contract.queryFilter(contract.filters.Acquired(BigNumber.from(tokenId)), 0)).pop() || {}
const event = (await contract.queryFilter(contract.filters.Acquired(BigInt(tokenId)), 0)).pop() || {}
void({ salt, index } = event.args)
}
trace('[calculateStampProof OUT]', { channelId, secretHash, salt, index })
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
"./rouge": {
"import": "./lib/rouge.mjs"
},
"./Token": {
"import": "./lib/Token.mjs"
},
"./Artifacts.json": {
"import": "./deployments/Artifacts.json"
},
Expand Down

0 comments on commit 6ec06ca

Please sign in to comment.