Skip to content

Commit

Permalink
build(chain): Add support for Blast in deployment scripts (#734)
Browse files Browse the repository at this point in the history
  • Loading branch information
espendk authored Feb 28, 2024
1 parent c9a8d4f commit 3670ecf
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Next version

- Add support for Blast in deployment scripts
- Upgrade to @mangrovedao/context-addresses v1.3.1

# 2.1.0

## Blast support
Expand Down
3 changes: 3 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ testnet_zkevm="https://rpc.public.zkevm-test.net"
zkevm="https://zkevm-rpc.com"
goerli="${GOERLI_NODE_URL}"
arbitrum="${ARBITRUM_NODE_URL}"
blast="${BLAST_NODE_URL}"
blast_sepolia="${BLAST_SEPOLIA_NODE_URL}"

[etherscan]
Expand All @@ -42,6 +43,7 @@ polygon={key="${POLYGON_API_KEY}"}
testnet_zkevm={key="${ZKEVM_API_KEY}",chain=1442,url="https://api-testnet-zkevm.polygonscan.com/api"}
zkevm={key="${ZKEVM_API_KEY}",chain=1101,url="https://api-zkevm.polygonscan.com/api"}
arbitrum={key="${ARBITRUM_API_KEY}"}
blast={key="${BLAST_API_KEY}",url="https://api.routescan.io/v2/network/mainnet/evm/81457/etherscan"}
blast_sepolia={key="${BLAST_SEPOLIA_API_KEY}",url="https://api.routescan.io/v2/network/testnet/evm/168587773/etherscan"}

# The remappings are in remappings.txt so vscode solidity ext. can read them
Expand All @@ -65,4 +67,5 @@ sepolia={key=""}
testnet_zkevm={key="",chain=1442,url="https://api-testnet-zkevm.polygonscan.com/api"}
zkevm={key="",chain=1101,url="https://api-zkevm.polygonscan.com/api"}
arbitrum={key=""}
blast={key="",url="https://api.routescan.io/v2/network/mainnet/evm/81457/etherscan"}
blast_sepolia={key="",url="https://api.routescan.io/v2/network/testnet/evm/168587773/etherscan"}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"gas-measurement.sh"
],
"devDependencies": {
"@mangrovedao/context-addresses": "^1.3.0",
"@mangrovedao/context-addresses": "^1.3.1",
"@mangrovedao/mangrove-deployments": "^2.1.1",
"@types/node": "^20.11.5",
"bn.js": "^5.2.1",
Expand Down
3 changes: 3 additions & 0 deletions script/lib/Deployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {LocalFork} from "@mgv/test/lib/forks/Local.sol";
import {TestnetZkevmFork} from "@mgv/test/lib/forks/TestnetZkevm.sol";
import {GoerliFork} from "@mgv/test/lib/forks/Goerli.sol";
import {SepoliaFork} from "@mgv/test/lib/forks/Sepolia.sol";
import {BlastFork} from "@mgv/test/lib/forks/Blast.sol";
import {BlastSepoliaFork} from "@mgv/test/lib/forks/BlastSepolia.sol";
import {ZkevmFork} from "@mgv/test/lib/forks/Zkevm.sol";
import {console2 as console} from "@mgv/forge-std/console2.sol";
Expand Down Expand Up @@ -70,6 +71,8 @@ abstract contract Deployer is Script2 {
fork = new ArbitrumFork();
} else if (block.chainid == 80001) {
fork = new MumbaiFork();
} else if (block.chainid == 81457) {
fork = new BlastFork();
} else if (block.chainid == 11155111) {
fork = new SepoliaFork();
} else if (block.chainid == 168587773) {
Expand Down
12 changes: 12 additions & 0 deletions test/lib/forks/Blast.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

import {GenericFork} from "./Generic.sol";

contract BlastFork is GenericFork {
constructor() {
CHAIN_ID = 81457;
NAME = "blast";
NETWORK = "blast";
}
}
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -113,20 +113,20 @@ __metadata:
languageName: node
linkType: hard

"@mangrovedao/context-addresses@npm:^1.3.0":
version: 1.3.0
resolution: "@mangrovedao/context-addresses@npm:1.3.0"
"@mangrovedao/context-addresses@npm:^1.3.1":
version: 1.3.1
resolution: "@mangrovedao/context-addresses@npm:1.3.1"
dependencies:
semver: ^7.5.4
checksum: 4abc2bbf62dbd60e1417eb01ea15bdb306c978579be52239b968bfd39ecba46b31fd738c536b03169c5c0f23cc430ade33d8fa6d404bff340f57fc199a265cf2
checksum: 3e39748f6cc528daaec73c5b6551e8928a330592294f71de088f2b53ea55cbeb46a16876466ad6f80e178b0da50003718bc4313ae9db771a7075dd63a0977700
languageName: node
linkType: hard

"@mangrovedao/mangrove-core@workspace:.":
version: 0.0.0-use.local
resolution: "@mangrovedao/mangrove-core@workspace:."
dependencies:
"@mangrovedao/context-addresses": ^1.3.0
"@mangrovedao/context-addresses": ^1.3.1
"@mangrovedao/mangrove-deployments": ^2.1.1
"@types/node": ^20.11.5
bn.js: ^5.2.1
Expand Down

0 comments on commit 3670ecf

Please sign in to comment.