Skip to content

Commit 681d377

Browse files
pxrlbmzig
andauthored
feat: Tatara (Katana testnet) deployment (#943)
* feat: Tatara (Katana testnet) deployment * deploy other L2 contracts Signed-off-by: bennett <[email protected]> * revert hardhat bump Signed-off-by: bennett <[email protected]> * redeploy multicall handler Signed-off-by: bennett <[email protected]> --------- Signed-off-by: bennett <[email protected]> Co-authored-by: bennett <[email protected]>
1 parent 69cc1db commit 681d377

13 files changed

+4337
-6
lines changed

contracts/Tatara_SpokePool.sol

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// SPDX-License-Identifier: BUSL-1.1
2+
pragma solidity ^0.8.0;
3+
4+
import { PolygonZkEVM_SpokePool } from "./PolygonZkEVM_SpokePool.sol";
5+
6+
/**
7+
* @notice Polygon zkEVM Spoke pool.
8+
* @custom:security-contact [email protected]
9+
*/
10+
contract Tatara_SpokePool is PolygonZkEVM_SpokePool {
11+
/**
12+
* @notice Construct Polygon zkEVM specific SpokePool.
13+
* @param _wrappedNativeTokenAddress Address of WETH on Polygon zkEVM.
14+
* @param _depositQuoteTimeBuffer Quote timestamps can't be set more than this amount
15+
* into the past from the block time of the deposit.
16+
* @param _fillDeadlineBuffer Fill deadlines can't be set more than this amount
17+
* into the future from the block time of the deposit.
18+
*/
19+
/// @custom:oz-upgrades-unsafe-allow constructor
20+
constructor(
21+
address _wrappedNativeTokenAddress,
22+
uint32 _depositQuoteTimeBuffer,
23+
uint32 _fillDeadlineBuffer
24+
) PolygonZkEVM_SpokePool(_wrappedNativeTokenAddress, _depositQuoteTimeBuffer, _fillDeadlineBuffer) {} // solhint-disable-line no-empty-blocks
25+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { HardhatRuntimeEnvironment } from "hardhat/types";
2+
import { DeployFunction } from "hardhat-deploy/types";
3+
import { deployNewProxy } from "../utils/utils.hre";
4+
import { TOKEN_SYMBOLS_MAP } from "../utils";
5+
import { FILL_DEADLINE_BUFFER, QUOTE_TIME_BUFFER } from "./consts";
6+
7+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
8+
const chainId = parseInt(await hre.getChainId());
9+
const admin = "0x9A8f92a830A5cB89a3816e3D267CB7791c16b04D";
10+
const initArgs = [
11+
admin, // No bridge is used; permit dev wallet to call directly.
12+
// Initialize deposit counter to very high number of deposits to avoid duplicate deposit ID's
13+
// with deprecated spoke pool.
14+
1_000_000,
15+
// Set dev wallet as cross-domain admin because there is no available bridge.
16+
admin,
17+
admin,
18+
];
19+
const constructorArgs = [
20+
TOKEN_SYMBOLS_MAP["TATARA-WETH"].addresses[chainId],
21+
QUOTE_TIME_BUFFER,
22+
FILL_DEADLINE_BUFFER,
23+
];
24+
25+
await deployNewProxy("Tatara_SpokePool", constructorArgs, initArgs);
26+
};
27+
module.exports = func;
28+
func.tags = ["TataraSpokePool", "Tatara"];

deployments/deployments.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@
190190
"SpokePool": { "address": "0x6999526e507Cc3b03b180BbE05E1Ff938259A874", "blockNumber": 12593713 },
191191
"MulticallHandler": { "address": "0x924a9f036260DdD5808007E1AA95f08eD08aA569", "blockNumber": 12594561 }
192192
},
193+
"129399": {
194+
"SpokePool": { "address": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64", "blockNumber": 2929205 },
195+
"SpokePoolVerifier": { "address": "0x630b76C7cA96164a5aCbC1105f8BA8B739C82570", "blockNumber": 3160019 },
196+
"MulticallHandler": { "address": "0xAC537C12fE8f544D712d71ED4376a502EEa944d7", "blockNumber": 3179705 }
197+
},
193198
"133268194659241": {
194199
"SvmSpoke": {
195200
"address": "JAZWcGrpSWNPTBj8QtJ9UyQqhJCDhG9GJkDeMf5NQBiq",

deployments/tatara/.chainId

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
129399

deployments/tatara/Multicallhandler.json

Lines changed: 281 additions & 0 deletions
Large diffs are not rendered by default.

deployments/tatara/SpokePoolVerifier.json

Lines changed: 138 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)