Observed since 21 Oct, 11:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@0xsequence/solidity-deployer
A workflow for deploying solidity contracts
Solidity Deployer is a TypeScript project that simplifies the process of deploying, managing, and verifying Solidity smart contracts. It streamlines the deployment process by providing a robust workflow for deploying contracts, deploying guard wallets, recovering funds, and verifying contracts through Etherscan and Tenderly.
To use Solidity Deployer in your project, you need to have Node.js and Yarn installed. You can install the package via Yarn:
yarn add solidity-deployer
The DeploymentFlow class is the core of the project, which handles the deployment and management of smart contracts.
constructor(tenderly: TenderlyConfiguration | Tenderly, etherscanApiKey: string, signer: Signer, logger?: Logger, deployer?: Deployer)
Initialize a new DeploymentFlow instance with the required configuration options for Tenderly, Etherscan, and other necessary parameters.
deployGuards: (moduleAddr: string, guards: string[]) => Promise<string[]>
This method deploys guard wallets for a given module address and a list of image hashes. It returns a promise that resolves to an array of deployed guard wallet addresses.
deployAndVerify: <T extends ContractFactory>(
friendlyName: string,
contract: new (signer: Signer) => T,
verificationRequest: ContractVerificationRequest,
deploymentArgs?: Parameters<T['deploy']>[],
contractInstance?: BigNumberish,
txParams?: providers.TransactionRequest,
fundsRecoveryAddr?: string,
) => Promise<Contract>
This method deploys and verifies a contract using the provided contract factory and deployment arguments. It also takes a friendly name for the contract, verification request details, and optional transaction parameters and funds recovery address.
recoverFunds: (address: string) => Promise<BigNumber>
This method helps to recover all funds in the signer and returns them to the specified address. It returns a promise that resolves to the remaining dust in the signer.
import { Tenderly } from "tenderly";
import { Wallet } from "ethers";
import { DeploymentFlow } from "solidity-deployer";
const tenderlyConfig = {...}; // Your Tenderly configuration
const etherscanApiKey = "your-etherscan-api-key";
const privateKey = "your-private-key";
const networkName = "mainnet";
const signer = new Wallet(privateKey);
const tenderly = new Tenderly(tenderlyConfig);
const deploymentFlow = new DeploymentFlow(tenderly, etherscanApiKey, signer);
async function main() {
// Deploy and verify a contract
const contract = ...; // Your contract factory
const verificationRequest = ...; // Contract verification request
const deploymentArgs = ...; // Contract deployment arguments
const deployedContract = await deploymentFlow.deployAndVerify("MyContract", contract, verificationRequest, deploymentArgs);
console.log("Deployed contract address:", deployedContract.address);
// Deploy guards
const moduleAddr = deployedContract.address;
const guards = [...]; // List of image hashes for each guard wallet
const deployedGuardWallets = await deploymentFlow.deployGuards(moduleAddr, guards);
console.log("Deployed guard wallets:", deployedGuardWallets);
// Recover funds
const recoveryAddress = "your-recovery-address";
const remainingDust = await deploymentFlow.recoverFunds(recoveryAddress);
console.log("Remaining dust in signer:", remainingDust.toString());
}
main()
.then(() => {
process.exit(0);
})
.catch(error => {
console.error(error);
process.exit(1);
});
This project is released under the Apache License 2.0.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
axiosEnvironment{
"local_name": "axios",
"alias": false,
"peer_metadata": null
} | ^1.3.5 | runtime |
ethersEnvironment{
"local_name": "ethers",
"alias": false,
"peer_metadata": null
} | ^5.7.2 | runtime |
@tenderly/sdkEnvironment{
"local_name": "@tenderly/sdk",
"alias": false,
"peer_metadata": null
} | ^0.1.14 | runtime |
jestEnvironment{
"local_name": "jest",
"alias": false,
"peer_metadata": null
} | ^29.5.0 | development |
solcEnvironment{
"local_name": "solc",
"alias": false,
"peer_metadata": null
} | ^0.8.19 | development |
huskyEnvironment{
"local_name": "husky",
"alias": false,
"peer_metadata": null
} | ^8.0.3 | development |
dotenvEnvironment{
"local_name": "dotenv",
"alias": false,
"peer_metadata": null
} | ^16.0.3 | development |
eslintEnvironment{
"local_name": "eslint",
"alias": false,
"peer_metadata": null
} | ^8.38.0 | development |
ts-jestEnvironment{
"local_name": "ts-jest",
"alias": false,
"peer_metadata": null
} | ^29.1.0 | development |
ts-nodeEnvironment{
"local_name": "ts-node",
"alias": false,
"peer_metadata": null
} | ^10.9.1 | development |
prettierEnvironment{
"local_name": "prettier",
"alias": false,
"peer_metadata": null
} | ^2.8.7 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^5.0.4 | development |
@types/jestEnvironment{
"local_name": "@types/jest",
"alias": false,
"peer_metadata": null
} | ^29.5.0 | development |
lint-stagedEnvironment{
"local_name": "lint-staged",
"alias": false,
"peer_metadata": null
} | ^13.2.2 | development |
eslint-plugin-importEnvironment{
"local_name": "eslint-plugin-import",
"alias": false,
"peer_metadata": null
} | ^2.27.5 | development |
eslint-config-prettierEnvironment{
"local_name": "eslint-config-prettier",
"alias": false,
"peer_metadata": null
} | ^8.8.0 | development |
@typescript-eslint/parserEnvironment{
"local_name": "@typescript-eslint/parser",
"alias": false,
"peer_metadata": null
} | ^5.59.0 | development |
@typescript-eslint/eslint-pluginEnvironment{
"local_name": "@typescript-eslint/eslint-plugin",
"alias": false,
"peer_metadata": null
} | ^5.59.0 | development |
eslint-plugin-simple-import-sortEnvironment{
"local_name": "eslint-plugin-simple-import-sort",
"alias": false,
"peer_metadata": null
} | ^10.0.0 | development |
Source distribution
{
"shasum": "2f5d4aeb121b8ef5a8cff35caf88868e3567b726",
"tarball": "https://registry.npmjs.org/@0xsequence/solidity-deployer/-/solidity-deployer-0.1.4.tgz",
"fileCount": 58,
"integrity": "sha512-KjR11oekEgI8tzwE1FsZgdaz9G5Y4bkY6spFXqAtuMr8rpKVD7/sIXHYNHtn/USi5dutLLFPdpVVpRKUg+HZug==",
"signatures": [
{
"sig": "MEQCH3pAwded+ZGqX8U31koxYhbNT8bM8QITuW5W7ONfSIsCIQDO+M5Izc4msUfSpvPwjbNXsra0QNi8P5RVz6XCvXF8IA==",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 146618
}Shared repository data · GitHub
Observed since 21 Oct, 11:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:bfbc69b36b41fceffc4b6abf79c0349847b3003fe54cd89277890342548b45bf