Skip to content

Commit

Permalink
Release/20220704 (#542)
Browse files Browse the repository at this point in the history
* update workflows

* update workflow

* fix hardhat-deploy (#312)

* fix hardhat-deploy

* update hardhat-deploy

Co-authored-by: Giorgi-Lagidze <giorgi.lagidze@toptal.com>

* Fix Govern queue test issue (#313)

* fix test failure if event arguments are structs

* fix test failure due to missing event abi

* update comment to explain the reason behind chai overwrite

* fix unlocked event test case

* EOF error fix

Co-authored-by: Giorgi-Lagidze <giorgi.lagidze@toptal.com>

* add paths to github action workflow (#314)

* add path filtering on the workflows

* dummy test workflow

* add dummy test file to trigger the test cd

* remove dummy test workflow and file

* update subgraph

* replace govern-console with new console

* update packages and gitignore

* add public in gitignore

* remove .DS_Store

* Feature/remove govern console (#316)

* replace govern-console with new console

* update packages and gitignore

* add public in gitignore

* remove .DS_Store

Co-authored-by: Giorgi-Lagidze <giorgi.lagidze@toptal.com>

* change babel-loader version

* add storybook-static in gitignore

* Feature/fleek (#319)

* add rinkeby fleek

* update console's workflow

* update console workflow

* update govern-console

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* update fleek

* Feature/proposaldetails (#324)

* Added basic injected wallet and added Subgraph queries for DAOs

* Added all subgraph data for daos

* Footer in progress

* Corrected subgraph query

* Added subgraph for fetching proposals and for fetching proposal details

* Feature/new proposal flow (#322)

* added public folder togitignore

* Proposal Flow

* few typescript type fixes and routing fix, an id param cannot be passed directly as the first route

* Updated correct url change

* Corrected url

Co-authored-by: Bhanu Sanghi <bhanu@jiny.io>
Co-authored-by: bhanusanghi <bhanussanghi@gmail.com>

* Dao queries based on new subgraph definition (#318)

* Dao queries based on new subgraph definition

* update govern workflow

* fix eof

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* Fix/gas dos (#310)

* gas dos fix on queue

* change erc3000

* max calldatasize for govern-queue schedule

* max calldatasize for govern-queue

* change verification config

* increase executionDelay

* add collateral checks

* increase executionDelay for dummyconfig

* change parameters for govern base factory

* update govern subgraph

* update govern base factory

* update subgraph

* verify fix governbase

* update rinkeby subgraph

Co-authored-by: Giorgi-Lagidze <giorgi.lagidze@toptal.com>

* create default erc3000 config data (#326)

* GovernRegistry and GovernBaseFactory addresses in README.md for the Rinkeby testnet updated (#329)

* give root role to govern (#330)

* give root role to govern

* update root rule for queue

* freeze root role

* fix EOF

* update fleek rinkeby for console

* update workflow and fleek

* update workflow

* trigger workflow

* update workflow

* update workflow

* update workflow to include CI warnings

* trigger workflow path

* Govern integration (#331)

* Added basic injected wallet and added Subgraph queries for DAOs

* Added all subgraph data for daos

* Footer in progress

* Corrected subgraph query

* create dao with happy path testing, no global config option yet

* add more test cases for createDao

* add configuration option for dao factory address

* renamed filename to follow convention

* Added subgraph for fetching proposals and for fetching proposal details

* Feature/new proposal flow (#322)

* added public folder togitignore

* Proposal Flow

* few typescript type fixes and routing fix, an id param cannot be passed directly as the first route

* Updated correct url change

* Corrected url

* create esm and umd bundles

* add example using createDao for web

* updated doc for createDao

* fix merge with develop error

* add proposal scheduling - TODO fix test with bad config

* [WIP] chore: newGover implementation in ts library

* fix test failure with schedule proposal

* chore: refactor of new govern finished with green tests

* WIP: add challenge, veto, resolve, execute proposal.. test still failing.

* fix: rollup json added

* update govern queue abi

* scree 1 and 2 in progress

* fix merge issue

* schedule proposal with a resolver

* screen 3 in progress

* essential UI for all 4 screen

* clean up

* set nonce in schedule

* Added Wallet and Proposal Details page.

* new proposal button

* create dao references used for input fields and checkboxes

* make proposal nonce nullable

* input field value missed

* chore: removed governBaseFactory abi json

* Corrected input fields

* chore: entirely removed abis from govern package

* fix: remove json plugin from umdconfig in rollup

* chore: register abi json converted to human readable

* challenge works now, but, resolve still fail with DM_INVALID_ADJUDICATION_STATE error

* exclude files from jest test coverage

* skip challenge test as its now failing with CLK_TOO_MANY_TRANSITIONS

* add alchemy archive node

* run more tests

* fix depcheck error - ethers missing

* grant veto power to test user to do veto test - unable to grant veto power

* Changed Routing, New Proposal testing in progress

* Added govern package with yarn link. Corrected variable name

* Updated data to session storage

* Working test proposal creation

* Govern: fix veto test

* bring back test command

* fix resolve test failure

* Added HashRouter and now storing values in session storage, Added Challenge Proposal Integration WIP

* New Proposal Flow.

* grid css fix

* Added -  DAO config fetch

* Added extra data pull for challenge proposal

* checkbox component

* blueswitch component

* blue porgressbar component

* cleaning up create-dao views impelemnting new components

* Added execute proposal function WIP

* Removed debuggers

* Footer added and lint fixes

Co-authored-by: Bhanu Sanghi <bhanu@jiny.io>
Co-authored-by: bhanusanghi <bhanussanghi@gmail.com>
Co-authored-by: Yuet Loo Wong <contact@yuetloo.com>
Co-authored-by: cbrzn <cesarbrazon10@gmail.com>
Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* change token amount to BigNumberish (#332)

* build and install govern in workflow

* Govern integration (#333)

* Added basic injected wallet and added Subgraph queries for DAOs

* Added all subgraph data for daos

* Footer in progress

* Corrected subgraph query

* create dao with happy path testing, no global config option yet

* add more test cases for createDao

* add configuration option for dao factory address

* renamed filename to follow convention

* Added subgraph for fetching proposals and for fetching proposal details

* Feature/new proposal flow (#322)

* added public folder togitignore

* Proposal Flow

* few typescript type fixes and routing fix, an id param cannot be passed directly as the first route

* Updated correct url change

* Corrected url

* create esm and umd bundles

* add example using createDao for web

* updated doc for createDao

* fix merge with develop error

* add proposal scheduling - TODO fix test with bad config

* [WIP] chore: newGover implementation in ts library

* fix test failure with schedule proposal

* chore: refactor of new govern finished with green tests

* WIP: add challenge, veto, resolve, execute proposal.. test still failing.

* fix: rollup json added

* update govern queue abi

* scree 1 and 2 in progress

* fix merge issue

* schedule proposal with a resolver

* screen 3 in progress

* essential UI for all 4 screen

* clean up

* set nonce in schedule

* Added Wallet and Proposal Details page.

* new proposal button

* create dao references used for input fields and checkboxes

* make proposal nonce nullable

* input field value missed

* chore: removed governBaseFactory abi json

* Corrected input fields

* chore: entirely removed abis from govern package

* fix: remove json plugin from umdconfig in rollup

* chore: register abi json converted to human readable

* challenge works now, but, resolve still fail with DM_INVALID_ADJUDICATION_STATE error

* exclude files from jest test coverage

* skip challenge test as its now failing with CLK_TOO_MANY_TRANSITIONS

* add alchemy archive node

* run more tests

* fix depcheck error - ethers missing

* grant veto power to test user to do veto test - unable to grant veto power

* Changed Routing, New Proposal testing in progress

* Added govern package with yarn link. Corrected variable name

* Updated data to session storage

* Working test proposal creation

* Govern: fix veto test

* bring back test command

* fix resolve test failure

* Added HashRouter and now storing values in session storage, Added Challenge Proposal Integration WIP

* New Proposal Flow.

* grid css fix

* Added -  DAO config fetch

* Added extra data pull for challenge proposal

* checkbox component

* blueswitch component

* blue porgressbar component

* cleaning up create-dao views impelemnting new components

* Added execute proposal function WIP

* Removed debuggers

* Footer added and lint fixes

* grid fix for the console page

* proposals page fix and load more button fixes to

* Dao Main page grd fix

* wallet connection handling

Co-authored-by: Bhanu Sanghi <bhanu@jiny.io>
Co-authored-by: bhanusanghi <bhanussanghi@gmail.com>
Co-authored-by: Yuet Loo Wong <contact@yuetloo.com>
Co-authored-by: cbrzn <cesarbrazon10@gmail.com>
Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* Header Title Fixed and Button added for Create DAO (#334)

* Added basic injected wallet and added Subgraph queries for DAOs

* Added all subgraph data for daos

* Footer in progress

* Corrected subgraph query

* create dao with happy path testing, no global config option yet

* add more test cases for createDao

* add configuration option for dao factory address

* renamed filename to follow convention

* Added subgraph for fetching proposals and for fetching proposal details

* Feature/new proposal flow (#322)

* added public folder togitignore

* Proposal Flow

* few typescript type fixes and routing fix, an id param cannot be passed directly as the first route

* Updated correct url change

* Corrected url

* create esm and umd bundles

* add example using createDao for web

* updated doc for createDao

* fix merge with develop error

* add proposal scheduling - TODO fix test with bad config

* [WIP] chore: newGover implementation in ts library

* fix test failure with schedule proposal

* chore: refactor of new govern finished with green tests

* WIP: add challenge, veto, resolve, execute proposal.. test still failing.

* fix: rollup json added

* update govern queue abi

* scree 1 and 2 in progress

* fix merge issue

* schedule proposal with a resolver

* screen 3 in progress

* essential UI for all 4 screen

* clean up

* set nonce in schedule

* Added Wallet and Proposal Details page.

* new proposal button

* create dao references used for input fields and checkboxes

* make proposal nonce nullable

* input field value missed

* chore: removed governBaseFactory abi json

* Corrected input fields

* chore: entirely removed abis from govern package

* fix: remove json plugin from umdconfig in rollup

* chore: register abi json converted to human readable

* challenge works now, but, resolve still fail with DM_INVALID_ADJUDICATION_STATE error

* exclude files from jest test coverage

* skip challenge test as its now failing with CLK_TOO_MANY_TRANSITIONS

* add alchemy archive node

* run more tests

* fix depcheck error - ethers missing

* grant veto power to test user to do veto test - unable to grant veto power

* Changed Routing, New Proposal testing in progress

* Added govern package with yarn link. Corrected variable name

* Updated data to session storage

* Working test proposal creation

* Govern: fix veto test

* bring back test command

* fix resolve test failure

* Added HashRouter and now storing values in session storage, Added Challenge Proposal Integration WIP

* New Proposal Flow.

* grid css fix

* Added -  DAO config fetch

* Added extra data pull for challenge proposal

* checkbox component

* blueswitch component

* blue porgressbar component

* cleaning up create-dao views impelemnting new components

* Added execute proposal function WIP

* Removed debuggers

* Footer added and lint fixes

* grid fix for the console page

* proposals page fix and load more button fixes to

* Dao Main page grd fix

* wallet connection handling

* Govern Console Name and Icon change, create Dao added to the top

Co-authored-by: Bhanu Sanghi <bhanu@jiny.io>
Co-authored-by: bhanusanghi <bhanussanghi@gmail.com>
Co-authored-by: Yuet Loo Wong <contact@yuetloo.com>
Co-authored-by: cbrzn <cesarbrazon10@gmail.com>
Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* Feature/dao 151 integrate challenge execute and veto (#335)

* Added WIP for Challenge, Completed integration of Schedule

* Fix bugs

Co-authored-by: bhanusanghi <bhanussanghi@gmail.com>

* Feature/dao 127 dao creation (#336)

* Added basic injected wallet and added Subgraph queries for DAOs

* Added all subgraph data for daos

* Footer in progress

* Corrected subgraph query

* create dao with happy path testing, no global config option yet

* add more test cases for createDao

* add configuration option for dao factory address

* renamed filename to follow convention

* Added subgraph for fetching proposals and for fetching proposal details

* Feature/new proposal flow (#322)

* added public folder togitignore

* Proposal Flow

* few typescript type fixes and routing fix, an id param cannot be passed directly as the first route

* Updated correct url change

* Corrected url

* create esm and umd bundles

* add example using createDao for web

* updated doc for createDao

* fix merge with develop error

* add proposal scheduling - TODO fix test with bad config

* [WIP] chore: newGover implementation in ts library

* fix test failure with schedule proposal

* chore: refactor of new govern finished with green tests

* WIP: add challenge, veto, resolve, execute proposal.. test still failing.

* fix: rollup json added

* update govern queue abi

* scree 1 and 2 in progress

* fix merge issue

* schedule proposal with a resolver

* screen 3 in progress

* essential UI for all 4 screen

* clean up

* set nonce in schedule

* Added Wallet and Proposal Details page.

* new proposal button

* create dao references used for input fields and checkboxes

* make proposal nonce nullable

* input field value missed

* chore: removed governBaseFactory abi json

* Corrected input fields

* chore: entirely removed abis from govern package

* fix: remove json plugin from umdconfig in rollup

* chore: register abi json converted to human readable

* challenge works now, but, resolve still fail with DM_INVALID_ADJUDICATION_STATE error

* exclude files from jest test coverage

* skip challenge test as its now failing with CLK_TOO_MANY_TRANSITIONS

* add alchemy archive node

* run more tests

* fix depcheck error - ethers missing

* grant veto power to test user to do veto test - unable to grant veto power

* Changed Routing, New Proposal testing in progress

* Added govern package with yarn link. Corrected variable name

* Updated data to session storage

* Working test proposal creation

* integration functions

* handle creating new token

* fix: extra line removed

* correcting gradient in progressbar

* essencial integration complete

* custom paper component

* circular progress component

* adding comments

* integrate Create Dao UI with govern package

* trying to add missing sessionStorage

Co-authored-by: Bhanu Sanghi <bhanu@jiny.io>
Co-authored-by: bhanusanghi <bhanussanghi@gmail.com>
Co-authored-by: Yuet Loo Wong <contact@yuetloo.com>
Co-authored-by: Vamsi Reddy <vamsireddy9672@gmail.com>
Co-authored-by: cbrzn <cesarbrazon10@gmail.com>
Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: c0rv0s <inathan.m@gmail.com>

* limit increased for prposals (#337)

* Feature/dao 184 dao setting views (#339)

* subgraph queries for console

* add proposal button checks

* eslint rearrange

* prepare dao setting ui

* configure functionality

* session storage dependency removed from all pages

* Dao main page handled with non existant data

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: Vamsi <vamsireddy9672@gmail.com>

* Feature/dao 127 dao creation (#340)

* Added basic injected wallet and added Subgraph queries for DAOs

* Added all subgraph data for daos

* Footer in progress

* Corrected subgraph query

* create dao with happy path testing, no global config option yet

* add more test cases for createDao

* add configuration option for dao factory address

* renamed filename to follow convention

* Added subgraph for fetching proposals and for fetching proposal details

* Feature/new proposal flow (#322)

* added public folder togitignore

* Proposal Flow

* few typescript type fixes and routing fix, an id param cannot be passed directly as the first route

* Updated correct url change

* Corrected url

* create esm and umd bundles

* add example using createDao for web

* updated doc for createDao

* fix merge with develop error

* add proposal scheduling - TODO fix test with bad config

* [WIP] chore: newGover implementation in ts library

* fix test failure with schedule proposal

* chore: refactor of new govern finished with green tests

* WIP: add challenge, veto, resolve, execute proposal.. test still failing.

* fix: rollup json added

* update govern queue abi

* scree 1 and 2 in progress

* fix merge issue

* schedule proposal with a resolver

* screen 3 in progress

* essential UI for all 4 screen

* clean up

* set nonce in schedule

* Added Wallet and Proposal Details page.

* new proposal button

* create dao references used for input fields and checkboxes

* make proposal nonce nullable

* input field value missed

* chore: removed governBaseFactory abi json

* Corrected input fields

* chore: entirely removed abis from govern package

* fix: remove json plugin from umdconfig in rollup

* chore: register abi json converted to human readable

* challenge works now, but, resolve still fail with DM_INVALID_ADJUDICATION_STATE error

* exclude files from jest test coverage

* skip challenge test as its now failing with CLK_TOO_MANY_TRANSITIONS

* add alchemy archive node

* run more tests

* fix depcheck error - ethers missing

* grant veto power to test user to do veto test - unable to grant veto power

* Changed Routing, New Proposal testing in progress

* Added govern package with yarn link. Corrected variable name

* Updated data to session storage

* Working test proposal creation

* integration functions

* handle creating new token

* fix: extra line removed

* correcting gradient in progressbar

* essencial integration complete

* custom paper component

* circular progress component

* adding comments

* integrate Create Dao UI with govern package

* trying to add missing sessionStorage

* adding aragon voice url

* disable create new dao button when no wallet connected

* adding validation to create dao

Co-authored-by: Bhanu Sanghi <bhanu@jiny.io>
Co-authored-by: bhanusanghi <bhanussanghi@gmail.com>
Co-authored-by: Yuet Loo Wong <contact@yuetloo.com>
Co-authored-by: Vamsi Reddy <vamsireddy9672@gmail.com>
Co-authored-by: cbrzn <cesarbrazon10@gmail.com>
Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>
Co-authored-by: c0rv0s <inathan.m@gmail.com>

* fix test failure with big numbers (#343)

* add hardhat task to set ens address (#342)

* add hardhat task to set ens address

* add instruction on how to run the task

* Feature/dao 167 add links to aragon voice and proxy (#341)

* adding proxy url

* fixing feature/dao-189-validate-create-form

* big fix with validation

* remove un necesary array push

* Input Field fixes and uppercase added to input field

Co-authored-by: Vamsi <vamsireddy9672@gmail.com>

* Feature/dao 135 dao configuration UI (#344)

* dao setting UI, config population in progress

* Input Field fix and Dao Setting page fix

* feature/dao-165-implement-frontend

* input field width correction

Co-authored-by: Vamsi <vamsireddy9672@gmail.com>

* fix dao settings (#345)

* New Proposal Page fixed and beautified (#346)

* executor needs to be set before the effect is being returned. (#347)

This will solve the ens name issue probably

* Hot fix/executor undefined (#348)

* executor needs to be set before the effect is being returned.

* executor was not persisting on state change

* registerToken in vocdoni (#349)

* create dao with happy path testing, no global config option yet

* add more test cases for createDao

* add configuration option for dao factory address

* renamed filename to follow convention

* [WIP] feat: vocdoni integration

* chore: trying to make register token test work

* [WIP] chore: use geth for token registration in vocdoni

* fix: typo on comment

* fix: typo on comment

* added vocdoni integration

* upgrade dvote libraries to 1.2.0

* temporary disable typescript strict checking to build with dvote libs

* fix hardhat config error

* remove unused dependency

* add EOF line

* check before register token, register token without verified position

Co-authored-by: cbrzn <cesarbrazon10@gmail.com>
Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* Feature/dao 158 dialog for handling transactions to be (#352)

* WIP - Working Transaction Keeper, enabled Storybook Relative Imports

* Added WIP changes, removed ref from search dao box

* Input field changed to work without refs

* Added a few changes, removed debuggers

* Removed yarn lock file

Co-authored-by: Vamsi <vamsireddy9672@gmail.com>

* Feature/move styled components (#353)

* WIP - Working Transaction Keeper, enabled Storybook Relative Imports

* Added WIP changes, removed ref from search dao box

* Input field changed to work without refs

* Added a few changes, removed debuggers

* Moved all styled components outside component declaration

* small bug fix

* Feature/dao 238 issue about createdao (#351)

* in progress

* set default config by dao-161-add-create-dao-to-go

* addressing problem 1 and 2

* add fixes

* add fixes

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* Feature/dao 215 integrate with blockchain (#350)

* setting ui integration with govern - inprogress

* setting ui handle decimals and input hex - inprogress

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* add vocdoni dvote

* Feature/transaction queue (#357)

* refactoring createDao

* merging input field refactoring changes into this branch for unified PR

* refactoring DaoSetting

* searchDaoName and if conditions changed to make it short

* review dao seting in progress

* refactoring the whole codebase

* add setvalues for react-form-hook

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: Vamsi <vamsireddy9672@gmail.com>

* Added changes for making grid responsive (#355)

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* DAO-194 - Added Dao not found page (#356)

* Added page for no dao found. Added a numerous fixes for making header and footer positions workable

* Bug Fix

* Feature/dao search (#358)

* Added page for no dao found. Added a numerous fixes for making header and footer positions workable

* Bug Fix

* Corrected regex bug

* Feature/dao search (#361)

* Added page for no dao found. Added a numerous fixes for making header and footer positions workable

* Bug Fix

* Corrected regex bug

* Fixes for footer placement

* Feature/new additions (#362)

* set value fixed for forms

* typescript amendments

* adding fixes for the refactor (#363)

* fix govern test failures (#360)

* fix test failures

* review comment: use utils.isAddress for consistency

* packages update

* fix error missing TransactionResponse

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* Feature/dao 248 script for mainnet ens setup (#359)

* ens setup scripts

* ens label description update

* simplify getEthRegistrar

* update favicon and header logo (#364)

* add human readable amount message for approvals (#365)

* fix id to lower case for daos (#369)

* fix id to lower case for daos

* daoname changed to lowercase inside the new Dao constructor

* Feature/fallback provider (#367)

* Added fallback provider, Changed name to augmneted wallet

* removed debugs

* Moved infura id to constants

* Add from validation (#366)

* refactoring create dao and adding validations

* adding minimum validation to daoSettings

* isAdress validation

* fix typo

* feature/dao-255-validation-type-number

* add contract validation

* temporary show success for repeating token register

* clean up validation

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* add missing favicon files (#370)

* Feature/dao 252 add link to dao settings (#368)

* add link to dao settings

* minor text formatting changes

* Feature/dao 190 etherscan fetch for new action page (#371)

* fetch abi from etherscan

* add ens support for fetch abi, add form validation

* pass fetch function to render fetch button

* move fetch logic to new action dialog

* handle token already registered (#372)

* handle token already registered

* convert rules and proof human readable in a proposal

* remove unnecessary caption

* correcting DAO not found page (#373)

* decode proposal action data (#374)

* Feature/dao 263 dao ready banner (#375)

* fix multiple current config loads

* set DAO ready banner

* feature/dao-269-weird-footer-logo

* fix sizes

* Feature/widget proposals (#376)

* fetch abi from etherscan

* add ens support for fetch abi, add form validation

* pass fetch function to render fetch button

* move fetch logic to new action dialog

* add proposal widgets into components

* return empty from widget components

* Added styling

* Corrected Date Value. Multiplying qith 1000 to convert seconds to milliseconds

* Added a function getFormatter value to either get back a string or a link if it a valid IPFS link

* Added Field Component

* add ipfs check

* ipfs check

* add createdAt order on daos

* fix action data misalign

Co-authored-by: Yuet Loo Wong <contact@yuetloo.com>
Co-authored-by: Bhanu Sanghi <bhanussanghi@gmail.com>

* returns true if contract address is valid (#377)

* fix states and colors (#379)

* Feat/toast messages (#378)

* Toast Messages and wallet connection fix

* Enque Toasts, Apply validations on dao search, Searhcable Actions, New proposal Page validations shown through toast.

* toast messages added

* challenge reason check

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* add validation to newProposal (#380)

* add validation to newProposal

* clean up

* missing dependency fix (#383)

* missing dependency fix

* removing extra messages

* return undefined account if fallback provider is used

* Css fixes (#385)

* added css fixes and transaction modal end state

* force refresh of proposal page (#382)

* Feature/dao 264 execution scheduling modal (#381)

* improve schedule proposal flow and redirect to proposal details page

* increase execution time to avoid bad delay error when scheduling new proposals

* cleanup warning messages

* extract message from user cancelling transaction

* added redirect option to transaction modal

* added missing dependency

* use onCompleteAllTransactions() to do redirect for proposal scheduling

* fix EOF error

* added transaction failure reason

* remove unused references

* revert back to 30 second latency

* Feature/prettier fix (#384)

* change prettier config and husky

* fix govern symlink

* update eslint disable

* turn off eslint react scope and unescaped

* clean up all warnings

* feature/dao-296-storybook-building-error

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>

* do not show transaction modal if there's error (#386)

* fix eslint error (#390)

* fix css styling with proposal actions (#389)

* Feature/dao 278 transaction modal improvements (#388)

* added more details to error dialog and prevent modal closing clicking on backdrop

* align transaction items by length

* Feature/ipfs handling (#391)

* ipfs upload

* ipfsinput modification

* clean up warnings

* api hooks separately

* clear AN button wanings

* new changes

* use conventional naming

* update execution delay

* button types

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>

* Feature/dao 290 display network status (#387)

* network name, 2x image, challenge card in progress

* remove challenge card component

* prevent app break if subgraph is down

* consider no subgraph in prposal detail and doa detail page

* clean up

* change node versions in workflows

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* Feature/dao 290 display network status (#392)

* network name, 2x image, challenge card in progress

* remove challenge card component

* prevent app break if subgraph is down

* consider no subgraph in prposal detail and doa detail page

* clean up

* change node versions in workflows

* update node version

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>

* fix govern test failures (#393)

* Feature/new changes (#394)

* remove loading state from query

* transaction modal optional functions

* add ids in query

* better way for pagination

* remove console logs

* remove search input (#397)

* build container right before calling proposal.schedule() (#400)

* Feature/refactoring 1 (#399)

* redesign get token info functionality

* redesign get token info functionality

* fix loading query hook

* fix mustache tag issue

* add sample code to get title from ipfs

* fix token retrivals + ipfs metadata handler

* subgraph changes + ipfs + refactoring

* fix errors

* proof and rules separate loading

* fix formatunits

* dao query hook fixed

* dao settings validations for amounts

* add amount positive validations on dao settings

* add buffer concat for ipfs content

* flex-start for proposal card content

Co-authored-by: Yuet Loo Wong <contact@yuetloo.com>

* Testing aragon UI 2 (#401)

* install aragon ui v2

* add aragon ui to home page

* Create Dao Flow UI Implemtation

* feature/dao-328-implement-frontend

* cleanup and adding types

* fix typo

* Feature/dao 297 add polling in proposal detail (#402)

* add polling to proposal query

* prevent re-rendering

* fix error: fewer hooks than expected

* console environment (#404)

* console environment

* moved DAO config from constant to environment

* remove obsolete code

* connect to provider based on chainId

* Feature/dao 391 proposal resolution (#403)

* fix typo

* render  approved as string

* Feature/dao 394 implement functionalities (#406)

* update contract address in  govern

* set contract address in tests

* start implement functionalities

* add newGovern abi

* restructure create dao flow

* new changes per design and validations

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>

* add ipfs link to decoded action data (#405)

* add ipfs link to decoded action data

* fix initial ipfs loading state

* concat buffers for ipfs data

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* Feature/dao 400 update dao setting page (#407)

* merge with develop

* update setting UI

* Update Setting

* add new ui components to create dao flow

* replace ui component

* search fix

* update footer

* clean up

* SUBGRAPH: update ipfs cat fetching

* fix title text (#408)

* add daofactory in environments

* rename create dao

* Fix/create dao (#410)

* fix create dao small issues

* fix ipfs placeholder

* Feature/dao 399 new execution flow (#409)

* wip: new execution page

* refactor, add delete/move up/down buttons

* temporary commit with button update and action list move and remove functions

* use react-hook-form to manage action list

* rename proposals to executions

* enable css prop in react element

* add stepper component

* disable warning of unused variable if variable name starts with underscore

* add withdraw, mint and custom execution flow

* make first part of address show 4 bytes, excluding 0x

* refactor

* add required validation rule

* remove obsolete code

* handle encoding error

* cleanup and bug fix

* support small layout

* validate address field

* small layout for action list buttons

* fix issue with missing input field name

* update aragon ui

* remove contract selector form

* fix error passing number instead of string for the columns property to Grid

* Feature/contract changes (#396)

* schedule acl list

* fix schedule list when length 0

* add merkle root in govern create

* schedule list fixed + test cases

* govern base factory better tests

* collaterals -- custom schedule/challenge tokens

* fix collaterals for govern create

* remove abi from gitignore

* Govern Executor: add deposit

* EOF + uncomment ens

* remove eth deposited test

* Feature/minter event (#412)

* add minter in registry event

* fix govern-core tests

* fix createdao path

* add withdraw (#413)

* add withdraw

* fix withdraw

* Feature/dao 401 deposit asset action flow (#414)

* wip: new execution page

* refactor, add delete/move up/down buttons

* temporary commit with button update and action list move and remove functions

* use react-hook-form to manage action list

* rename proposals to executions

* enable css prop in react element

* add stepper component

* disable warning of unused variable if variable name starts with underscore

* add withdraw, mint and custom execution flow

* make first part of address show 4 bytes, excluding 0x

* refactor

* add required validation rule

* remove obsolete code

* handle encoding error

* cleanup and bug fix

* support small layout

* validate address field

* small layout for action list buttons

* deposit form initial version

* format signature according to design

* add deposit transaction processing status dialog, bug fixes, refactoring

* cleanup obsolete code

* add minter to dao query

* use GovernMinter's mint function

* set mint context to 0x

* Feature/dao 420 implement fileinput in console (#411)

* implement fileInput

* clean up

* correct folder name typo

* quick work arround for react form

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* small fixes (#415)

* small fixes

* uncomment tests

* Feature/fixes (#417)

* new bug fixes

* add no-cache

* remove queries cache-only

* Feature/ara 828 create dao issue with file component (#419)

* dont show text file as ipfs file

* fix bugs

* update ProposalCard

* fixing fileInput design bad in small size

* clean up warnings

* add custom line height

* add elipsis to propsal card

* Weird text sizing

* subgraph fixed

* add cursor to ProposalCard

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>

* Console deposit + withdrawal (#418)

* integrate with Govern Executor deposit function

* integrate govern withdrawal

* remove unused variables

* subgraph fixed

* handle long function name and argument list

* add value field to payable actions

* withdraw freeze when public

* typo

* bring back failuremap

* remove nonce from proposaldetails

* fix typescript error

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* Feature/dao 418 create help component for console (#420)

* starting help component

* adding image

* add helpComponent to CreateDao and Setting

* subgraph fixed

* address list correction

* correct parttern for pages

* show correct view on progress

Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>

* Feature/console deposit (#421)

* integrate with Govern Executor deposit function

* integrate govern withdrawal

* remove unused variables

* subgraph fixed

* handle long function name and argument list

* add value field to payable actions

* withdraw freeze when public

* typo

* bring back failuremap

* remove nonce from proposaldetails

* fix typescript error

* clean up duplicate getToken()

Co-authored-by: yuetloo <contact@yuetloo.com>

* Feature/dao 419 mobile menu (#423)

* fix header for mobile

* clean up

* Show abi input only if contract is not verified. (#422)

* fix warning

* display abi field only if contract is not verified

* show abi field if contract not verified

* change header icon (#424)

* change icon

* move svg icons to the svgs subfolder

* update icon (#425)

* DAO-35: use aragon ui toast (#426)

* replace snackbar with toast

* replace ANButton with aragon ui Button

* Bug fixing - DAO-32 (#427)

* register token cycle correction

* remove variant from toast

* setting file upload bug fix

* fix existing token in create dao bug

* console log clean up

* fix transaction keeper bug

* parcial update transaction dialog ui

* add text rule check

* add getRule function

* update texts

* change logo

* addressing comments

* add beta label to header title (#428)

* Feature/ipfs loader (#429)

* subgraph fixed

* ipfs loader for dao settings ruls

* Feature/challenge bug (#430)

* subgraph fixed

* fix challenge bug if token addresses are the same

* Minor Govern ui fixes DAO-40 (#432)

* createDao button - only show icon in small view

* change create dao button icon

* transaction  dialog bug fix

* move progress to the top

* update beta label

* correct titles

* Clean up

* refinement

* fix contentswitcher in ipfs

* resolve-button (#431)

* resolve-button

* ipfs gateway link fixed

* fix proposal card hash

* DAO-52 remove story book (#434)

* remove story book from ci job

* remove story book

* implement file size validation (#435)

* remove memo from execute widget (#436)

* Enable analytics on govern DAO-38 (#433)

* implement analytic

* remove warnings and errors

* Feature/dao 55 (#437)

* contract updates

* update workflow

* change .env keys

* fix factory tests

* new deployments (#438)

* Wallet fix (#439)

* fix wallet address undefined bug

* clean up

* DAO-63 fix tests (#440)

* add missing await

* fix test cases

* check contract address

* temporary exclude hardhat tests using forking as it's broken due to EIP1559 transactions

* fix test failures thrown in hardhat getContractAt and getContractFactory

* skip ens test

* prevent hardhat from estimating gas on getContractAt and getContractFactory

* update resolver for staging

* Feature/dao 66 (#441)

* dao identifer already exists

* adding window.scroll

* add connect wallet warning on review dao

* implement scroll to id

* import without relative path

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>

* Text copy DAO-64 (#442)

* Landing page

* copy fix

* addressing review comments

* revert token decimal message

Co-authored-by: yuetloo <contact@yuetloo.com>

* update dependencies (#443)

* fix typo and uppercase

* implement analytics event DAO-98 (#445)

* implement analytic events

* add nav bar event

* in progress

* add wallet disconnected event

* use user account

* implement disconnect

* clean up

* return excecutor from govern.js

* return error message

* correct naming convention

* address comment

* DAO-64 addressing comments  (#444)

* address comment, show title in collateral, remove useEffect in useForm

* Feature/fix createdao bug (#447)

* feature/fix-createdao-bug

* cancel previouse subscriptions

* address concern about change in registery address

* only create new contract instance if registery address changed

* correct typo

* refactor govern register event

* refactor govern registered event

* clean up

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>

* update govern bug with subgraphs (#448)

* fix subgraph

* fix subgraph error

* update govern executor with subgraphs

* update contracts + Subgraph

* Bug / DAO-105 (#449)

* update aragon ui and clear warnings

* update aragon ui to fix contentSwitcher warning

* back button integrated (#451)

* DAO-77 - changing main agreement copy, helper text, and adding ReactNode and rows as optional props on IPFSInput (#450)

* DAO-165 - adding aragon link to footer (#452)

* add govern deployments

* fix eslint

* update resolver for mainnet

* DAO-166: changing help texts and re-organising the component (#453)

* update contract addresses

* Fixing proposal title format for longer titles (#455)

* Fixing DAOCard title ellipsis (#456)

* Feature/govern deployments (#454)

* add govern deployments

* fix eslint

* update resolver for mainnet

* update contract addresses

* fleek update

* adding helpscout (#458)

* Feature / DAO-171 (#459)

* implement new dropDown component in createDao

* Feature DAO-170 (#460)

* UI fixes

* change court to Aragon Court

* Feature / DAO-127 (#461)

* migrate analytics to rudderstack

* bug fix

* correct analytic variable and add key to ci-cd

* Feature / DAO-199 (#463)

* create footer area

* implement network switcher

* use correct loading for delay picker

* adding header to dropdown

* use GU

* use chainId instead of networkName

* [govern-console] improve cicd (#466)

* [govern-console] improve cicd

* [govern-console] adds REACT_APP_ENVIRONMENT to pipeline

* adding govern queue address to settings (#468)

* Bug / DAO-206  (#470)

* fixing uncontrolled input bug DAO-206

* changed handlegetvalues func based on review response

Co-authored-by: Sepehr Sanaei

* Feature / DAO-130 (#467)

* implement elastic apm

* update cicd

* move augmentWallet to provider

* update APM implementation

* path correction

* finish up

* implement on route changes

* addressing comments

* seperate update context

* reduce numbe of context update runs

* [cicd] fixes apm sourcemaps bundle_filepath (#471)

* [cicd] fixes bundle_filepath again (#472)

* [cicd] final fix for sourcemap upload (#473)

* [cicd] final fix for sourcemap upload and mapping (#475)

* Bug / DAO-232 Fixed

* updating dvote-js (#480)

* updating dvote-js

* build fix

* remove json.fromBytes() which can cause subgraph to fail to sync (#482)

This fix will require govern console to parse the title from hex.
The problem is json.fromBytes() throws and causes subgraph to fail to sync. I tried json.try_fromBytes() and still the same situation.

* Bug/transaction title (#484)

* fix transactions title hexString bug
* remove line 44 to 52 from deploy bash file

* DAO-368: test PR to trigger govern ci job (#485)

* update readme

* use network-concurrency 1 to workaround govern build error (#486)

* update readme to trigger govern ci job (#487)

* temporary revert dvote.js changes (#488)

* DAO-377 govern console ci trigger (#489)

* trigger govern-console ci job on changes to govern.js package

* subgraph new features (#479)

* feature/ DAO-366  (#483)

* add 404 page

* add material components removed from 404 page

* remove unnecessary css

* fix misspellings

* Refactoring finance (#493)

* setup nested routing

* Feature / DAO-284 (#474)

* refactored settins page

* refactored settins page

* fixed execution delay input sizes

* Added padding to button and modified spacing

* added page and component stubs

* finance side card ui

* Feature / DAO-286 (#477)

* added basic daoSideCard

* modified sidecard, added actionlinks

* Added basic calls for actions

* added help component on for settings page

* refactored settins page

* refactored settins page

* fixed execution delay input sizes

* wired up settings page to routes

* implemented code splitting

* Clean up homepage

* Cleaned up home page

* minor fixes

* minor fixes to DaoHomePage

* minor fixes and use of props in styled components

* Removed open actions from card

* add finance page header

* transaction card added

* add modal structure

* SelectToken modal added

* partial balance calculation

* add transfer modal

* added more info on balance and moved subgraph call to main finance page

* new Transfer modal added

* sign deposit modal added

* remove layout state from finance page

* Feature/dao-action-page DAO-283  (#478)

* added basic daoSideCard

* modified sidecard, added actionlinks

* Action Header added

* searchbox and dropdown menu added to action page

* Action card added

* Added basic calls for actions

* added help component on for settings page

* add load more button

* actions list logic added & actions filter added

* search login implemented

* Human readable date format added & load more button logic added

* fix action cards title overlaping

* fix single action card bugs & add no action available message

* fix prettier error for setting route

* change filter function & add no-available function & change limit to 100

* add rejected status to dropdown menu and use same array for selected and dropdown menu

* fix conflicts

* modified query and added token mapping in finance

* removed placeholder data to prepare for merge

* integrated finance page into nested routing

* added defaults so finance card doesn't show loading

* fix search box margin bug

* refactor new execution and action detail page

* fix show amount bug and add sorting

* add finance modal temporary logic

* cleaned up asset preparation

* finalized card and data fetching

* add Review transfer modal

* resolved merge conflicts

* renamed properties and fixed multiple calls to image

* responsive improvement and replace zero address with ETH

* fixed centered title on sidecard

* add check wallet connection for openning new transfer modal

* added content switcher

* add deposit new structure

* add select token structure

* add review deposit daoName and form data

* added basic selectToken form

* wrapped transfer in provider

* added dropdown

* Finish ReviewDeposit Data view

* removed custom error for dropdown

* added basic step structure and deposit flow

* add successful and failed sign message

* Complete successful and failed sign modal

* fix transaction list bug

* add try/catch to ipfs.tsx for preventing fetch error

* remove beta badge on mobile and add 16px padding to container

* added new token logic

* added padding to main page

* temporarily add eth

* change mobile modal width to 100%

* fix failed sign deposit try again functionality

* fixed crashing when closing modal

* added hardcoded icons

* added hypen

* Feature / DAO-335 (#481)

* added new fallback icon and portrait mode styling

* final changes

* cleaned up useEffect

* removed createdAt field from finance subgraph call

* fixed issue with resize event listener not being removed

* finalized deposit flow

* Feature/withdraw (#490)

* withdraw logic added & content switcher added

* fix actions title hexstring bug

* add screens to new transfer

* finish withdraw process

* modified sign modal to show different transfer type messages

* fix warnings and add close action for deposit

* renamed files and small fixes

* Removed done TODOs

* added check for sucessful deposit on retry

* added skeleton loading

* minor fix to grid

* switch deposit and withdraw order in new transfer

* added USDValue to formvalues

* added USDValue default value

* updated icons to match new araon ui versions

* updated settings page copy

* feature/ DAO-285  (#491)

* added page and component stubs

* finance side card ui

* add finance page header

* transaction card added

* add modal structure

* SelectToken modal added

* partial balance calculation

* add transfer modal

* added more info on balance and moved subgraph call to main finance page

* new Transfer modal added

* sign deposit modal added

* remove layout state from finance page

* modified query and added token mapping in finance

* removed placeholder data to prepare for merge

* integrated finance page into nested routing

* added defaults so finance card doesn't show loading

* fix search box margin bug

* refactor new execution and action detail page

* fix show amount bug and add sorting

* add finance modal temporary logic

* cleaned up asset preparation

* finalized card and data fetching

* add Review transfer modal

* resolved merge conflicts

* renamed properties and fixed multiple calls to image

* responsive improvement and replace zero address with ETH

* fixed centered title on sidecard

* add check wallet connection for openning new transfer modal

* added content switcher

* add deposit new structure

* add select token structure

* add review deposit daoName and form data

* added basic selectToken form

* wrapped transfer in provider

* added dropdown

* Finish ReviewDeposit Data view

* removed custom error for dropdown

* added basic step structure and deposit flow

* add successful and failed sign message

* Complete successful and failed sign modal

* fix transaction list bug

* add try/catch to ipfs.tsx for preventing fetch error

* remove beta badge on mobile and add 16px padding to container

* added new token logic

* added padding to main page

* temporarily add eth

* change mobile modal width to 100%

* fix failed sign deposit try again functionality

* fixed crashing when closing modal

* added hardcoded icons

* added hypen

* Feature / DAO-335 (#481)

* added new fallback icon and portrait mode styling

* final changes

* cleaned up useEffect

* removed createdAt field from finance subgraph call

* fixed issue with resize event listener not being removed

* finalized deposit flow

* Feature/withdraw (#490)

* withdraw logic added & content switcher added

* fix actions title hexstring bug

* add screens to new transfer

* finish withdraw process

* modified sign modal to show different transfer type messages

* fix warnings and add close action for deposit

* renamed files and small fixes

* Removed done TODOs

* added check for sucessful deposit on retry

* added skeleton loading

* minor fix to grid

* switch deposit and withdraw order in new transfer

* added USDValue to formvalues

* added USDValue default value

* console.log & comments removed

* URL Constants Declared

* Url comment added to finance file

* change LogoAddresses to TokenAddresses

* add contants urls

* typo fixed

Co-authored-by: Fabrice Francois <fabricevladimir@gmail.com>

* updated more icons

* minor fixes

* deposit fix to include proper token address

* set original deposit and withdraw to be deprecated

* moved token selection logic

* removed modal closable status once transfer is pending confirmation

* actions filter bug fixed

* fix reference text overflow

* change successful withdraw modal button text from view proposal to view scheduled action

* add reference as transaction title on finance tab

* fix action page dropdown filter

* fixed token logo not being pulled in

* fix yarn lock bug

* added ETH main balance

* change proposal details page label and add useProposalListQuery hook

* fixed main balance not loading

* more balance fixes

* fixed number of assets shown

* Feature / DAO-325  (#492)

* basic header

* added menu icon from aragon ui

* removed comments

* merge fixes

* removed log

Co-authored-by: Fabrice Francois <fabricevladimir@gmail.com>
Co-authored-by: Sepehr sanaee <sepehr_sanaee78@yahoo.com>
Co-authored-by: sepehr <sepehr2mail@gmail.com>
Co-authored-by: Sepehr Sanaei <46657145+sepehr2github@users.noreply.github.com>

* Rebasing with master to get branches hopefully aligned and up to date (#495)

* finishing aligning master and dev branches

* re-adding not found page

* add no-cache policy to refetch

Co-authored-by: sepehr <sepehr2mail@gmail.com>

* Subgraph error (#498)

* Bug / Wrong proposal execution time (#501)

* fixed bug about executation time

* added local value

* Bug/ DAO-445  (#504)

* remove amount validation on withdraw

* remove balance validation on withdraw

* Add transfer direction function to the review transaction tab

* add true returning value

* added comma check for value validation (#506)

* new Transaction Container Dropdown (#503)

* adds dedicated ActionInput components

* adds optional param to useLazyProposalQuery to stop pulling

* improves getProposalParams to handle actions properly

* use ActionInputContainer only on veto action

* change action card date from createdAt to payload.executionTime (#508)

* remove encoding address in NewExecution.tsx (#511)

* to trigget deployment (#521)

* update to block 9063490 (#522)

* fixes adding dao to the registry which causes a heap error (#523)

* changing placeholder (#524)

* Changed the DAI address to the official Rinkeby Compound DAI address (#529)

This address does have liquidity on Rinkeby Uniswap unlike the former one

* Fixed DAO Creation issues (#535)

Updated `TS` version
Updated `ethers` library version
Removed `dvote-js` library, instead use `client` and `census` packages
Modified source code for `dvote-js` calls (breaking changes applied)

* reverting develop changes (#536)

* fix: sourcemap upload to apm (#531)

* fix: sourcemap upload to apm

* fix: for loop for sourcemap discovery

* fix: removes fleek container to fix sourcemap upload (#537)

* Fixed DAO Creation (#538)

Updated TS version
Updated ethers library version
Removed dvote-js library, instead use client package and add custom logic
Modified source code for dvote-js calls (breaking changes applied)

* fix: switchout ipfs endpoint with ours (#541)

Co-authored-by: Giorgi-Lagidze <giorgi.lagidze@toptal.com>
Co-authored-by: Giorgi Lagidze <glagh14@freeuni.edu.ge>
Co-authored-by: Yuet Wong <contact@yuetloo.com>
Co-authored-by: Vamsi Reddy <vamsireddy9672@gmail.com>
Co-authored-by: Bhanu Sanghi <bhanu@jiny.io>
Co-authored-by: bhanusanghi <bhanussanghi@gmail.com>
Co-authored-by: Samuel Furter <nivida@users.noreply.github.com>
Co-authored-by: cbrzn <cesarbrazon10@gmail.com>
Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: c0rv0s <inathan.m@gmail.com>
Co-authored-by: Mathias Scherer <mathias@aragon.org>
Co-authored-by: Sepehr Sanaei <46657145+sepehr2github@users.noreply.github.com>
Co-authored-by: yuetloo <loo@aragon.org>
Co-authored-by: Fabrice Francois <fabricevladimir@gmail.com>
Co-authored-by: Sepehr sanaee <sepehr_sanaee78@yahoo.com>
Co-authored-by: sepehr <sepehr2mail@gmail.com>
Co-authored-by: Barukimang <barukimang@gmail.com>
Co-authored-by: Marc Velmer <marc1987@gmail.com>
  • Loading branch information
19 people authored Jul 4, 2022
1 parent fed88a6 commit b0e54e4
Show file tree
Hide file tree
Showing 14 changed files with 634 additions and 313 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/govern-console-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
fleekfile: 'console.rinkeby.staging.json'
environment_name: 'staging'
runs-on: ubuntu-latest
container: fleek/create-react-app:node-15
environment: ${{ matrix.environment }}
defaults:
run:
Expand Down Expand Up @@ -62,13 +61,19 @@ jobs:
env:
COMMIT_SHA: ${{ github.sha }}
run: |
for f in ./build/static/**/*.js.map ; do
curl -X POST https://apm-monitoring.aragon.org/assets/v1/sourcemaps -F service_name="govern" -F service_version="$COMMIT_SHA" -F bundle_filepath="http://localhost/static/js/$(basename $f)" -F sourcemap=@$f
for f in $(find ./build/static/js/ -name *.js.map) ; do
curl -X POST "https://kibana-sourcemaps.aragon.org/api/apm/sourcemaps" \
-H 'Content-Type: multipart/form-data' \
-H 'kbn-xsrf: true' \
-H 'Authorization: ApiKey ${{ secrets.APM_API_KEY }}' \
-F service_name="govern" \
-F service_version="$COMMIT_SHA" \
-F bundle_filepath="http://localhost/static/js/$(basename $f)" \
-F sourcemap=@$f
done
build-and-deploy-mainnet:
runs-on: ubuntu-latest
container: fleek/create-react-app:node-15
name: builds and deploys console on mainnet
if: github.ref == 'refs/heads/master'
environment: Mainnet
Expand Down Expand Up @@ -110,7 +115,13 @@ jobs:
env:
COMMIT_SHA: ${{ github.sha }}
run: |
for f in $(find ./build/ -name "*.js.map") ; do
export filename=${f%.*}
curl -X POST https://apm-monitoring.aragon.org/assets/v1/sourcemaps -F service_name="govern" -F service_version="$COMMIT_SHA" -F bundle_filepath="http://localhost/${filename#./build/}" -F sourcemap=@$f
for f in $(find ./build/static/js/ -name *.js.map) ; do
curl -X POST "https://kibana-sourcemaps.aragon.org/api/apm/sourcemaps" \
-H 'Content-Type: multipart/form-data' \
-H 'kbn-xsrf: true' \
-H 'Authorization: ApiKey ${{ secrets.APM_API_KEY }}' \
-F service_name="govern" \
-F service_version="$COMMIT_SHA" \
-F bundle_filepath="http://localhost/static/js/$(basename $f)" \
-F sourcemap=@$f
done
2 changes: 1 addition & 1 deletion packages/govern-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.23.1",
"eslint-plugin-react-hooks": "^4.2.0",
"ethers": "^5.4.1",
"ethers": "^5.5.0",
"graphql": "^15.5.0",
"immer": "^9.0.2",
"ipfs-core": "^0.6.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/govern-console/src/utils/ipfs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const MIME_TYPES = ['text/plain'];
function createIpfs() {
if (!ipfs) {
ipfs = create({
url: 'https://2a7143fae39e7adaeb57.b-cdn.net/api/v0',
url: 'https://ipfs-0.aragon.network/api/v0',
headers: {
authorization: 'v2 z7fAEdRSjqiH7Qv8ez2Qs6gypd5v3YH8cPGEE9MyESMVb',
'X-API-KEY': 'yRERPRwFAb5ZiV94XvJdgvDKoGEeFerfFsAQ65',
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/govern-subgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ Tracked:
- `Registered`
- `SetMetadata`

Left out: None.
Left out: None
2 changes: 1 addition & 1 deletion packages/govern-subgraph/manifest/data/rinkeby.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "GovernRegistry",
"address": "0xf46253ef29FaedAbf63AA8cA6c0A41CbbdC93948",
"startBlock": 9056830
"startBlock": 9063490
}
]
}
Expand Down
4 changes: 1 addition & 3 deletions packages/govern-subgraph/src/GovernRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ export function handleRegistered(event: RegisteredEvent): void {
dao.createdAt = event.block.timestamp

// add dao to the registry
let currentDAOs = registry.daos
currentDAOs.push(dao.id)
registry.daos = currentDAOs
registry.daos.push(dao.id)

registry.count += 1

Expand Down
11 changes: 5 additions & 6 deletions packages/govern/internal/actions/RegisterToken.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CensusErc20Api } from 'dvote-js'
import { CensusErc20Api } from './lib/Token'
import { getPool } from './lib/Gateway'
import { ContractReceipt, Wallet, Signer } from 'ethers'
import { ContractReceipt, Signer, Wallet } from 'ethers'

/**
*
Expand All @@ -13,7 +13,8 @@ export const isTokenRegistered = async (
tokenAddress: string
): Promise<boolean> => {
const pool = await getPool(signer.provider)
return await CensusErc20Api.isRegistered(tokenAddress, pool)
return CensusErc20Api.getTokenInfo(tokenAddress, pool)
.then(tokenInfo => tokenInfo.isRegistered)
}

/**
Expand All @@ -34,7 +35,5 @@ export const registerToken = async (
return 'ALREADY_REGISTERED'
}

const result = CensusErc20Api.registerTokenAuto(tokenAddress, signer, pool)

return result
return CensusErc20Api.registerTokenAuto(tokenAddress, signer, pool)
}
2 changes: 1 addition & 1 deletion packages/govern/internal/actions/lib/Gateway.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { providers } from 'ethers'
import { BRIGE_CONFIG } from '../../configuration/ConfigDefaults'
import { GatewayPool } from 'dvote-js'
import { GatewayPool } from '@vocdoni/client'

export async function getPool(
provider?: providers.Provider
Expand Down
57 changes: 57 additions & 0 deletions packages/govern/internal/actions/lib/Token.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { BigNumber } from "@ethersproject/bignumber"
import { ContractReceipt } from "@ethersproject/contracts"
import { Signer } from "@ethersproject/abstract-signer"
import { Wallet } from "@ethersproject/wallet"
import { GatewayPool } from '@vocdoni/client'
import { ERC20Proof } from "@vocdoni/storage-proofs-eth"

export namespace CensusErc20Api {
/** Finds the balance mapping position of the given ERC20 token address and attempts to register it on the blockchain */
export async function registerTokenAuto(tokenAddress: string, walletOrSigner: Wallet | Signer, gw: GatewayPool, customContractAddress?: string): Promise<ContractReceipt> {
const contractInstance = await gw.getTokenStorageProofInstance(walletOrSigner, customContractAddress)

const mapSlot = await CensusErc20Api.findBalanceMappingPosition(tokenAddress, await walletOrSigner.getAddress(), gw.provider)
if (mapSlot === null) throw new Error("The given token contract does not seem to have a defined mapping position for the holder balances")

const tx = await contractInstance.registerToken(tokenAddress, mapSlot)
// @ts-ignore
return tx.wait()
}

/** Associates the given balance mapping position to the given ERC20 token address */
export function registerToken(tokenAddress: string, balanceMappingPosition: number | BigNumber, walletOrSigner: Wallet | Signer, gw: GatewayPool, customContractAddress?: string) {
return gw.getTokenStorageProofInstance(walletOrSigner, customContractAddress)
.then((contractInstance) =>
contractInstance.registerToken(tokenAddress,
balanceMappingPosition
)
)
.then(tx => tx.wait())
}

export function getTokenInfo(tokenAddress: string, gw: GatewayPool, customContractAddress?: string): Promise<{ isRegistered: boolean, isVerified: boolean, balanceMappingPosition: number }> {
return gw.getTokenStorageProofInstance(null, customContractAddress)
.then((contractInstance) => contractInstance.tokens(tokenAddress))
.then((tokenDataTuple) => {
const balanceMappingPosition = BigNumber.isBigNumber(tokenDataTuple[2]) ?
tokenDataTuple[2].toNumber() : tokenDataTuple[2]

return {
isRegistered: tokenDataTuple[0],
isVerified: tokenDataTuple[1],
balanceMappingPosition
}
})
}

// Helpers

/**
* Attempts to find the index at which the holder balances are stored within the token contract.
* If the position cannot be found among the 50 first ones, `null` is returned.
*/
export function findBalanceMappingPosition(tokenAddress: string, holderAddress: string, provider) {
return ERC20Proof.findMapSlot(tokenAddress, holderAddress, provider)
}
}

4 changes: 3 additions & 1 deletion packages/govern/internal/configuration/ConfigDefaults.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IGatewayDiscoveryParameters } from 'dvote-js'
import { IGatewayDiscoveryParameters } from '@vocdoni/client'

type BrigeConfig = {
[key: string]: IGatewayDiscoveryParameters
Expand All @@ -14,10 +14,12 @@ export const BRIGE_CONFIG: BrigeConfig = {
networkId: 'rinkeby',
bootnodesContentUri: 'https://bootnodes.vocdoni.net/gateways.dev.json',
environment: 'dev',
numberOfGateways: 1
},
mainnet: {
networkId: 'mainnet',
bootnodesContentUri: 'https://bootnodes.vocdoni.net/gateways.json',
environment: 'prod',
numberOfGateways: 1
},
}
7 changes: 4 additions & 3 deletions packages/govern/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@
"rollup-plugin-node-resolve": "^5.2.0",
"ts-jest": "^26.4.2",
"tslint": "^6.1.3",
"typescript": "^4.0.5",
"typescript": "^4.4.3",
"uglify-es": "^3.3.9"
},
"dependencies": {
"@urql/core": "^1.13.1",
"dvote-js": "^1.9.14",
"ethers": "^5.4.1",
"@vocdoni/client": "^1.16.7",
"@vocdoni/storage-proofs-eth": "^0.4.1",
"ethers": "^5.5.0",
"graphql": "^15.4.0",
"graphql-tag": "^2.11.0",
"isomorphic-unfetch": "^3.1.0"
Expand Down
1 change: 1 addition & 0 deletions packages/govern/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"removeComments": true,
"strictPropertyInitialization": false,
"allowSyntheticDefaultImports": true,
"sourceRoot": "./",
"outDir": "./dist/cjs",
"strict": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/govern/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"module": "es6",
"target": "es2018",
"removeComments": true,
"allowSyntheticDefaultImports": true,
"strictPropertyInitialization": false,
"strict": false,
"outDir": "./dist/esm",
"strict": false,
"sourceRoot": "./",
"inlineSources": true,
"types": ["jest"],
Expand Down
Loading

0 comments on commit b0e54e4

Please sign in to comment.