joincivil / civil Goto Github PK
View Code? Open in Web Editor NEWThe Main Monorepo and entry-point of all things Civil
The Main Monorepo and entry-point of all things Civil
lerna run test
is not a best way to run tests, as lerna has problem with printing them to CLI in a fashionable manner.
@walfly suggested using this code as a way around this.
echo */package.json | \
xargs -n1 dirname | \
xargs -n1 -I % \
sh -c "cd % && npm install && npm run lint && npm test || exit 255"
Multiple packages in the monorepo have .circleci rules from when they were seperate git repos. A way to build all packages, seperatly lint all packages and test all packages are needed.
When that's done, .circleci rules need to be written for testing all packages
nickreynolds/tcr_wrapper
I made some changed to debug-ui
, separating functionality into different pagescode
folder, I get the error Module not found: Error: Can't resolve 'fs' in '/Users/nickreynolds/Civil/Civil/packages/debug-ui/src/code'
even though it has definitely been added, and that's reflected in package.json
gulpfile
, but I'm not sure how to fix ita is undefined
and issue is related to getUserChallengesWithUnrevealedVotes
There's a bug in truffle test that makes our tests fail randomly, fixing it is of utmost importance due to hugely increased rates of circleci tests failing.
nickreynolds/tcr_wrapper
I've made changes to debug-ui to support testing TCR transactions.civil-web
and got the Invalid number of arguments to Solidity function
error. I've tried other functions as well (like deposit
) but they also fail..ts
wrappers in core
, the artifacts must be copied over manually from contracts
package. When we migrate contracts via truffle, the artifacts in core
become outdated, and don't contain correct per-network deployed addresses.core
we have the most recent deployed contracts.Currently debug-ui is not yet tested or functional, to make it work, it needs to be able to display an article.
Load newsroom, load a specific article from there and than parse it as a markdown and display it.
Newsroom-manager has a Civil context, which creates a separate instance of Civil for it's own purposes. This is especially noticeable in the DApp, when both the Newsroom Manager and DApp listen for network and account updates duplicating calls
Sometimes gas estimates from web3 are too low for the call to succeed which then throws a EVM error. Add a safe minimum to the estimated gas to avoid this problem, decide whether this should be a constant or a multiplier.
Right now ACL-based contracts have a lot of separate logic for maintaining superusers. By leveraging multi-sig wallets we can obtain the same functionality while still maintaining separation of concerns as well as having a singe contract acting as a Will of ACL-based contracts.
ACLs would have a single owner, god contract, that in most of the cases be a multi-sig wallet
In PR #484, two breaking changes were made regarding Newsroom Charters:
@joincivil/core
to parse the charter content from IPFS into a JS object directly in core
. previously, this field was a string and the DApp was parsing that string into an object.PR #500 was merged as a temporary fix for rendering legacy charter data, but the DApp needs to be updated to use the new Charter schema
Dependabot couldn't authenticate with registry.npmjs.org.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
You can mention @dependabot in the comments below to contact the Dependabot team.
Right now contract tests (packages/contrats/test
) use Truffle wrappers on all contracts we have, while our library (packages/civil.ts
) has better support for compile time errors.
Using one wrapper in both places would decrease the amount of dependencies we have and increase security due to possible different behaviours of both. Using our own abi-generated contracts is a preferable option, so updating contract tests is better
The main monorepo doesn't have a readable and one with core information needed readme. Stuff like explaining what's here, how is it useful, how to use it in your project, how to start contributing, licenses, stuff like this.
Things needed for new developers to become on-board and are able to use and contribute to our packages effectively
Typescript 2.9 and later changes on how the JSON files are imported. Due to lack of time we've decided to freeze the version to <2.9.0
but in the future we'd be happy to updated it to the newest version.
Work needed to be done:
package.json
esModuleInterop
resolveJsonModule
declarationMap
Each open-source has either Apache 2.0 or LGPLv2.1 license in it. Add those licenses to the respective packages, package.json and explain in the main Monorepo README
Solhint doesn't error-out on a glob usage.
We previously used glob src/contracts/**/*.sol
which is not parsed properly, linting only contracts in subfolders, omitting main ones. Proper linting path is needed (src/contracts/*.sol src/contracts/test/*.sol
).
This also introduces 500+ (!) linting errors and warnings into our codebase which all need to be fixed.
When a package.json inside packages/*
change, the cache key doesn't change, meaning CircleCI builds use outdates node_modules/
folder
If the user leaves fields blank in these views, they are still able to click the transaction button and the transaction silently fails in the UI.
So we need to add some validation that disables the transaction button and message the user about missing fields.
Currently the only way to store and load content is through InMemoryProvider, an abstraction of ContentProvider, which destroys the content on website refresh. We need a more permanent way to store content in a way that allows easy debugging and editing.
Using Gists for this scenario is pretty cheeky and a functional and easy to maintain way to achieve this goal. A new implementation of a ContentProvider is needed.
Currently to use our packages in Typescript projects, the end user has to include @joincivil/typescript-typings
package in their typeRoots
directive of Typescript.
This is not a standard step and might confuse users, removing it would greatly benefit on-boarding of new developers.
My own suggestion is to find a way on how to pack all the custom and used types from @joincivil/typescript-typings
into one .d.ts
file.
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.