-
Notifications
You must be signed in to change notification settings - Fork 43
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
Zksync testing #596
base: main
Are you sure you want to change the base?
Zksync testing #596
Conversation
Co-authored-by: Jordan <[email protected]>
Co-authored-by: Jordan <[email protected]>
Co-authored-by: Jordan <[email protected]>
Co-authored-by: Michael Heuer <[email protected]>
Co-authored-by: Michael Heuer <[email protected]>
…/osx into deployments/old-contracts
Co-authored-by: Michael Heuer <[email protected]>
Co-authored-by: Michael Heuer <[email protected]>
Co-authored-by: Michael Heuer <[email protected]>
add the .env for test description
Generating a human readable deployed contracts JSON file
@Michael-A-Heuer This PR doesn't get merged. Please focus on other stuff and resolve comments. |
IMO, keeping a changelog still makes sense even if we don't merge it (in case there is a problem and we quickly want to see the differences). |
Again, I repeat: changes will in the end be done on the develop branch and on there, all the plugins are removed already. So you want me to write changelog and then do it again on develop branch ? Doesn't make sense. -_- |
packages/contracts/src/zksync/PluginSetupProcessorUpgradeable.sol
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've compared the contracts and checked most of the files.
It wasn't possible for me to check
- packages/contracts/test/framework/plugin/plugin-setup-processor.ts because 3.8k lines of code changed according to GH.
I ignored tests that are skipped on zkSync
This warning
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Warning: It looks like you are using 'ecrecover' to validate a signature of a user account. │
│ zkSync Era comes with native account abstraction support, therefore it is highly recommended NOT │
│ to rely on the fact that the account has an ECDSA private key attached to it since accounts might│
│ implement other signature schemes. │
│ Read more about Account Abstraction at https://v2-docs.zksync.io/dev/developer-guides/aa.html │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
seems to be irrelevant because we don't use ecrecover
. Please confirm this.
Becuase the tests are not working on the runner, I ran the test suite locally following the packages/contracts/README-zkSync.md
instructions.
In one terminal I ran
nvm use 18 && yarn clean && yarn build --network zkLocalTestnet && yarn build
Then I ran
yarn hardhat node-zksync
and in another terminal ran
nvm use 18 && yarn test --network zkLocalTestnet
this resulted in the following errors:
DAO
1) "before each" hook for "does not support the empty interface"
TestParameterScopingCondition
2) "before all" hook in "TestParameterScopingCondition"
SharedPlugin
3) "before each" hook for "increments IDs"
Managing DAO
Deploying ManagingDao.
ManagingDAO will be owned by the (Deployer: 0xBC989fDe9e54cAd2aB4392Af6dF60f04873A033A) temporarily, while the entire framework is getting deployed. At the final step when Multisig is available, it will be installed on managingDAO and all roles for the Deployer will be revoked.
4) "before all" hook for "should have deployments"
DAOFactory:
5) "before each" hook for "reverts if no plugin is provided"
DAORegistry
6) "before each" hook for "succeeds even if the dao subdomain is empty"
PluginRepoFactory:
ERC-165
7) "before each" hook for "does not support the empty interface"
PluginRepoRegistry
8) "before each" hook for "successfully sets subdomainregistrar"
PluginSetupProcessor
10) "before all" hook in "PluginSetupProcessor"
PluginSetupProcessorUpgradeable
11) "before all" hook in "PluginSetupProcessorUpgradeable"
ENSSubdomainRegistrar
Check the initial ENS state
12) "before each" hook for "unregistered domains are owned by the zero address on ENS"
InterfaceBasedRegistry
13) "before all" hook in "InterfaceBasedRegistry"
MajorityVotingMock
14) "before all" hook in "MajorityVotingMock"
AddresslistVoting
15) "before all" hook in "AddresslistVoting"
AddresslistVotingSetup
16) "before all" hook for "does not support the empty interface"
TokenVoting
17) "before all" hook in "TokenVoting"
TokenVotingSetupZkSync
18) "before all" hook for "does not support the empty interface"
Multisig
19) "before all" hook in "Multisig"
MultisigSetup
20) "before all" hook for "does not support the empty interface"
MerkleDistributor
plugin interface:
21) "before each" hook for "does not support the empty interface"
MerkleMinter
Upgrades
22) "before each" hook for "from v1.0.0"
GovernanceERC20
23) "before all" hook in "GovernanceERC20"
24) DAO Upgrade
"before all" hook in "DAO Upgrade":
What is causing the tests to fail for me? I advise that you make these test pass on the runner.
packages/contracts/test/plugins/governance/majority-voting/addresslist/addresslist-voting.ts
Show resolved
Hide resolved
"@openzeppelin/contracts": "4.9.5", | ||
"@openzeppelin/contracts-upgradeable": "4.9.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest OZ version is 4.9.6
Update on #596 (review): After explicitly setting
|
Co-authored-by: Michael Heuer <[email protected]>
* fix: use try_function * Fix: update node version in subgraph test flow * fix: upgrade node version
Description
Please include a summary of the change and be sure you follow the contributions rules we do provide here
Task ID: OS-?
TokenVotingSetupZkSync.sol
which will be deployed and used forTokenVoting
Plugin creations. This was needed as in theTokenVotingSetup.sol
, we were deploying plugins withclones
which is not supported on ZkSync for not-so-important reasons for reviewers.PluginSetupProcessorUpgradeable.sol
to allow upgradeable psp. This will be deployed only on zksync to avoid compiler bugs in case it happens.MockedHelper
contract in/test
to help with the tests of PSP. This was needed as psp was written withsmocks
. As it's not supported on zksync,MockedHelper
seemed the quickest option.ProxyFactory
andProxyLib
(or more precisely, copied it fromdevelop
branch by Michael) to help ease the deployments.wrapper, hardhat, zksync
inside/test/test-utils/wrapper
. This was necessary to avoid rewriting the same tests. TheWrapper
class is used to instantiate the appropriate network class to distinguish how deployments must be done. There're a couple of more functions into it that are different between zksync/hardat. The wrapper class is instantiated insidehardhat.config.ts
.hardhat.config.ts
to allow compiling contracts with zksync or hardhat both.evm_setAutomine
has been skipped only on zksync network as this feature is not supported on there.PluginSetupProcessor
or its upgradeable version. Same forTokenVotingSetupZkSync
orTokenVotingSetup
.with the same name exists, it can't decide which one to deploy. So, in the
Wrapper
class, we got string names and importing them.Type of change
See the framework lifecycle in
packages/contracts/docs/framework-lifecycle
to decide what kind of change this pull request is.Checklist:
CHANGELOG.md
file in the root folder.DEPLOYMENT_CHECKLIST
file in the root folder.UPDATE_CHECKLIST
file in the root folder.