Skip to content

Commit

Permalink
deploy vault v2
Browse files Browse the repository at this point in the history
  • Loading branch information
hujw77 committed Aug 27, 2024
1 parent 6e22f91 commit df52940
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ fmt :; @forge fmt
dry-run:; @forge script script/Deploy.s.sol:DeployScript
deploy :; @forge script script/Deploy.s.sol:DeployScript --broadcast --verify

migrate:; @forge script script/Migrate.s.sol:MigrateScript --sender 0x08837De0Ae21C270383D9F2de4DB03c7b1314632 -vvvv
try-migrate:; @forge script script/Migrate.s.sol:MigrateScript --sender 0x08837De0Ae21C270383D9F2de4DB03c7b1314632 -vvvv
migrate:; @forge script script/Migrate.s.sol:MigrateScript --broadcast -vvvv --verify --verifier blockscout

.PHONY: all flat clean test salt deploy
123 changes: 123 additions & 0 deletions abi/ProxyAdmin.abi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
[
{
"type": "constructor",
"inputs": [
{
"name": "initialOwner",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UPGRADE_INTERFACE_VERSION",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "upgradeAndCall",
"inputs": [
{
"name": "proxy",
"type": "address",
"internalType": "contract ITransparentUpgradeableProxy"
},
{
"name": "implementation",
"type": "address",
"internalType": "address"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "error",
"name": "OwnableInvalidOwner",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "OwnableUnauthorizedAccount",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
]
}
]
4 changes: 2 additions & 2 deletions script/Migrate.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import {KtonDAOVaultV2} from "../src/staking/KtonDAOVaultV2.sol";

contract MigrateScript is Script {
address vault = 0x652182C6aBc0bBE41b5702b05a26d109A405EAcA;
address v2 = 0xC4784B3593fF0ace8773ec79EF4F8D8901a8DCfC;

function run() public {
vm.startBroadcast();

// Core.upgradeProxyTo(vault, v2, abi.encodeCall(KtonDAOVaultV2.initializeV2, ()));
// new KtonDAOVaultV2();
Core.upgradeProxyTo(vault, 0x8Dc2A9969252380f3a1725bfc6601E061cf2551f, "");

vm.stopBroadcast();
}
Expand Down
Loading

0 comments on commit df52940

Please sign in to comment.