-
Notifications
You must be signed in to change notification settings - Fork 28
Add Taco application to dashboard #625
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
Merged
Changes from all commits
Commits
Show all changes
122 commits
Select commit
Hold shift + click to select a range
4f04771
chore: Add .env to .gitignore and add example env
theref b5ce308
Add Dockerfile
theref eda47fa
Switch to debian image to avoid memory issues
theref 8c72e44
docs: Update local docker development instruction in README
theref 1e3bf52
Converts docker usage into docker compose and use a bind mount to ref…
KPrasch 9f10d90
automated linting
KPrasch 60448f3
chore: update readme from docker to docker-compose command
theref c270215
chore: update docker-compose command
theref 568f7ba
Update README.md
theref 15b8097
Add Dockerfile
theref 3bc1066
Switch to debian image to avoid memory issues
theref b4be54b
docs: Update local docker development instruction in README
theref 18471bd
Converts docker usage into docker compose and use a bind mount to ref…
KPrasch 0cc9dae
Update README with new package versions for local dev
theref 2dcefdb
Replace pre with taco on varioius pages
theref f56e6e7
Continue replacing PRE with TACo
theref 493cbdd
Update staking application authorization form
theref e6d1661
Apply wording change
theref 12161b8
Apply review wording change
theref a44ecb1
Update documentation urls
theref 8badd87
automated linting
KPrasch 439ef88
feat(store): add taco to operator info
theref 515b272
feat: Update labels and add TACo app mapping
theref 6fcd7b7
refactor: Rename variable TACoApp to tacoApp
theref 069d9e6
feat: Add support for authorizing Taco app
theref 2995f0c
feat: Add mapping of operator address to TACo app
theref 680036f
feat: Add Taco Application abi and goerli address
theref 68a0d6d
Add some todos and export the Taco contract const
theref 1b3c67d
Use the Taco Contract within MultiAppStaking
theref ca9ddf9
linting fixes, fix small typo.
KPrasch 7a78b8a
Use a static deployment artifact registry for TacoApplication.
KPrasch be06a85
Use nucypher-contracts package for TACo abi and address
theref fcdff8e
feat(utils): add taco mapping for address and app label after rebase
theref b2855ce
Update yarn.lock after adding @nucypher/nucypher-contracts dependency
cygnusv 6348951
Update src/components/Modal/MapOperatorToStakingProviderConfirmationM…
theref 24b8df1
chore: Add dashboard network to .env files
theref 8d1c6d7
style: fix typo in TACo node and TACo app names
theref daabbf5
fix(mas): update environment variable name
theref e6ed4cf
Add TACo app to testing
theref a2450c0
Bump version of @nucypher/nucypher-contracts
theref a2b47c9
Update docs links for TACo node setup and staking providers
theref 136dc4d
Remove reference to PRE in bonus eligibility
theref bf394cc
Remove remaining references to PRE
theref 3cd9e43
Fix bug with taco min auth amount
theref a1c544e
Update Operator-StakingProvider mapping function for TACo app contract
theref fef0f04
Upgrade node to 18 within the dockerfile
theref 261d017
Update nucypher-contracts version and add bondOperator to interface
theref d6aec7c
Fix Dockerfile after rebase
theref c8f6617
Update Dockerfile, nucypher-contracts version, and TACo domain to sup…
theref c4c9327
More sepolia Taco improvements
theref b4acb56
Include TACo in NewAppsToAuthorizeModal
theref 9205701
Add optional _minimumAuthorization for AuthorizationParameters
theref 029f4a1
chore: remove redundant image from docker-compose file
piotr-roslaniec dcdeb0b
Initial Taco commitment work
theref aa66a98
Fix file type
theref 531b663
Add basics of button and new card
theref 91f7b8b
Add table of choices to Commitment modal
theref 7acd519
Send commitment tx successfully!
theref 7b77303
Update images used for TACo increase/decrease authorizations.
derekpierre 544ef27
Update images used for showing Authorized Apps.
derekpierre 0cca3e4
Update StakingApp illustrations to include TACo instead of PRE.
derekpierre 65d795c
Update increase/decrease auth images text to use Inter.
derekpierre f67bb4c
Update yarn.lock.
derekpierre 6386dd8
Update TACo commitment modal wording
theref 992abfe
Catch isOperatorInPool error for TACo application
theref 4af591b
Add extra commitment options
theref 5fb7459
Pin react-icons to v4.4.0
cygnusv e7876f3
Clarify deauthorization cooldown periods
cygnusv fbb1ec2
Reorder app cards
cygnusv 93ed57b
add links to staking apps docs
piotr-roslaniec bce82c4
Remove trailing whitespace
cygnusv 8aa5445
Restore react-icons to ^4.3.1 in package.json
cygnusv 0a2b0af
Add extra card for Operator mapping
theref 05dab49
Define transactions for submitting Taco operator or TBTC+RB
theref 1a2b067
Submit correct info when bonding operator
theref 5861227
Display correct address in Operator mapping confirmation modal
theref 3a02f37
Use validateForm instead of onSubmit for multiple operator mappings
theref 3827e24
Refactor checkIfOperatorIsMappedToAnotherStakingProvider to use appName
theref f30f3e1
Use application array in MapOperatorToStakingProviderConfirmationModal
theref 3eda822
Fix isOperatorMappedToAnotherStakingProvider
theref 8911814
Await all form validations in one promise
theref abdeb7e
Update commitment lengths and bonuses
theref b18fa9f
feat: update cooldown period and related text dynamically
theref 0b73f9f
refactor: improve conditional rendering and code organization in Stak…
theref aa9ac93
Revert to using withFormik for operator mapping
theref 2621558
Attempt to pass innerRef around more
theref d4df82f
Fix submitMapping function for Operator Mapping modal
theref 3627ab6
Add StakingProvider to OperatorMappingConfirmation Modal
theref 29a2384
Update commitment modal wording
theref e68140b
Show current Authorized amount on TACo commitment modal
theref 018b336
Show commitment endDate in modal
theref 992c5b1
Improve error handling
theref 7c8ce9f
Update src/pages/Staking/HowItWorks/StakingApplications/index.tsx
theref 08afb29
Update src/pages/Staking/HowItWorks/StakingApplications/index.tsx
theref d8c6262
Update src/utils/__tests__/getStakingAppLabel.test.ts
theref e16016e
Update src/components/StakingTimeline/index.tsx
theref 9af8301
Update src/hooks/staking-applications/useRegisterMultipleOperatorsTra…
theref 1e87b55
Update src/hooks/staking-applications/useRegisterMultipleOperatorsTra…
theref f3421d2
refactor: remove redundant code in validateInputtedOperatorAddress
theref 2fc1aa1
fix: handle errors in isOperatorInPool method
theref cc8f779
refactor: remove console.log in getSupportedAppsEffect
theref 8e7cdbe
refactor: remove duuplicated SubmitStakeModal from MODAL_TYPES
theref ab10f35
refactor: remove unused SelectedApp type and selectedApps state
theref c9b7f6b
refactor: use formRef assignments in validity check of Operator mapping
theref dd1aeab
refactor: update mapping variables for different app names
theref 2328f32
refactor: improve conditional rendering using isEmptyOrZeroAddress
theref 180fb0d
Apply code review suggestion comparing tbtc and rb operator
theref 4a21f1b
Combine RandomBeacon and tBTC OperatorMapping forms
theref 917ac03
refactor: improve form validation logic for staking app authorization
theref c8cd164
Address UI improvements in TACo commitment modal
theref e2c8e4b
Move TBTC+RB alert inside conditional statement and improve condition
theref 769fa45
Reset validateInputtedOperatorAddress to match main
theref ef47fdb
Redo OperatorMapping logic to handle variety of apps
theref 4356900
Update src/components/Modal/MapOperatorToStakingProviderModal/index.tsx
theref a26ec0d
Update src/components/Modal/MapOperatorToStakingProviderModal/index.tsx
theref 0874145
Fix logical comparison for tbtc and rb
theref 6409c6c
Fix conditional rendering of tbtc and rb label
theref e1a53ca
Add success modal to TACo commitment
theref c62b5aa
Show TACo commitment button only if TACo isAuthorized
theref 69c9ad4
Refactor variable for assessing which apps have operator mapped
theref 46e0a12
Update src/components/Modal/MapOperatorToStakingProviderModal/index.tsx
theref a188adf
Update src/components/Modal/MapOperatorToStakingProviderModal/index.tsx
theref File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
REACT_APP_SUPPORTED_CHAIN_ID=1337 | ||
REACT_APP_MULTICALL_ADDRESS=0x086813525A7dC7dafFf015Cdf03896Fd276eab60 | ||
REACT_APP_TACO_DOMAIN=dashboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,5 @@ cypress/plugins | |
# Yarn | ||
node_modules/ | ||
yarn-error.log | ||
.env | ||
.cosine/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Use the specified image | ||
FROM node:18-buster-slim | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y python3 make g++ git openssh-client ca-certificates && \ | ||
git config --global url."https://".insteadOf git:// && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
apt-get clean | ||
|
||
# Set the environment variables | ||
ENV PYTHON=/usr/bin/python3 | ||
ENV NODE_OPTIONS=--max_old_space_size=3072 | ||
|
||
# Copy package files and install node modules | ||
COPY package*.json yarn.lock ./ | ||
RUN npm install -g node-gyp | ||
RUN yarn install --ignore-scripts | ||
RUN yarn upgrade @keep-network/coverage-pools@sepolia \ | ||
@keep-network/ecdsa@sepolia \ | ||
@keep-network/keep-core@sepolia \ | ||
@keep-network/keep-ecdsa@sepolia \ | ||
@keep-network/random-beacon@sepolia \ | ||
@keep-network/tbtc@sepolia \ | ||
@keep-network/tbtc-v2@sepolia \ | ||
@threshold-network/coverage-pools@npm:@keep-network/coverage-pools@sepolia \ | ||
@threshold-network/solidity-contracts@sepolia | ||
RUN yarn run postinstall | ||
|
||
# Expose port 3000 | ||
EXPOSE 3000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: "3.8" | ||
|
||
services: | ||
threshold-dashboard: | ||
container_name: threshold-dashboard | ||
working_dir: /app | ||
environment: | ||
- PYTHON=/usr/bin/python3 | ||
- NODE_OPTIONS=--max_old_space_size=3072 | ||
ports: | ||
- "3000:3000" | ||
volumes: | ||
- .:/app # Bind mount the current directory to /app in the container | ||
- /app/node_modules # This will prevent node_modules from being overwritten by the local volume | ||
command: bash -c "yarn format:fix && yarn start" | ||
theref marked this conversation as resolved.
Show resolved
Hide resolved
|
||
build: | ||
context: . | ||
dockerfile: Dockerfile.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,20 +119,24 @@ const InitiateDeauthorization: FC< | |
</FlowStep> | ||
<FlowStep | ||
preTitle="Step 2" | ||
title="45 day cooldown" | ||
title={ | ||
stakingAppName === "taco" ? "6 month cooldown" : "45 day cooldown" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: The cooldown is repeteadly used in several places in this file. We could extract the cooldown to a separate variable. Eg |
||
} | ||
status={FlowStepStatus.inactive} | ||
size="sm" | ||
> | ||
You must wait a 45 day cooldown to then confirm the deauthorization. | ||
This is 1 transaction. | ||
You must wait a {stakingAppName === "taco" ? "6 month" : "45 day"}{" "} | ||
cooldown to then confirm the deauthorization. This is 1 transaction. | ||
</FlowStep> | ||
</Stack> | ||
<Alert status="warning"> | ||
<AlertIcon /> | ||
Take note! In this 45 day cooldown period, you cannot increase or | ||
decrease your authorization. As a measure of security for the entire | ||
network, in the event of slashing you will be slashed based on your | ||
initial amount. | ||
Take note! In this {stakingAppName === "taco" | ||
? "6 month" | ||
: "45 day"}{" "} | ||
cooldown period, you cannot increase or decrease your authorization. | ||
As a measure of security for the entire network, in the event of | ||
slashing you will be slashed based on your initial amount. | ||
</Alert> | ||
</ModalBody> | ||
<ModalFooter> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.