Skip to content

Commit

Permalink
add skale calypso deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
zapaz committed May 2, 2024
1 parent c0fe72c commit 1dc39b4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion common/src/common/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const networks = (() => {

const getAllOpMainnetIds = (): number[] =>
getAllActive()
.filter((nw: NetworkType) => isOpStack(nw.chainId) && isMainnet(nw.chainId))
.filter((nw: NetworkType) => (isOpStack(nw.chainId) && isMainnet(nw.chainId)) || nw.chainId == 1)
.map((nw) => nw.chainId);

const get = (chainId: chainIdish): NetworkType | undefined => _networksMap?.get(Number(chainId));
Expand Down
5 changes: 3 additions & 2 deletions config/src/mainnets.handlebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@
{
"chainId": 1564830818,
"chainName": "skale-calypso",
"chainLabel": "SKALE Calypso Hub",
"rpcUrls": [
"https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"
],
Expand All @@ -430,8 +431,8 @@
"blockExplorerUrls": [
"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com/"
],
"active": false,
"create": true,
"active": true,
"create": false,
"paymaster": true
},
{
Expand Down
15 changes: 10 additions & 5 deletions contracts/addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@
"OpenNFTsV4": "0x485ed00c43e919E02279Ca137343B2aC63EF0eF2",
"chainName": "chaos-testnet"
},
"974399131": {
"OpenNFTsResolver": "0xb5c8CB0846317d82af2DbF90713716B01A2f680a",
"OpenNFTsV4Skale": "0x25F56b5527F5634752Fd2C85564E8d2484cAAEF3",
"chainName": "calypso-testnet"
},
"137": {
"OpenAutoMarket": "0x5Cf67C52eD5608B9841238bCc2bDe012263b7111",
"OpenBound": "0xE82984f872B68B6B369D5700654F229ba6f57c42",
Expand All @@ -86,6 +81,11 @@
"OpenNFTsV4": "0xd1ca741de2d2975822ADf4646Cf0A8AE3Df51c78",
"chainName": "polygon-zkevm-testnet"
},
"1564830818": {
"OpenNFTsResolver": "0xb5c8CB0846317d82af2DbF90713716B01A2f680a",
"OpenNFTsV4Skale": "0x25F56b5527F5634752Fd2C85564E8d2484cAAEF3",
"chainName": "skale-calypso"
},
"167008": {
"OpenAutoMarket": "0x485ed00c43e919E02279Ca137343B2aC63EF0eF2",
"OpenNFTsFactoryV3": "0xb5c8CB0846317d82af2DbF90713716B01A2f680a",
Expand Down Expand Up @@ -331,6 +331,11 @@
"OpenNFTsV4": "0xd1ca741de2d2975822ADf4646Cf0A8AE3Df51c78",
"chainName": "bsc-testnet"
},
"974399131": {
"OpenNFTsResolver": "0xb5c8CB0846317d82af2DbF90713716B01A2f680a",
"OpenNFTsV4Skale": "0x25F56b5527F5634752Fd2C85564E8d2484cAAEF3",
"chainName": "calypso-testnet"
},
"999": {
"OpenAutoMarket": "0x10bdda29d9a84dC0E8C263B29734d4502a74BCF2",
"OpenNFTsFactoryV3": "0xECC12ab909CfaEb5989E35509218f399c8Dc4b4c",
Expand Down
1 change: 1 addition & 0 deletions contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ mode = "https://mainnet.mode.network"
manta-pacific = "https://pacific-rpc.manta.network/http"
blast = "https://blast-mainnet.infura.io/v3/${INFURA_API_KEY}"
celo = "https://forno.celo.org"
skale-calypso = "https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"

# TESTNETS
sepolia = "https://sepolia.infura.io/v3/${INFURA_API_KEY}"
Expand Down
6 changes: 4 additions & 2 deletions contracts/scripts/deploy/DeployOpenNFTsResolver.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ contract DeployOpenNFTsResolver is DeployLite, DeployOpenNFTsFactoryV3 {
function deployOpenNFTsResolver() public returns (address) {
address openNFTsFactoryV3 = readAddress("OpenNFTsFactoryV3");
address openNFTsResolverOld = readAddress("OpenNFTsResolver");
bool factory = openNFTsFactoryV3 != address(0);

require(
msg.sender == OpenNFTsFactoryV3(openNFTsFactoryV3).owner(), "Deployer must be OpenNFTsFactoryV3 owner !"
!factory || msg.sender == OpenNFTsFactoryV3(openNFTsFactoryV3).owner(),
"Deployer must be OpenNFTsFactoryV3 owner !"
);

bytes memory args = abi.encode(msg.sender, openNFTsFactoryV3);
Expand All @@ -25,7 +27,7 @@ contract DeployOpenNFTsResolver is DeployLite, DeployOpenNFTsFactoryV3 {
vm.startBroadcast();
address openNFTsResolver = deploy("OpenNFTsResolver", args);

OpenNFTsFactoryV3(openNFTsFactoryV3).setResolver(openNFTsResolver);
if (factory) OpenNFTsFactoryV3(openNFTsFactoryV3).setResolver(openNFTsResolver);

if (openNFTsResolverOld != address(0)) {
// migrate addresses from old to new
Expand Down

0 comments on commit 1dc39b4

Please sign in to comment.