Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
269 changes: 269 additions & 0 deletions abi/VESTArElection.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,26 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "cancelElection",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "claimRefund",
"inputs": [],
"outputs": [
{
"name": "refundAmount",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "closeElection",
Expand Down Expand Up @@ -178,6 +198,13 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "enableRefunds",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "factory",
Expand Down Expand Up @@ -231,6 +258,36 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "getCancellationSummary",
"inputs": [],
"outputs": [
{
"name": "",
"type": "tuple",
"internalType": "struct VESTArTypes.CancellationSummary",
"components": [
{
"name": "cancelledBy",
"type": "address",
"internalType": "address"
},
{
"name": "cancelledAt",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "previousState",
"type": "uint8",
"internalType": "enum VESTArTypes.ElectionState"
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getElectionConfig",
Expand Down Expand Up @@ -351,6 +408,51 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getRefundSummary",
"inputs": [],
"outputs": [
{
"name": "",
"type": "tuple",
"internalType": "struct VESTArTypes.RefundSummary",
"components": [
{
"name": "paymentToken",
"type": "address",
"internalType": "address"
},
{
"name": "totalRefundableAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "totalRefundedAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "refundsEnabledAt",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "refundsEnabledBy",
"type": "address",
"internalType": "address"
},
{
"name": "refundsEnabled",
"type": "bool",
"internalType": "bool"
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getResultSummary",
Expand Down Expand Up @@ -891,6 +993,38 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "refundableAmountOf",
"inputs": [
{
"name": "voter",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "refundsEnabled",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "remainingBallots",
Expand Down Expand Up @@ -1114,6 +1248,29 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "updateElectionMetadata",
"inputs": [
{
"name": "newTitleHash",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "newCandidateManifestHash",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "newCandidateManifestURI",
"type": "string",
"internalType": "string"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "visibilityMode",
Expand Down Expand Up @@ -1152,6 +1309,37 @@
],
"anonymous": false
},
{
"type": "event",
"name": "ElectionCancelled",
"inputs": [
{
"name": "electionId",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "cancelledBy",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "previousState",
"type": "uint8",
"indexed": false,
"internalType": "enum VESTArTypes.ElectionState"
},
{
"name": "cancelledAt",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ElectionInitialized",
Expand Down Expand Up @@ -1201,6 +1389,37 @@
],
"anonymous": false
},
{
"type": "event",
"name": "ElectionMetadataUpdated",
"inputs": [
{
"name": "electionId",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "titleHash",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "candidateManifestHash",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "candidateManifestURI",
"type": "string",
"indexed": false,
"internalType": "string"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ElectionStateUpdated",
Expand Down Expand Up @@ -1363,6 +1582,56 @@
],
"anonymous": false
},
{
"type": "event",
"name": "RefundClaimed",
"inputs": [
{
"name": "electionId",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "voter",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "refundAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RefundsEnabled",
"inputs": [
{
"name": "electionId",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "enabledBy",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "totalRefundableAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ResultFinalized",
Expand Down
10 changes: 5 additions & 5 deletions abi/status-testnet.addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"chainName": "Status Network Testnet",
"chainId": 1660990954,
"rpcUrl": "https://public.sepolia.rpc.status.network",
"OrganizerRegistry": "0x697a820eCBbf029184A80fe8A2Fa20c0A80F9A11",
"KarmaRegistry": "0x447cBF1e81157b68fF21405240d40B63cfE08417",
"ElectionImplementation": "0xa5e0b4f1C45418Ef4F266a4acF114734F2664693",
"VESTArElectionFactory": "0x0dd90Bc92436aafc280E94e94a51AbF068851f4C",
"MockUSDT": "0xd77B3f72259c92815380a545D29a60780AC90036"
"OrganizerRegistry": "0x6b6F30c54F0a382328409941A8eB824D02EFCD8f",
"KarmaRegistry": "0x9880c7Ff7Be22A1B2e469E594157eE6C14604472",
"ElectionImplementation": "0x93ec16287D1da13b4af58f3F0B9D717cae8b4A8A",
"VESTArElectionFactory": "0xE9e5AE2892542fd736b5391f0a722C641DC1fEDe",
"MockUSDT": "0x3a91A1b0bF95eE4e3F4e2F3F2A386995D884ee1d"
}
7 changes: 4 additions & 3 deletions script/DeployVESTArStack.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity ^0.8.24;

import {Script, console2} from "forge-std/Script.sol";
import {MockUSDT} from "../src/mocks/MockUSDT.sol";
import {StatusTestnetConfig} from "../src/config/StatusTestnetConfig.sol";
import {VESTArElection} from "../src/vestar/election/VESTArElection.sol";
import {VESTArElectionFactory} from "../src/vestar/factory/VESTArElectionFactory.sol";
import {VESTArKarmaRegistry} from "../src/vestar/registry/VESTArKarmaRegistry.sol";
Expand Down Expand Up @@ -34,11 +35,11 @@ contract DeployVESTArStackScript is Script {

// 환경변수 관련 코드 :
// PLATFORM_TREASURY를 따로 안 넣으면 배포자 주소를 임시 treasury로 사용
// Status Karma 주소를 아직 모르면 0 주소로 시작하고, 나중에 owner가 registry를 갱신 가능
// Status Karma 원본 주소는 env로 덮어쓸 수 있고, 없으면 testnet 기본값을 사용
address initialOwner = vm.envOr("INITIAL_OWNER", deployer);
address platformTreasury = vm.envOr("PLATFORM_TREASURY", deployer);
address statusKarma = vm.envOr("STATUS_KARMA", address(0));
address statusKarmaTiers = vm.envOr("STATUS_KARMA_TIERS", address(0));
address statusKarma = vm.envOr("STATUS_KARMA", StatusTestnetConfig.KARMA);
address statusKarmaTiers = vm.envOr("STATUS_KARMA_TIERS", StatusTestnetConfig.KARMA_TIERS);
bool deployMockUsdt = vm.envOr("DEPLOY_MOCK_USDT", true);

vm.startBroadcast(privateKey);
Expand Down
Loading
Loading