molochventures / moloch Goto Github PK
View Code? Open in Web Editor NEW๐น Moloch whose mind is pure machinery! Moloch whose blood is running money!
License: MIT License
๐น Moloch whose mind is pure machinery! Moloch whose blood is running money!
License: MIT License
Describe the issue
Trying to compile the code errors on CREATE2
since that is not enabled on byzantium.
Steps to Reproduce
npx buidler moloch-deploy --network develop
Error
contracts/gnosis-safe/proxies/ProxyFactory.sol:50:22: Warning: The "create2" instruction is only available for Constantinople-compatible VMs. You are currently compiling for "byzantium", where it will be interpreted as an invalid instruction.
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
^------------------------------------------------------------------^
Error BDLR600: Compilation failed
Additional Information
Line 40 in 1077f42
Hi , just to make sure, about the buidler.config.js
Does it should be buidler.config.js or builder.config.js
Error: Invalid number of parameters for "approvedTokens". Got 0 expected 1!
at getApprovedToken (/Users/richardmelkonian/0x-movie/moloch/scripts/utils.js:47:37)
I get this error when trying to deploy the pool. My deployment params :
module.exports.SUMMONER = '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266'
module.exports.TOKEN = ['0x6b175474e89094c44da98b954eedeac495271d0f', '0xdac17f958d2ee523a2206206994597c13d831ec7']
module.exports.PERIOD_DURATION_IN_SECONDS = 17280
module.exports.VOTING_DURATON_IN_PERIODS = 35
module.exports.GRACE_DURATON_IN_PERIODS = 35
module.exports.PROPOSAL_DEPOSIT = '100000000000000000' // Large numbers should be string or big numbers
module.exports.DILUTION_BOUND = 3
module.exports.PROCESSING_REWARD = '10000000000'
Not sure what could be causing this. Seems as if the deployment params are not setting the contract constructor?
https://molochdao.com/ sometimes take a really long time to load (~1 mins). Can this be optimized?
Evnet Ragequit is used in the _ragequit method, the first argument is msg.sender. I'm not sure if that's a problem, but if I call the ragekick method, it's not the member that's kicked out. The event seemed meaningless.If I analyzed the data from evnet alone, I wouldn't know who was kicked out.
trying a fresh deploy from master on gitpod, following instructions i get this error:
ReferenceError: buidlerArguments is not defined
Not sure if it's because it needs to be updated with hardhat, the new name for buidler...
I'm looking through the Moloch DAO in light of recent changes and would like to add one further simplification: remove completely GuildVault and TributeTokens. Instead, here's how a proposal would work:
proposalApproved()
rewardContract
rewardContract
with the function proposalApproved()
which can any of these things:
This simplifies the code and allows greater flexibility, because anything can be coded on the proposalContract address, so we don't need to imagine everything that can be created in the future.
But what about the GuildVault and lootTokens? Maybe I'm missing something but it seems to me the only purpose of LootTokens is to be a temporary step before someone can take tokens out. Instead we can remove all that functionality and just require that when someone wants to rageQuit they need to specify which tokens they want to take with them. The DAO then will go through that list and then use send them the equivalent percentage of the balance of that specific token.
This has a few advantages, one of them being that it's up to the users themselves signal which token they care about personally. If you ignore a token it means you are basically donating your share of that token back to the community, therefore increasing the share that the next person can take: so undervalued tokens will accumulate until it's worth for people to spend the gas to take them out too.
This proposal both simplifies code and also keeps Moloch flexible enough for it to do unpredictable stuff in the future.
At the risk of infringing privacy, but easier to illustrate the issue via genuine conversation:
I would like to put my Moloch V2 as the beneficiary: https://cryptounlocked.wetrust.io/
Another use case: some media attention, press coverage, QR code printed in a newspaper... Guys sending funds directly to the address.
Sending ETH directly to the Vault / Treasury seems cool, practical.
I ve installed moloch to kubernetes system with https://github.com/sealingtech/EDCOP-MOLOCH and i use helm for install it. So, everything is okey. But when i enter into the pods named moloch-moloch-capture-0 and moloch-moloch-viewer-0, I get this error for testing moloch-capture? Could you help me for problem? Thanx
Getting an error when trying to deploy a pool, any ideas anyone?
npx hardhat pool-deploy --network develop --shares 100 --tokens 100
An unexpected error occurred:
TypeError: moloch.approvedToken is not a function
at getApprovedToken (/dao/moloch/scripts/utils.js:47:37)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I did set the correct address in hardhat.config.js after the dao was deployed
npx buidler moloch-deploy --network mainnet
Compiling...
Downloading compiler version 0.5.3
contracts/Moloch.sol:505:46: Warning: This declaration shadows an existing declaration.
function _ragequit(uint256 sharesToBurn, IERC20[] memory approvedTokens) internal {
^----------------------------^
contracts/Moloch.sol:89:5: The shadowed declaration is here:
IERC20[] public approvedTokens;
^----------------------------^
contracts/gnosis-safe/proxies/ProxyFactory.sol:50:22: Warning: The "create2" instruction is only available for Constantinople-compatible VMs. You are currently compiling for "byzantium", where it will be interpreted as an invalid instruction.
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
^------------------------------------------------------------------^
contracts/GuildBank.sol:13:54: Warning: Unreachable code.
for (uint256 i=0; i < approvedTokens.length; i++) {
^-^
contracts/gnosis-safe/libraries/CreateAndAddModules.sol:12:27: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
function enableModule(Module module)
^-----------^
contracts/gnosis-safe/libraries/CreateAndAddModules.sol:12:5: Warning: Function state mutability can be restricted to pure
function enableModule(Module module)
^ (Relevant source part starts here and spans across multiple lines).
Compiled 35 contracts successfully
Deploying a new DAO to the network mainnet
Deployment parameters:
summoner: 0xfA5f6c326692019A550f31C3655aBF1fa732bD4B
token: 0xa1b3de85197f26e78016ccb8ac36594e03bee494
periodSeconds: 17280
votingPeriods: 35
gracePeriods: 35
abortPeriods: 5
proposalDeposit: 1000000000000000000
dilutionBound: 3
processingReward: 10000000000
? Please confirm that the deployment parameters are correct Yes
Deploying...
An unexpected error occurred: Returned error: Invalid JSON RPC response: "basic auth failure\n"
This shouldn't have happened, please report it to help us improve Buidler.
For more info run Buidler with --show-stack-traces.
When calling sponsor proposal I get the following error:
Error: Returned error: execution reverted
at SimpleTaskDefinition.action (/Users/matthewrodgers/Desktop/Eudaimonia/moloch/src/scripts/moloch-tasks.js:225:18)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Environment._runTaskDefinition (/Users/matthewrodgers/Desktop/Eudaimonia/moloch/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at Environment.run (/Users/matthewrodgers/Desktop/Eudaimonia/moloch/node_modules/hardhat/src/internal/core/runtime-environment.ts:129:14)
at main (/Users/matthewrodgers/Desktop/Eudaimonia/moloch/node_modules/hardhat/src/internal/cli/cli.ts:197:5) {
data: {
stack: 'ProviderError: execution reverted\n' +
' at HttpProvider.request (/Users/matthewrodgers/Desktop/Eudaimonia/moloch/node_modules/hardhat/src/internal/core/providers/http.ts:49:19)\n' +
' at LocalAccountsProvider.request (/Users/matthewrodgers/Desktop/Eudaimonia/moloch/node_modules/hardhat/src/internal/core/providers/accounts.ts:168:34)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
' at AutomaticGasProvider._getMultipliedGasEstimation (/Users/matthewrodgers/Desktop/Eudaimonia/moloch/node_modules/hardhat/src/internal/core/providers/gas-providers.ts:72:31)\n' +
' at AutomaticGasProvider.request (/Users/matthewrodgers/Desktop/Eudaimonia/moloch/node_modules/hardhat/src/internal/core/providers/gas-providers.ts:131:18)\n' +
' at Web3HTTPProviderAdapter._sendJsonRpcRequest (/Users/matthewrodgers/Desktop/Eudaimonia/moloch/node_modules/@nomiclabs/hardhat-web3/src/web3-provider-adapter.ts:80:22)',
name: 'ProviderError'
},
hijackedStack: 'Error: Returned error: execution reverted\n' +
' at Object.ErrorResponse (/Users/matthewrodgers/Desktop/Eudaimonia/moloch/node_modules/@truffle/interface-adapter/node_modules/web3-core-helpers/lib/errors.js:28:19)\n' +
' at /Users/matthewrodgers/Desktop/Eudaimonia/moloch/node_modules/@truffle/interface-adapter/node_modules/web3-core-requestmanager/lib/index.js:303:36\n' +
' at processTicksAndRejections (node:internal/process/task_queues:83:21)'
}
Any help with this would be appreciated.
Is this project representing the evil inside or why did you dedicate the name into something devilish ?
Please let me know the intent, before I start working with the project.
Thanks a lot.
...
> bash scripts/test.sh
Starting our own ganache instance
Waiting for ganache to launch on port 8545...
Ganache launched!
Buidler version 1.1.2
Compiling...
Downloading compiler version 0.5.3
contracts/Moloch.sol:700:57: Warning: This declaration shadows an existing declaration.
function fairShare(uint256 balance, uint256 shares, uint256 totalShares) internal pure returns (uint256) {
^-----------------^
contracts/Moloch.sol:53:5: The shadowed declaration is here:
uint256 public totalShares = 0; // total shares across all members
^----------------------------^
contracts/Moloch.sol:494:5: Warning: Function state mutability can be restricted to view
function _didPass(uint256 proposalIndex) internal returns (bool didPass) {
^ (Relevant source part starts here and spans across multiple lines).
Compiled 7 contracts successfully
Error BDLR700: Artifact for contract "Token" not found.
For more info go to https://buidler.dev/BDLR700 or run Buidler with --show-stack-traces
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `bash scripts/test.sh`
npm ERR! Exit status 1
npm ERR!
...
Maybe they weren't updated since migration from v1?
Im trying to deploy a new DAO and Im following instruction give on read.me
Here are the steps that I have followed.
Cloned this library and installed the dependencies using npm i
Then I edited buidler.config.js
and set values for INFURA_API_KEY
and MAINNET_PRIVATE_KEY
(account private key exported from metamask).
Im keeping deployment-params.js
as it is.
Now when I run npx buidler moloch-deploy --network mainnet
I'm getting following error.
what will be value of BuilderConfig.networks.develop.url
?
Your website, https://moloch.vc/, is offline
moloch-tasks.js:48:36
Attemping to run moloch-deply is returning this error. It seems like 9 is the correct number of parameters that should be passed.
If cost of loop (plus cost for rest of transaction) exceeds block gas limit, none of the functions depending on updatePeriod() will be executable. Having a constant cost for this function would prevent this issue.
My quick ballpark guess on how long it would take before contract becomes unusable: ~159-177 days
Update currentPeriod -> 5k
Update periods[currentPeriod] -> 40k (start & end)
Update pendingProposals -> average ~2.5k?
With block gas limit of 8m and periodDuration of 1 day, that's about 159-177 days before the contract is unusable. However, If storage costs are revised upward, it could be a lot less than 170 days.
Since periodDuration
is "fixed" and since endTime
and startTime
are predictable, we can maybe have something like:
function getPeriodTimes(uint256 period) public returns (uint256 startTime, uint256 endTime) {
startTime = now.sub(period.mul(periodDuration));
endTime = startTime.add(periodDuration);
return (startTime, endTime)
}
Need to account for change in period duration but that should be relatively easy by adding some other variables. Basically, we need to change how the updatePeriod()
function works such that it has a contant cost, or we run the risk of making the other functions not executable.
I tried publishing a moloch contract on Remix, but I got this error.
Hi,
It appears that the current repo is missing the safe-contracts
directory: the GnosisSafe
and ProxyContract
.sol files are missing, even though the moloch.js
test attempts to use them.
Is there something that hasn't been updated / are the contracts just missing from the repo?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.