-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8c63aa
commit 5b12450
Showing
9 changed files
with
1,139 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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
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 { ethers, network } from 'hardhat'; | ||
import merge from 'lodash.merge'; | ||
import { getNetworkConfig, mergeNetworkConfig } from '../src/config'; | ||
import { Deployer } from '../src/deployer'; | ||
import { unwrap } from '../src/utils'; | ||
import { deployProxy } from '../src/helpers'; | ||
import { ArtifactName } from '../src/types'; | ||
|
||
async function main () { | ||
console.log('Network:', network.name); | ||
|
||
const chainId: number = unwrap(network.config, 'chainId'); | ||
const config = merge(getNetworkConfig(chainId), { | ||
contracts: { | ||
CNSRegistry: { address: '0x0000000000000000000000000000000000000000' }, | ||
MintingController: { address: '0x0000000000000000000000000000000000000000' }, | ||
URIPrefixController: { address: '0x0000000000000000000000000000000000000000' }, | ||
Resolver: { address: '0x0000000000000000000000000000000000000000' }, | ||
RootChainManager: { address: '0x0000000000000000000000000000000000000000' }, | ||
}, | ||
}); | ||
|
||
if (!config) { | ||
throw new Error(`Config not found for network ${chainId}`); | ||
} | ||
// before running this script, remove only sandbox verification in seaport_proxy_buyer | ||
// and check if min_uns_tlds task should be included | ||
|
||
const deployer = await Deployer.create(); | ||
console.log('start uns execute:', config); | ||
const deployConfig = await deployer.execute(['uns'], config); | ||
console.log('start seaport execute', JSON.stringify(deployConfig)); | ||
mergeNetworkConfig(deployConfig); | ||
|
||
const deployConfig2 = await deployer.execute(['seaport_proxy_buyer'], config); | ||
mergeNetworkConfig(deployConfig2); | ||
|
||
console.log('Deployed!'); | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
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,42 @@ | ||
import Safe, { SafeAccountConfig, SafeFactory } from '@safe-global/protocol-kit'; | ||
|
||
|
||
async function createSafe () { | ||
const owners = [ | ||
'0x6EC0DEeD30605Bcd19342f3c30201DB263291589', | ||
'0xc0354e4E83Cc214b402A5063e2C90e0e5C18cC87', | ||
'0xECE49066537d1816915cBe2312D7BBeF0647b820', | ||
'0x0e5DFb1569602d0dcFCb4287Fe53c28FAC1Ea1bE', | ||
'0xEe203ec04a5F635A78414466883cffB24B669B2C', | ||
]; | ||
|
||
const threshold = 2; | ||
const safeAccountConfig: SafeAccountConfig = { | ||
owners, | ||
threshold, | ||
}; | ||
|
||
const safeFactory = await SafeFactory.init({ | ||
provider: `https://base-sepolia.infura.io/v3/${process.env.BASE_INFURA_KEY}`, | ||
signer: 'PRIVATE_KEY', | ||
safeVersion: '1.3.0', | ||
}); | ||
|
||
const safe: Safe = await safeFactory.deploySafe({ safeAccountConfig }); | ||
|
||
console.log('Is deployed: ' + await safe.isSafeDeployed()); | ||
console.log('Threshold: ' + await safe.getThreshold()); | ||
console.log('Owners: ' + await safe.getOwners()); | ||
console.log('Address: ' + await safe.getAddress()); | ||
} | ||
|
||
async function main () { | ||
await createSafe(); | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch((e) => { | ||
console.log('Error: ' + e.message); | ||
process.exit(1); | ||
}); |
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