-
Notifications
You must be signed in to change notification settings - Fork 8
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
698368a
commit 29f9b03
Showing
6 changed files
with
120 additions
and
3 deletions.
There are no files selected for viewing
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,7 @@ | ||
deploy-testnet: | ||
op run --env-file="./.env" -- \ | ||
forge script DeployKatanaV3Testnet -f ronin-testnet | ||
|
||
deploy-testnet-broadcast: | ||
op run --env-file="./.env" -- \ | ||
forge script DeployKatanaV3Testnet -f ronin-testnet --verify --verifier sourcify --verifier-url https://sourcify.roninchain.com/server/ --legacy --broadcast |
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,29 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.7.6; | ||
|
||
import { Script, console } from "forge-std/Script.sol"; | ||
import { KatanaV3Factory } from "@katana/v3-contracts/core/KatanaV3Factory.sol"; | ||
|
||
abstract contract DeployKatanaV3Core is Script { | ||
address owner; | ||
address treasury; | ||
|
||
address factory; | ||
|
||
function setUp() public virtual { | ||
require(owner != address(0)); | ||
require(treasury != address(0)); | ||
logParams(); | ||
} | ||
|
||
function run() public virtual { | ||
vm.broadcast(); | ||
factory = address(new KatanaV3Factory(owner, treasury)); | ||
console.log("KatanaV3Factory deployed:", factory); | ||
} | ||
|
||
function logParams() internal virtual { | ||
console.log("owner:", owner); | ||
console.log("treasury:", treasury); | ||
} | ||
} |
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,50 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.7.6; | ||
|
||
import { Script, console } from "forge-std/Script.sol"; | ||
import { NonfungibleTokenPositionDescriptor } from | ||
"@katana/v3-contracts/periphery/NonfungibleTokenPositionDescriptor.sol"; | ||
import { NonfungiblePositionManager } from "@katana/v3-contracts/periphery/NonfungiblePositionManager.sol"; | ||
import { V3Migrator } from "@katana/v3-contracts/periphery/V3Migrator.sol"; | ||
import { TickLens } from "@katana/v3-contracts/periphery/lens/TickLens.sol"; | ||
import { KatanaInterfaceMulticall } from "@katana/v3-contracts/periphery/lens/KatanaInterfaceMulticall.sol"; | ||
import { DeployKatanaV3Core } from "./DeployKatanaV3Core.s.sol"; | ||
|
||
abstract contract DeployKatanaV3Periphery is DeployKatanaV3Core { | ||
address wron; | ||
|
||
address tokenDescriptor; | ||
address nonfungiblePositionManager; | ||
address v3migrator; | ||
address tickLens; | ||
address katanaInterfaceMulticall; | ||
|
||
function setUp() public virtual override { | ||
require(wron != address(0)); | ||
|
||
super.setUp(); | ||
} | ||
|
||
function run() public virtual override { | ||
super.run(); | ||
|
||
vm.startBroadcast(); | ||
tokenDescriptor = address(new NonfungibleTokenPositionDescriptor(wron, "RON")); | ||
console.log("NonfungibleTokenPositionDescriptor deployed:", tokenDescriptor); | ||
nonfungiblePositionManager = address(new NonfungiblePositionManager(factory, wron, tokenDescriptor)); | ||
console.log("NonfungiblePositionManager deployed:", nonfungiblePositionManager); | ||
v3migrator = address(new V3Migrator(factory, wron, nonfungiblePositionManager)); | ||
console.log("V3Migrator deployed:", v3migrator); | ||
tickLens = address(new TickLens()); | ||
console.log("TickLens deployed:", tickLens); | ||
katanaInterfaceMulticall = address(new KatanaInterfaceMulticall()); | ||
console.log("KatanaInterfaceMulticall deployed:", katanaInterfaceMulticall); | ||
vm.stopBroadcast(); | ||
} | ||
|
||
function logParams() internal virtual override { | ||
super.logParams(); | ||
|
||
console.log("WRON:", wron); | ||
} | ||
} |
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,15 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.7.6; | ||
|
||
import { Script } from "forge-std/Script.sol"; | ||
import { console } from "forge-std/console.sol"; | ||
import { KatanaV3Factory } from "@katana/v3-contracts/core/KatanaV3Factory.sol"; | ||
|
||
contract DeployFactory is Script { | ||
function run() public { | ||
vm.rememberKey(vm.envUint("TESTNET_PK")); | ||
vm.broadcast(); | ||
address factory = address(new KatanaV3Factory(address(0), address(0))); | ||
console.log("KatanaV3Factory deployed:", factory); | ||
} | ||
} |
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,18 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.7.6; | ||
|
||
import { Script } from "forge-std/Script.sol"; | ||
import { console } from "forge-std/console.sol"; | ||
import { DeployKatanaV3Periphery } from "../DeployKatanaV3Periphery.s.sol"; | ||
|
||
contract DeployKatanaV3Testnet is DeployKatanaV3Periphery { | ||
function setUp() public override { | ||
owner = 0x247F12836A421CDC5e22B93Bf5A9AAa0f521f986; | ||
treasury = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; | ||
wron = 0xA959726154953bAe111746E265E6d754F48570E6; | ||
|
||
vm.rememberKey(vm.envUint("TESTNET_PK")); | ||
|
||
super.setUp(); | ||
} | ||
} |