|
|
@@ -1,4 +1,4 @@
|
|
|
-import { web3 } from "hardhat";
|
|
|
+import { web3, ethers } from "hardhat";
|
|
|
import logger from "../../utils/logger";
|
|
|
import contracts from "../../config/contracts";
|
|
|
|
|
|
@@ -6,9 +6,15 @@ function test1() {}
|
|
|
function test2() {
|
|
|
new web3.eth.Contract([], contracts.UNIV3)
|
|
|
}
|
|
|
+function test21() {
|
|
|
+ new ethers.Contract(contracts.UNIV3, [])
|
|
|
+}
|
|
|
function test3() {
|
|
|
web3.utils.toChecksumAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2')
|
|
|
}
|
|
|
+function test31() {
|
|
|
+ ethers.utils.getAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2')
|
|
|
+}
|
|
|
|
|
|
async function run(fun: Function) {
|
|
|
const startTs = new Date().getTime()
|
|
|
@@ -30,7 +36,9 @@ async function main() {
|
|
|
for (let i = 0; i < 100; i++) {
|
|
|
// await run(test1)
|
|
|
// await run(test2)
|
|
|
- await run(test3)
|
|
|
+ // await run(test21)
|
|
|
+ // await run(test3)
|
|
|
+ await run(test31)
|
|
|
}
|
|
|
}
|
|
|
|