-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial win support * win: process kill fixes * win: tendermint installation automated * helthchecker env vars to switch it off. small refactoring * service hash id updated * use bundled in tendermint.exe, not download it * lint fixes * feat: add staking deployment vars * feat: added pearl beta 2 address & section * chore: add pearl beta 2 address * chore: init * chore: comment env example * fix: isNil check for low balance * fix: serviceFundRequirements coalesce * refactor: order and map staking contracts * fix: required olas when both staked and not staked * feat: update StakingContractSection to support multi-contract * feat: updated STAKING_PROGRAM_META with deprecated and supported migration targets * fix: isAddress checks to protect against 0xm * feat: added pearl_beta_2 to StakingContractInfo record * feat: add pearl_beta_2 Beta2 enum * chore: comment availableRewards until it's used * feat: extend serviceStakingMechUsageContracts with pearl_beta_2, protect against -1 serviceId * fix: protect against -1 serviceId related errors * feat: add pearl_beta_2 requirement * bump: rc124 for test release * add staking contract update button in homepage * update contract UI * update * win release updates * add loading state * workflow cleanup * fix: default contract fallback, instead of "not staked" * fix: broken import (kebabCase import) * bump: rc125 * win build poetry version bump * fix: added minimum staking duration to migration condition * fix for windows tendermint bundle in * fix: disable hash update * fix: migration countdown, and minimum duration fix from staging * fix: typos * refactor: popover copy * fix: typo * fix for tendermint PATH env vars * feat: Disable the staking contract button if the balance is low. (#317) * feat: disable staking contract button if low balance * feat: update staking contract button popover message * feat: add useNeedsFunds hook * feat: integrate useNeedsFunds hook for disable staking contract * update logic * refactor: remove OLAS requirement from notification * fix: commented link to broken site * feat: Staking info per contract (#325) * refractor: tiny format document * feat: add InfoBreakdown component * feat: replace OlasBalanceSection with BalanceBreakdown * refactor: Update InfoBreakdown component and add InfoBreakdownList * feat: add more contract methods for staking info * move from different function inside the main one (Autonolas.ts) * feat: add types * refactor: Update StakingContractSection component and add StakingContractInfo * other changes * feat: minor * feat: address Josh review changes * feat: Add balance polling pause functionality to StakingContractSection (#330) * bump: rc126 * hotfix: undefined fixes in useStakingContractInfo hook for build 126 * refactor: simplify logic, remove New tag * chore: remove redundant "New" objects * fix: remove commented mistakenly commented code * feat: Update backup wallet alert copy (#341) * feat: Add backup wallet warning message * update text * refactor: cleanup staking program parse from contract * chore: update minimum staking duration comment * feat: add loader to staking contract info provider * refactor: return loader from hook, rework comments, add service staked check * refactor: match active staking program type meta with active staking program type * refactor: rewrite staking contract section to consolidate, clean-up business logic * chore: delete huge comment block (cantMigrateReason) * fix: migrate button display logic * fix: Release 0.1.0-rc126 issues (#342) * Refactor SetupWelcome component to handle account setup state correctly * feat: trigger IPC call on app load (with commented code) * feat: remove all comments from main.js * Update frontend/components/ManageStakingPage/StakingContractSection/index.tsx * Update frontend/components/ManageStakingPage/StakingContractSection/index.tsx * Update frontend/components/ManageStakingPage/StakingContractSection/index.tsx Co-authored-by: Mohan <[email protected]> * Update frontend/components/ManageStakingPage/StakingContractSection/index.tsx * chore: prettier fix * refactor: seperate CountdownUntilMigration * hotfix: update actions/upload-artifact to v4 * hotfix: update checkout and download-artifact actions to v4 * fix: add version prefix * bump: rc127 * refactor: numerous changes * chore: fix leftover `stakingProgram` references * chore: comment purpose * fix: migration and funding button validation * fix: migrate & funding button condition fixes * refactor: can't migrate reason copy * chore: leftover `stakingProgramId` refactor * fix: experienced bug where alpha showed during migration * fix: use Text component instead of span * fix: Badge "Active" status to be displayed only on active staking contract (#345) * fix StakingContractTag * fix * fix: reinstate #345 changes after overwrite due to merge conflicts * chore: better comment * Update frontend/components/ManageStakingPage/StakingContractSection/CountdownUntilMigration.tsx Co-authored-by: Mohan <[email protected]> * Update frontend/components/ManageStakingPage/StakingContractSection/CountdownUntilMigration.tsx --------- Co-authored-by: Yuri (solarw) Turchenkov <[email protected]> Co-authored-by: jmoreira-valory <[email protected]> Co-authored-by: truemiller <[email protected]> Co-authored-by: Josh Miller <[email protected]>
- Loading branch information
1 parent
e6128a4
commit 6e33a9a
Showing
67 changed files
with
2,181 additions
and
1,283 deletions.
There are no files selected for viewing
This file contains 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,5 +1,7 @@ | ||
FORK_URL= | ||
NODE_ENV= | ||
FORK_URL= | ||
DEV_RPC= | ||
|
||
# TODO: determine if these are needed | ||
STAKING_TEST_KEYS_PATH= | ||
IS_STAGING= |
This file contains 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 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 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 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,55 @@ | ||
name: Release for Windows | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
build-windows: | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Install and configure Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: '1.8.3' | ||
virtualenvs-create: true | ||
virtualenvs-in-project: false | ||
virtualenvs-path: ~/my-custom-path | ||
installer-parallel: true | ||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: install node deps | ||
run: yarn install-deps | ||
|
||
- name: set env vars to prod.env | ||
env: | ||
NODE_ENV: production | ||
DEV_RPC: https://rpc-gate.autonolas.tech/gnosis-rpc/ | ||
IS_STAGING: ${{ github.ref != 'refs/heads/main' && 'true' || 'false' }} | ||
FORK_URL: https://rpc-gate.autonolas.tech/gnosis-rpc/ | ||
GH_TOKEN: ${{ secrets.github_token}} | ||
run: | | ||
echo NODE_ENV=$NODE_ENV >> prod.env | ||
echo DEV_RPC=$DEV_RPC >> prod.env | ||
echo IS_STAGING=$IS_STAGING >> prod.env | ||
echo FORK_URL=$FORK_URL >> prod.env | ||
cat prod.env | ||
echo GH_TOKEN=$GH_TOKEN >> prod.env | ||
- run: rm -rf /dist | ||
- name: "Build, notarize, publish" | ||
run: make build |
This file contains 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,58 @@ | ||
|
||
define setup_env | ||
$(eval ENV_FILE := $(1).env) | ||
@echo " - setup env $(ENV_FILE)" | ||
$(eval include $(1).env) | ||
$(eval export) | ||
endef | ||
|
||
|
||
./trader/: | ||
pwd | ||
git clone https://github.com/valory-xyz/trader.git | ||
|
||
./dist/aea_win.exe: ./trader/ | ||
mkdir -p dist | ||
cd trader && poetry install && poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots --hidden-import grpc --hidden-import openapi_core --collect-all google.protobuf --collect-all openapi_core --collect-all openapi_spec_validator --collect-all asn1crypto --hidden-import py_ecc --hidden-import pytz --onefile pyinstaller/trader_bin.py --name trader_win | ||
cp -f trader/dist/trader_win.exe ./dist/aea_win.exe | ||
pwd | ||
|
||
|
||
./dist/tendermint_win.exe: ./operate/ | ||
pwd | ||
poetry install && poetry run pyinstaller operate/services/utils/tendermint.py --onefile --name tendermint_win | ||
|
||
|
||
./dist/pearl_win.exe: ./operate/ ./dist/aea_win.exe ./dist/tendermint_win.exe | ||
pwd | ||
poetry install && poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all coincurve --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots operate/pearl.py --add-binary dist/aea_win.exe:. --add-binary dist/tendermint_win.exe:. --onefile --name pearl_win | ||
|
||
|
||
./electron/bins/: | ||
mkdir -p ./electron/bins/ | ||
|
||
./electron/bins/tendermint.exe: ./electron/bins/ | ||
curl -L https://github.com/tendermint/tendermint/releases/download/v0.34.19/tendermint_0.34.19_windows_amd64.tar.gz -o tendermint.tar.gz | ||
tar -xvf tendermint.tar.gz tendermint.exe | ||
cp ./tendermint.exe ./electron/bins/tendermint.exe | ||
|
||
.PHONY: build | ||
build: ./dist/pearl_win.exe ./electron/bins/tendermint.exe | ||
$(call setup_env, prod) | ||
echo ${DEV_RPC} | ||
cp -f dist/pearl_win.exe ./electron/bins/pearl_win.exe | ||
echo ${NODE_ENV} | ||
NODE_ENV=${NODE_ENV} DEV_RPC=${DEV_RPC} FORK_URL=${FORK_URL} yarn build:frontend | ||
NODE_ENV=${NODE_ENV} DEV_RPC=${DEV_RPC} FORK_URL=${FORK_URL} GH_TOKEN=${GH_TOKEN} node build-win.js | ||
|
||
|
||
|
||
|
||
.PHONY: build-tenderly | ||
build-tenderly: ./dist/pearl_win.exe | ||
$(call setup_env, dev-tenderly) | ||
echo ${DEV_RPC} | ||
cp -f dist/pearl_win.exe ./electron/bins/pearl_win.exe | ||
echo ${NODE_ENV} | ||
NODE_ENV=${NODE_ENV} DEV_RPC=${DEV_RPC} FORK_URL=${FORK_URL} yarn build:frontend | ||
GH_TOKEN=${GH_TOKEN} node build-win-tenderly.js |
This file contains 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,38 @@ | ||
/** | ||
* This script is used to build the electron app **with notarization**. It is used for the final build and release process. | ||
*/ | ||
require('dotenv').config(); | ||
const build = require('electron-builder').build; | ||
|
||
const { publishOptions } = require('./electron/constants'); | ||
|
||
const main = async () => { | ||
console.log('Building...'); | ||
|
||
/** @type import {CliOptions} from "electron-builder" */ | ||
await build({ | ||
publish: 'onTag', | ||
config: { | ||
appId: 'xyz.valory.olas-operate-app', | ||
artifactName: '${productName}-${version}-${platform}-${arch}-tenderly.${ext}', | ||
productName: 'Pearl', | ||
files: ['electron/**/*', 'package.json'], | ||
directories: { | ||
output: 'dist', | ||
}, | ||
nsis: { | ||
oneClick: false, | ||
}, | ||
extraResources: [ | ||
{ | ||
from: 'electron/bins', | ||
to: 'bins', | ||
filter: ['**/*'], | ||
}, | ||
], | ||
|
||
}, | ||
}); | ||
}; | ||
|
||
main().then((response) => { console.log('Build & Notarize complete'); }).catch((e) => console.error(e)); |
This file contains 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,49 @@ | ||
/** | ||
* This script is used to build the electron app **with notarization**. It is used for the final build and release process. | ||
*/ | ||
require('dotenv').config(); | ||
const build = require('electron-builder').build; | ||
|
||
const { publishOptions } = require('./electron/constants'); | ||
|
||
|
||
function artifactName() { | ||
const env = process.env.NODE_ENV; | ||
const prefix = env === 'production' ? '' : 'dev-'; | ||
return prefix + '${productName}-${version}-${platform}-${arch}.${ext}'; | ||
} | ||
|
||
const main = async () => { | ||
console.log('Building...'); | ||
|
||
/** @type import {CliOptions} from "electron-builder" */ | ||
await build({ | ||
publish: 'onTag', | ||
config: { | ||
appId: 'xyz.valory.olas-operate-app', | ||
artifactName: artifactName(), | ||
productName: 'Pearl', | ||
files: ['electron/**/*', 'package.json'], | ||
directories: { | ||
output: 'dist', | ||
}, | ||
nsis: { | ||
oneClick: false, | ||
}, | ||
win: { | ||
publish: publishOptions, | ||
icon: 'electron/assets/icons/splash-robot-head-dock.png', | ||
}, | ||
extraResources: [ | ||
{ | ||
from: 'electron/bins', | ||
to: 'bins', | ||
filter: ['**/*'], | ||
}, | ||
], | ||
|
||
}, | ||
}); | ||
}; | ||
|
||
main().then((response) => { console.log('Build & Notarize complete'); }).catch((e) => console.error(e)); |
This file contains 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.