-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
experimental changes for better tests
- Loading branch information
Showing
21 changed files
with
2,315 additions
and
10,896 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [staging, mainnet] | ||
pull_request: | ||
# TODO: reenable | ||
on: [] | ||
|
||
jobs: | ||
wiki_address_check: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/node_modules/@nomicfoundation/hardhat-viem/internal/clients.js b/node_modules/@nomicfoundation/hardhat-viem/internal/clients.js | ||
index 9466df2..b3d2fd5 100644 | ||
--- a/node_modules/@nomicfoundation/hardhat-viem/internal/clients.js | ||
+++ b/node_modules/@nomicfoundation/hardhat-viem/internal/clients.js | ||
@@ -47,7 +47,7 @@ async function innerGetPublicClient(provider, chain, publicClientConfig) { | ||
const parameters = { ...defaultParameters, ...publicClientConfig }; | ||
const publicClient = viem.createPublicClient({ | ||
chain, | ||
- transport: viem.custom(provider), | ||
+ transport: viem.custom(provider, { retryCount: 0 }), | ||
...parameters, | ||
}); | ||
return publicClient; | ||
@@ -80,7 +80,7 @@ async function innerGetWalletClients(provider, chain, accounts, walletClientConf | ||
const walletClients = accounts.map((account) => viem.createWalletClient({ | ||
chain, | ||
account, | ||
- transport: viem.custom(provider), | ||
+ transport: viem.custom(provider, { retryCount: 0 }), | ||
...parameters, | ||
})); | ||
return walletClients; | ||
@@ -123,7 +123,7 @@ async function innerGetTestClient(provider, chain, mode, testClientConfig) { | ||
const testClient = viem.createTestClient({ | ||
mode, | ||
chain, | ||
- transport: viem.custom(provider), | ||
+ transport: viem.custom(provider, { retryCount: 0 }), | ||
...parameters, | ||
}); | ||
return testClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// import { existsSync } from 'fs' | ||
import fs = require('fs') | ||
|
||
// import { task } from 'hardhat/config.js' | ||
import config = require('hardhat/config') | ||
|
||
// import { archivedDeploymentPath } from '../hardhat.config.cjs' | ||
import ic = require('../hardhat.config.cjs') | ||
|
||
config | ||
.task('archive-scan', 'Scans the deployments for unarchived deployments') | ||
.setAction(async (_, hre) => { | ||
const network = hre.network.name | ||
|
||
const deployments = await hre.deployments.all() | ||
|
||
for (const deploymentName in deployments) { | ||
const deployment = deployments[deploymentName] | ||
if (!deployment.receipt || !deployment.bytecode) continue | ||
|
||
const archiveName = `${deploymentName}_${network}_${deployment.receipt.blockNumber}` | ||
const archivePath = `${ic.archivedDeploymentPath}/${archiveName}.sol` | ||
|
||
if (fs.existsSync(archivePath)) { | ||
continue | ||
} | ||
|
||
let fullName: string | ||
try { | ||
await hre.deployments.getArtifact(deploymentName) | ||
fullName = `${deploymentName}.sol:${deploymentName}` | ||
} catch (e: any) { | ||
if (e._isHardhatError && e.number === 701) { | ||
fullName = e.messageArguments.candidates.split('\n')[1] | ||
} else { | ||
throw e | ||
} | ||
} | ||
|
||
await hre.run('save', { | ||
contract: deploymentName, | ||
block: String(deployment.receipt.blockNumber), | ||
fullName, | ||
}) | ||
} | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import fs = require('fs/promises') | ||
import task_names = require('hardhat/builtin-tasks/task-names') | ||
import config = require('hardhat/config') | ||
import path = require('path') | ||
|
||
config | ||
.subtask(task_names.TASK_COMPILE_SOLIDITY) | ||
.setAction(async (_, { config }, runSuper) => { | ||
const superRes = await runSuper() | ||
|
||
try { | ||
await fs.writeFile( | ||
path.join(config.paths.artifacts, 'package.json'), | ||
'{ "type": "commonjs" }', | ||
) | ||
} catch (error) { | ||
console.error('Error writing package.json: ', error) | ||
} | ||
|
||
return superRes | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.