Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Governance v2.0.0 #1682

Closed
wants to merge 187 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
b7a8cbe
start on cross chain pools with cl functions
dbeal-eth Apr 30, 2023
73296fe
initial efforts
dbeal-eth May 3, 2023
2a2a741
closer pre single chain tests
dbeal-eth May 6, 2023
aaf98cb
write out planned tests, rework a bit of the cross chain details
dbeal-eth May 8, 2023
d1618f3
add missing file
dbeal-eth May 11, 2023
a73318c
tests back to normal
dbeal-eth May 11, 2023
d95ce8a
add important debt check test
dbeal-eth May 11, 2023
9dc0b9d
add some tests before I leave for vacation
dbeal-eth May 13, 2023
3ee617b
minor fixes
barrasso May 15, 2023
c075ec8
more minor fixes
barrasso May 15, 2023
eaa4b30
Run yarn lint:sol:fix
barrasso May 16, 2023
75a94cb
Run yarn lint:js:fix
barrasso May 16, 2023
2589b1b
Use CrossChain storage lib for cross chain usd transfers
barrasso May 16, 2023
340ecf8
Merge remote-tracking branch 'origin/main' into xchain-pools
dbeal-eth May 24, 2023
91e32af
fixes for utils module, allow xchain pools to have its own versioning
dbeal-eth May 25, 2023
c19c177
v3.2.0-xchain.0
dbeal-eth May 25, 2023
8dc4b7c
fix error
dbeal-eth May 25, 2023
538f30e
Implement burn from sender (#1622)
barrasso May 26, 2023
de5eb7c
fixes
dbeal-eth May 29, 2023
1ca2ff6
first successful ccip send of createCrossChainPool
dbeal-eth Jun 1, 2023
4b4e718
Merge branch 'main' into xchain-pools
barrasso Jun 3, 2023
7df95a8
fixes to load contract from misc source
dbeal-eth Jun 3, 2023
3e9793d
Add transfer cross chain USD tests (#1634)
barrasso Jun 6, 2023
7accba1
Merge branch 'main' into xchain-pools
barrasso Jun 6, 2023
b4f29ec
fix lint
barrasso Jun 7, 2023
7da2943
Merge branch 'xchain-pools' of https://github.com/Synthetixio/synthet…
dbeal-eth Jun 8, 2023
448d995
Merge remote-tracking branch 'origin/main' into xchain-pools
dbeal-eth Jun 8, 2023
1042046
update transferCrossChain (#1650)
barrasso Jun 13, 2023
52ca63a
Merge branch 'main' into xchain-pools
barrasso Jun 13, 2023
d8e72c7
fix sol lint and revert deps change
barrasso Jun 13, 2023
66cd31a
fixes
dbeal-eth Jun 14, 2023
0533ccf
Merge branch 'xchain-pools' of https://github.com/Synthetixio/synthet…
dbeal-eth Jun 14, 2023
a824f61
Merge branch 'main' into 'xchain-pools'
barrasso Jun 20, 2023
43fd0b2
Add TODOs
barrasso Jun 22, 2023
02cc76b
Merge branch 'main' into xchain-pools
barrasso Jun 22, 2023
fc97fca
Merge branch 'main' into xchain-pools
barrasso Jun 22, 2023
a66e7a9
Merge branch 'xchain-pools' into gov-2.0.0
barrasso Jun 22, 2023
a1c1a89
run yarn
barrasso Jun 23, 2023
28d0165
Merge branch 'xchain-pools' into gov-2.0.0
barrasso Jun 23, 2023
3edc204
Use EVMTokenAmount amount
barrasso Jun 23, 2023
a5031c8
Merge branch 'xchain-pools' into gov-2.0.0
barrasso Jun 23, 2023
8852ee4
Update package.json scripts
barrasso Jun 28, 2023
d6af1b6
wip gov updates
barrasso Jun 28, 2023
f2e3905
remove upgrademodule tests
mjlescano Jul 7, 2023
42d979f
fix governance storage definition
mjlescano Jul 7, 2023
18f7491
add governance tests bootstrap
mjlescano Jul 7, 2023
cf8ad60
Migrate initilization tests
mjlescano Jul 7, 2023
c90d23b
comment unmigrated tests
mjlescano Jul 7, 2023
7d10781
partially migrate ElectionModule tests
mjlescano Jul 7, 2023
09fd67e
update testable image
mjlescano Jul 11, 2023
910b643
update version to 2.0.0-alpha.0
mjlescano Jul 11, 2023
d594097
fix default epoch start date
mjlescano Jul 11, 2023
935396d
refactor DebtShare tests location
mjlescano Jul 14, 2023
f7f2a79
fix first epoch index initialization
mjlescano Jul 14, 2023
1fb4672
fix getting of snapshot id before the array is initialized
mjlescano Jul 14, 2023
0a231fd
update assertEvent usage
mjlescano Jul 14, 2023
8df4672
fix merkle tree getter
mjlescano Jul 14, 2023
1912ba9
fix debtshare initialization
mjlescano Jul 14, 2023
f0e61d7
fix CouncilToken proxy usage
mjlescano Jul 14, 2023
a31edf6
fix CouncilToken proxy usage
mjlescano Jul 14, 2023
c4497cb
fix tests
mjlescano Jul 14, 2023
96b9279
fix settings initialization
mjlescano Jul 15, 2023
c33ecbf
remove unnecessary check
mjlescano Jul 15, 2023
3817130
Merge branch 'main' into gov-2.0.0
barrasso Jul 17, 2023
fcba359
revert xchain-pools changes
barrasso Jul 17, 2023
d3e338c
revert unneeded changes
barrasso Jul 17, 2023
49e4fba
Merge branch 'main' into gov-2.0.0
barrasso Jul 18, 2023
937e273
Fix governance epoch settings storage (#1722)
mjlescano Jul 19, 2023
a68a2be
fix coeverage filter
mjlescano Jul 20, 2023
4851730
refactor proxy deployment on tests
mjlescano Jul 20, 2023
a579085
Merge branch 'main' into gov-2.0.0
barrasso Jul 21, 2023
a403e72
fix core-utils tests
mjlescano Jul 21, 2023
8fa0bce
Fix deps
noisekit Jul 22, 2023
ef7a931
Ignore and work around subgraph AssemblyScrypt in depcheck
noisekit Jul 22, 2023
e429cf0
Fix epoch schedule tweak & next election settings update (#1725)
mjlescano Jul 26, 2023
dd3ba62
Xchain voting (#1728)
barrasso Jul 27, 2023
7ef7b83
add UpgradeProposalModule (#1726)
mjlescano Jul 27, 2023
0ae87e0
Add missing modifiers
barrasso Jul 27, 2023
3919942
disable elections flow tests
mjlescano Jul 31, 2023
b2237b6
bit of a refactor for how ballots are counted (#1734)
dbeal-eth Aug 1, 2023
ceed135
fix cannonfile build
mjlescano Aug 1, 2023
b0d6507
Merge branch 'main' into gov-2.0.0
mjlescano Aug 1, 2023
8d86d30
fix a couple tests
dbeal-eth Aug 2, 2023
a089120
remove unused assert
mjlescano Aug 3, 2023
2b3e111
Merge branch 'main' into gov-2.0.0
mjlescano Aug 8, 2023
4db3c9f
Snapshot vote power tests (#1749)
dbeal-eth Aug 8, 2023
34f9ad1
revert crosschain storage layout. treat the first chain ID in the sup…
barrasso Aug 8, 2023
b19fa66
fix tests generation (#1770)
mjlescano Aug 14, 2023
698ffd2
Add Owner Guardianship (#1732)
mjlescano Aug 15, 2023
7c92934
refactor CrossChain into core-modules (#1756)
barrasso Aug 15, 2023
f46162e
fix OwnerModule compilation
mjlescano Aug 16, 2023
42a56db
Rename lastElectionId -> currentElectionId (#1780)
mjlescano Aug 16, 2023
2f57d56
Remove unnecessary ProxyStorage inheritance
mjlescano Aug 16, 2023
3578625
Governance Initialization Fixes (#1781)
mjlescano Aug 21, 2023
ed0440c
Remove guardianship & delayed upgrade functionalities (#1801)
mjlescano Sep 1, 2023
a55303e
Add satellites NFT distribution (#1787)
mjlescano Sep 1, 2023
47987fa
Merge remote-tracking branch 'origin/main' into gov-2.0.0
mjlescano Sep 1, 2023
bcbf441
Merge remote-tracking branch 'origin/main' into gov-2.0.0
mjlescano Sep 14, 2023
0130611
remove BaseElectionModule in favor of a single ElectionModule (#1826)
mjlescano Sep 14, 2023
9da0826
add CrossChain module to gov cannonfile
mjlescano Sep 18, 2023
e9d06d2
add base ElectionModuleSatellite file
mjlescano Sep 15, 2023
b50b6a5
add election module satellite
mjlescano Sep 20, 2023
1be8b1d
refactor cannonfiles
mjlescano Sep 20, 2023
b7fe0e9
add members dismissal logic
mjlescano Sep 20, 2023
1e7160b
add CCIP epoch resolution
mjlescano Sep 20, 2023
e2ce215
remove unnecessary chain number validator
mjlescano Sep 20, 2023
b10f4af
refactor council members storage
mjlescano Sep 20, 2023
f7299fb
fix usage of council members storage
mjlescano Sep 20, 2023
d9ffd79
add satellite council module initialization
mjlescano Sep 20, 2023
9b68f06
fix AddressSet usage
mjlescano Sep 21, 2023
80c6102
fix cannonfiles dependencies
mjlescano Sep 21, 2023
5a35a4d
fix satellite cannonfile build
mjlescano Sep 21, 2023
f364f6c
added sepolina support
fritzschoff Oct 2, 2023
4a154ca
using getter function
fritzschoff Oct 2, 2023
0f8bfb1
Refactor ccip config to extract core settings (#1853)
mjlescano Oct 3, 2023
bbafd6c
fixed typo
fritzschoff Oct 3, 2023
93227c2
removed unused settings
fritzschoff Oct 3, 2023
d026dc4
make cast func payable
fritzschoff Oct 4, 2023
50fa5fe
support crosschain voting
fritzschoff Oct 9, 2023
fe55748
update gov satellite cannonfile package name
mjlescano Oct 10, 2023
1220df5
refactor cannonfile settings
mjlescano Oct 10, 2023
0e3f828
add cross chain address target setting on initialization
mjlescano Oct 10, 2023
bb52cc8
Merge branch 'main' into gov-2.0.0
mjlescano Oct 10, 2023
0e2be6a
Merge branch 'gov-2.0.0' into add-satellite-election-module
mjlescano Oct 10, 2023
d508fbd
remove depends on cannonfiles
mjlescano Oct 10, 2023
4cc021c
fix test cannonfile version
mjlescano Oct 10, 2023
fc4ca26
fix ccip config
mjlescano Oct 10, 2023
bfeb068
fix msg.sender usage
mjlescano Oct 10, 2023
22c50d2
refactor satellite init
mjlescano Oct 10, 2023
c457aea
add base for cross chain integration tests
mjlescano Oct 11, 2023
ce85cc2
add ccip router
mjlescano Oct 11, 2023
87f4979
add multiple chains connections
mjlescano Oct 12, 2023
7551f92
add ccip router mock to gov tests
mjlescano Oct 12, 2023
a4d7ad4
add cross chain typechain types
mjlescano Oct 12, 2023
6852327
add ccip interaction
mjlescano Oct 14, 2023
571ff65
fix nodes interaction
mjlescano Oct 16, 2023
d2f354a
fix wallet fixture
mjlescano Oct 16, 2023
f1434c6
fix dedupe
mjlescano Oct 16, 2023
2cd9922
Merge pull request #1829 from Synthetixio/add-satellite-election-module
mjlescano Oct 16, 2023
376b9da
add snapshots module to satellite
mjlescano Oct 16, 2023
156b438
Gov intergration test (#1873)
fritzschoff Oct 17, 2023
f26437f
updated the bootstrap function
fritzschoff Oct 17, 2023
a71f2e3
refactor epoch storage
mjlescano Oct 17, 2023
1b43da3
fix tests
mjlescano Oct 17, 2023
209a4ea
add votingPower calculation on satellite networks
mjlescano Oct 17, 2023
28aa791
add epoch initialization on satellites
mjlescano Oct 18, 2023
04dc9ea
add epoch initialization on satellites
mjlescano Oct 18, 2023
d4cc3af
Gov 2 integration (#1876)
fritzschoff Oct 18, 2023
32319af
Merge pull request #1874 from Synthetixio/update-cross-chain-snapshots
mjlescano Oct 18, 2023
91eaa1f
Remove unused supportedNetworkTargets config (#1877)
mjlescano Oct 18, 2023
d35cce5
fix tests
fritzschoff Oct 19, 2023
d1683a4
Merge branch 'main' into gov-2.0.0
mjlescano Oct 20, 2023
eb5df6a
Merge branch 'main' into gov-2.0.0
Rickk137 Oct 23, 2023
16c129c
update cannon file
fritzschoff Oct 23, 2023
ebb2d7d
Fix inifinite amount of votes (#1878)
mjlescano Oct 24, 2023
aba1d3e
Old election test (#1881)
fritzschoff Nov 13, 2023
3e7b212
Merge remote-tracking branch 'origin/main' into gov-2.0.0
mjlescano Nov 13, 2023
2e13f95
fix yarn.lock
mjlescano Nov 13, 2023
bd01c16
add missing @foundry-rs/hardhat-anvil dep
mjlescano Nov 13, 2023
dda4aec
Merge remote-tracking branch 'origin/main' into gov-2.0.0
mjlescano Nov 13, 2023
c8530a0
fix test period helpers
mjlescano Nov 14, 2023
afedd2f
fix cc voting tests in different steps
mjlescano Nov 14, 2023
1e41cee
Fix mothership votes casting (#1916)
mjlescano Nov 14, 2023
35cd091
add epoch update to satellites (#1917)
mjlescano Nov 15, 2023
20ef5e9
added tests
fritzschoff Nov 15, 2023
ac8fdd2
fix payable functions
mjlescano Nov 15, 2023
a10142e
moved validation
fritzschoff Nov 15, 2023
bb1d99c
Fix snapshot contract management (#1920)
mjlescano Nov 16, 2023
931ff9e
ccip event (#1923)
fritzschoff Nov 16, 2023
0d41e01
remove possibility of gov nft transfers (#1924)
mjlescano Nov 16, 2023
63cb756
add epoch index validation on vote casting (#1925)
mjlescano Nov 16, 2023
34af606
add refundLeftoverGas call on broadcast (#1926)
mjlescano Nov 16, 2023
7014727
Fix small issues (#1927)
mjlescano Nov 16, 2023
80dce1e
Iosiro val candidate (#1929)
fritzschoff Nov 16, 2023
0ef9e99
Refactor council tokenid (#1930)
mjlescano Nov 16, 2023
231f73b
add multi chain dev task
mjlescano Nov 16, 2023
6ba1b05
add cross chain message listener
mjlescano Nov 16, 2023
6318c89
fix cross chain signer param
mjlescano Nov 16, 2023
0a5c5c5
updated dev comnand
fritzschoff Dec 11, 2023
b037a31
added candidates to event
fritzschoff Dec 12, 2023
b704c4e
add dummy withdrawVote fn
mjlescano Dec 14, 2023
5c68699
removed only
fritzschoff Jan 5, 2024
0cfec90
remove loop
fritzschoff Jan 5, 2024
ac4999b
add trusted_multicall_forwarder to cannonfile
mjlescano Jan 9, 2024
d62b444
fix setting location
mjlescano Jan 18, 2024
b6bf834
add presets to cannonfiles
mjlescano Jan 18, 2024
323b318
Merge remote-tracking branch 'origin/main' into gov-2.0.0
mjlescano Jan 18, 2024
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
3 changes: 1 addition & 2 deletions .solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules/
**/contracts/routers
\*\*/typechain-types
utils/core-contracts/contracts/utils/SafeCast
storage.dump.sol

# foundry lib
\*\*/lib
Expand All @@ -16,5 +17,3 @@ utils/core-contracts/contracts/utils/SafeCast
utils/core-modules/contracts/modules/UpgradeModule.sol
utils/core-contracts/contracts/ownership/Ownable.sol
utils/core-contracts/contracts/ownership/OwnableStorage.sol

storage.dump.sol
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 0 additions & 13 deletions protocol/governance/.env.sample

This file was deleted.

6 changes: 2 additions & 4 deletions protocol/governance/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
contracts/Router.sol
deployments/hardhat
deployments/local
deployments/localhost
contracts/generated
test/generated
2 changes: 1 addition & 1 deletion protocol/governance/.solcover.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
...require('@synthetixio/common-config/.solcover.js'),
skipFiles: ['mocks', 'Router.sol'],
skipFiles: ['mocks', 'generated'],
};
6 changes: 6 additions & 0 deletions protocol/governance/cannonfile.satellite.test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name = "synthetix-governance"
version = "<%= package.version %>-test-sat"
include = ["cannonfile.satellite.toml", "tomls/ccip.test.toml"]

[contract.SnapshotRecordMock]
artifact = "contracts/mocks/SnapshotRecordMock.sol:SnapshotRecordMock"
46 changes: 46 additions & 0 deletions protocol/governance/cannonfile.satellite.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name = "synthetix-governance"
description = "On-chain voting for synthetix councils - Logic for satellite chains"
version = "<%= package.version %>"
preset = "satellite"
include = ["./tomls/proxy-base.toml", "./tomls/council-token.toml"]

[setting.initial_epoch_index]
defaultValue = "0"

[contract.AssociatedSystemsModule]
artifact = "contracts/modules/core/AssociatedSystemsModule.sol:AssociatedSystemsModule"

[contract.CrossChainModule]
artifact = "contracts/modules/core/CrossChainModule.sol:CrossChainModule"

[contract.ElectionModuleSatellite]
artifact = "contracts/modules/core/ElectionModuleSatellite.sol:ElectionModuleSatellite"

[contract.CouncilTokenModule]
artifact = "contracts/modules/council-nft/CouncilTokenModule.sol:CouncilTokenModule"

[contract.SnapshotVotePowerModule]
artifact = "contracts/modules/core/SnapshotVotePowerModule.sol:SnapshotVotePowerModule"

[contract.CcipReceiverModule]
artifact = "contracts/modules/core/CcipReceiverModule.sol:CcipReceiverModule"

[router.CoreRouter]
contracts = [
"AssociatedSystemsModule",
"CrossChainModule",
"ElectionModuleSatellite",
"SnapshotVotePowerModule",
"InitialModuleBundle",
"CcipReceiverModule",
"CouncilTokenModule"
]

[invoke.upgrade_core_proxy]
target = ["InitialProxy"]
from = "<%= settings.owner %>"
func = "upgradeTo"
args = ["<%= contracts.CoreRouter.address %>"]
factory.CoreProxy.abiOf = ["CoreRouter"]
factory.CoreProxy.event = "Upgraded"
factory.CoreProxy.arg = 0
48 changes: 48 additions & 0 deletions protocol/governance/cannonfile.test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name = "synthetix-governance"
version = "<%= package.version %>-testable"
include = ["cannonfile.toml", "tomls/ccip.test.toml"]

[contract.SnapshotRecordMock]
artifact = "contracts/mocks/SnapshotRecordMock.sol:SnapshotRecordMock"

# Testable storage contracts
[contract.TestableCouncilStorage]
artifact = "contracts/generated/test/TestableCouncilStorage.sol:TestableCouncilStorage"

[contract.TestableBallotStorage]
artifact = "contracts/generated/test/TestableBallotStorage.sol:TestableBallotStorage"

[contract.TestableSnapshotVotePowerStorage]
artifact = "contracts/generated/test/TestableSnapshotVotePowerStorage.sol:TestableSnapshotVotePowerStorage"

[contract.TestableElectionSettingsStorage]
artifact = "contracts/generated/test/TestableElectionSettingsStorage.sol:TestableElectionSettingsStorage"

[contract.TestableElectionStorage]
artifact = "contracts/generated/test/TestableElectionStorage.sol:TestableElectionStorage"

[contract.TestableEpochStorage]
artifact = "contracts/generated/test/TestableEpochStorage.sol:TestableEpochStorage"

# Core Router + Testable modules
[router.TestRouter]
contracts = [
# Extend Original Core Router
"CoreRouter",
# Testable storage contracts
"TestableCouncilStorage",
"TestableBallotStorage",
"TestableSnapshotVotePowerStorage",
"TestableElectionSettingsStorage",
"TestableElectionStorage",
"TestableEpochStorage"
]

[invoke.upgrade_core_proxy]
target = ["InitialProxy"]
from = "<%= settings.owner %>"
func = "upgradeTo"
args = ["<%= contracts.TestRouter.address %>"]
factory.CoreProxy.abiOf = ["TestRouter"]
factory.CoreProxy.event = "Upgraded"
factory.CoreProxy.arg = 0
99 changes: 36 additions & 63 deletions protocol/governance/cannonfile.toml
Original file line number Diff line number Diff line change
@@ -1,63 +1,58 @@
name = "synthetix-governance"
description = "On-chain voting for synthetix councils"
version = "<%= package.version %>"
preset = "main"
include = ["./tomls/proxy-base.toml", "./tomls/council-token.toml"]

[setting.salt]
defaultValue = "governance"

# Deployment Owner, defaults to first hardhat account
[setting.owner]
[setting.initial_council_member]
defaultValue = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"

[setting.council_token_name]
defaultValue = "Synthetix Governance Module"

[setting.council_token_symbol]
defaultValue = "SNXGOV"
[setting.minimum_active_members]
defaultValue = "1"

[setting.init_council_member]
defaultValue = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" # can only specify 1
[setting.initial_nomination_period_start_date]
defaultValue = "0" # defaults to "block.timestamp + administration_period_duration" when given "0"

[setting.epoch_start]
[setting.administration_period_duration]
defaultValue = "60" # days

[setting.epoch_duration]
defaultValue = "90" # days
[setting.nomination_period_duration]
defaultValue = "15" # days

[setting.voting_period_duration]
defaultValue = "7" # days

[contract.InitialModuleBundle]
artifact = "InitialModuleBundle"
create2 = true

[contract.InitialProxy]
artifact = "contracts/Proxy.sol:Proxy"
args = ["<%= contracts.InitialModuleBundle.address %>", "<%= settings.owner %>"]
salt = "<%= settings.salt %>"
abiOf = ["InitialModuleBundle"]
create2 = true
defaultValue = "15" # days

[contract.AssociatedSystemsModule]
artifact = "contracts/modules/core/AssociatedSystemsModule.sol:AssociatedSystemsModule"

[contract.ElectionModule]
artifact = "ElectionModule"
[contract.CrossChainModule]
artifact = "contracts/modules/core/CrossChainModule.sol:CrossChainModule"

[contract.ElectionInspectorModule]
artifact = "ElectionInspectorModule"
artifact = "contracts/modules/core/ElectionInspectorModule.sol:ElectionInspectorModule"

[contract.ElectionModule]
artifact = "contracts/modules/core/ElectionModule.sol:ElectionModule"

[contract.SnapshotVotePowerModule]
artifact = "contracts/modules/core/SnapshotVotePowerModule.sol:SnapshotVotePowerModule"

[contract.CouncilTokenModule]
artifact = "CouncilTokenModule"
artifact = "contracts/modules/council-nft/CouncilTokenModule.sol:CouncilTokenModule"

[contract.DebtShareMock]
artifact = "DebtShareMock"
[contract.CcipReceiverModule]
artifact = "contracts/modules/core/CcipReceiverModule.sol:CcipReceiverModule"

[router.CoreRouter]
contracts = [
"AssociatedSystemsModule",
"ElectionModule",
"CrossChainModule",
"ElectionInspectorModule",
"ElectionModule",
"SnapshotVotePowerModule",
"InitialModuleBundle",
"CcipReceiverModule",
"CouncilTokenModule"
]

[invoke.upgrade_core_proxy]
Expand All @@ -69,37 +64,15 @@ factory.CoreProxy.abiOf = ["CoreRouter"]
factory.CoreProxy.event = "Upgraded"
factory.CoreProxy.arg = 0

[router.CouncilTokenRouter]
contracts = ["CouncilTokenModule", "InitialModuleBundle"]

[invoke.init_council_token]
target = ["CoreProxy"]
from = "<%= settings.owner %>"
func = "initOrUpgradeNft"
args = [
"<%= formatBytes32String('councilToken') %>",
"Synthetix Governance Token",
"SNXGOV",
"https://synthetix.io",
"<%= contracts.CouncilTokenRouter.address %>"
]
depends = ["invoke.upgrade_core_proxy", "router.CouncilTokenRouter"]
factory.AccountProxy.abiOf = ["CouncilTokenRouter"]
factory.AccountProxy.event = "AssociatedSystemSet"
factory.AccountProxy.arg = 2

[invoke.init_election_module]
target = ["CoreProxy"]
func = "initOrUpgradeElectionModule(address[],uint8,uint64,uint64,uint64,address)"
func = "initOrUpdateElectionSettings(address[],uint8,uint64,uint64,uint64,uint64)"
args = [
["<%= settings.init_council_member %>"],
"1",
"<%= settings.epoch_start %>",
"<%= settings.epoch_start + 86400 * settings.voting_period_duration %>",
"<%= settings.epoch_start + 86400 * settings.epoch_duration %>",
"<%= contracts.DebtShareMock.address %>",
["<%= settings.initial_council_member %>"],
"<%= settings.minimum_active_members %>",
"<%= settings.initial_nomination_period_start_date %>",
"<%= settings.administration_period_duration %>",
"<%= settings.nomination_period_duration %>",
"<%= settings.voting_period_duration %>",
]
from = "<%= settings.owner %>"

[provision.trusted_multicall_forwarder]
source = "trusted-multicall-forwarder"
3 changes: 1 addition & 2 deletions protocol/governance/contracts/Proxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ pragma solidity >=0.8.11 <0.9.0;
import {UUPSProxyWithOwner} from "@synthetixio/core-contracts/contracts/proxy/UUPSProxyWithOwner.sol";

contract Proxy is UUPSProxyWithOwner {
// solhint-disable-next-line no-empty-blocks
constructor(
address firstImplementation,
address initialOwner
) UUPSProxyWithOwner(firstImplementation, initialOwner) {}
) UUPSProxyWithOwner(firstImplementation, initialOwner) {} // solhint-disable-line no-empty-blocks
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;

import "@synthetixio/core-modules/contracts/interfaces/INftModule.sol";
import {INftModule} from "@synthetixio/core-modules/contracts/interfaces/INftModule.sol";

/**
* @title Module with custom NFT logic for the account token.
Expand Down
6 changes: 0 additions & 6 deletions protocol/governance/contracts/interfaces/IDebtShare.sol

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,13 @@ interface IElectionInspectorModule {
/// @notice Returns a list of all nominated candidates in the given epoch
function getNomineesAtEpoch(uint epochIndex) external view returns (address[] memory);

/// @notice Returns the ballot id that user voted on in the given election
function getBallotVotedAtEpoch(address user, uint epochIndex) external view returns (bytes32);

/// @notice Returns if user has voted in the given election
function hasVotedInEpoch(address user, uint epochIndex) external view returns (bool);

/// @notice Returns the number of votes given to a particular ballot in a given epoch
function getBallotVotesInEpoch(bytes32 ballotId, uint epochIndex) external view returns (uint);

/// @notice Returns the list of candidates that a particular ballot has in a given epoch
function getBallotCandidatesInEpoch(
bytes32 ballotId,
function hasVotedInEpoch(
address user,
uint chainId,
uint epochIndex
) external view returns (address[] memory);
) external view returns (bool);

/// @notice Returns the number of votes a candidate received in a given epoch
function getCandidateVotesInEpoch(
address candidate,
uint epochIndex
Expand Down
Loading