Skip to content

Commit

Permalink
Merge pull request #315 from TxnLab/dev
Browse files Browse the repository at this point in the history
v0.11.3
  • Loading branch information
pbennett authored Oct 20, 2024
2 parents 10991b3 + 8d74dfa commit 7bebc0b
Show file tree
Hide file tree
Showing 23 changed files with 3,603 additions and 11,045 deletions.
4 changes: 2 additions & 2 deletions contracts/bootstrap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap",
"version": "0.11.2",
"version": "0.11.3",
"description": "",
"main": "index.ts",
"scripts": {
Expand All @@ -11,7 +11,7 @@
},
"license": "MIT",
"dependencies": {
"@algorandfoundation/algokit-utils": "7.0.0-beta.14",
"@algorandfoundation/algokit-utils": "7.0.0-beta.16",
"algosdk": "2.9.0",
"prompts": "^2.4.2",
"yargs": "^17.7.2"
Expand Down
2 changes: 1 addition & 1 deletion contracts/contracts/artifacts/StakingPool.approval.teal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma version 11

// This TEAL was generated by TEALScript v0.103.0
// This TEAL was generated by TEALScript v0.103.2
// https://github.com/algorandfoundation/TEALScript

// This contract is compliant with and/or implements the following ARCs: [ ARC4 ]
Expand Down
2 changes: 1 addition & 1 deletion contracts/contracts/artifacts/StakingPool.arc32.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions contracts/contracts/artifacts/StakingPool.arc56_draft.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma version 11

// This TEAL was generated by TEALScript v0.103.0
// This TEAL was generated by TEALScript v0.103.2
// https://github.com/algorandfoundation/TEALScript

// This contract is compliant with and/or implements the following ARCs: [ ARC4 ]
Expand Down
2 changes: 1 addition & 1 deletion contracts/contracts/artifacts/ValidatorRegistry.arc32.json

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions contracts/contracts/artifacts/ValidatorRegistry.arc56_draft.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/contracts/clients/StakingPoolClient.ts

Large diffs are not rendered by default.

14,351 changes: 3,472 additions & 10,879 deletions contracts/contracts/clients/ValidatorRegistryClient.ts

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reti-contracts",
"version": "0.11.2",
"version": "0.11.3",
"license": "MIT",
"scripts": {
"generate-client": "pnpx @algorandfoundation/[email protected] generate -a contracts/artifacts/StakingPool.arc56_draft.json -o contracts/clients/StakingPoolClient.ts && pnpx @algorandfoundation/[email protected] generate -a contracts/artifacts/ValidatorRegistry.arc56_draft.json -o contracts/clients/ValidatorRegistryClient.ts && ./update_contract_artifacts.sh",
Expand All @@ -17,12 +17,12 @@
"prettier:fix": "npx prettier --write ."
},
"dependencies": {
"@algorandfoundation/algokit-utils": "7.0.0-beta.14",
"@algorandfoundation/algokit-utils": "7.0.0-beta.16",
"algosdk": "2.9.0"
},
"devDependencies": {
"@algorandfoundation/algokit-client-generator": "4.0.0-beta.5",
"@algorandfoundation/tealscript": "0.103.0",
"@algorandfoundation/tealscript": "0.103.2",
"@joe-p/algokit-generate-component": "0.2.1",
"@typescript-eslint/eslint-plugin": "8.8.1",
"@typescript-eslint/parser": "8.8.1",
Expand Down
2 changes: 1 addition & 1 deletion nodemgr/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (ac *RetiApp) initClients(ctx context.Context, cmd *cli.Command) error {
}

if ac.retiAppID == 0 {
return fmt.Errorf("the id of the Reti Validator contract must be set using either -id or RETI_APPID env var!")
return fmt.Errorf("the id of the Reti Validator contract must be set using either -retiid or RETI_APPID env var!")
}

// This will load and initialize mnemonics from the environment - and handles all 'local' signing for the app
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion nodemgr/validatorcmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func DefineValidator() error {
return err
}

config.PercentToValidator, err = getInt("Enter the payout percentage to the validator (in four decimals, ie: 5% = 50000)", 50000, 0, 1000000)
config.PercentToValidator, err = getInt("Enter the commission percentage to the validator (in four decimals, ie: 5% = 50000)", 50000, 0, 1000000)
if err != nil {
return err
}
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 33 additions & 53 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,50 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"extends": ["config:recommended", "schedule:weekly"],
"dependencyDashboard": true,
"configMigration": true,
"timezone": "America/New_York",
"assignees": ["pbennett"],
"baseBranches": ["dev"],
"separateMultipleMajor": true,
"separateMajorMinor": true,
"separateMinorPatch": false,
"minimumReleaseAge": "3 days",
"ignorePaths": ["ui/.copier-answers.yml"],
"lockFileMaintenance": {
"enabled": true,
"schedule": "before 4am on Tuesday"
},
"packageRules": [
{
"groupName": "non-major dependencies",
"matchDepTypes": ["dependencies", "devDependencies"],
"matchUpdateTypes": ["patch", "minor"],
"matchPackageNames": ["!vitest", "!@vitest/**"]
},
{
"groupName": "Node Manager",
"matchFileNames": ["nodemgr/go.mod", "Dockerfile-nodemgr"],
"semanticCommitScope": "nodemgr"
},
{
"groupName": "UI",
"matchFileNames": ["ui/package.json"],
"matchDepTypes": ["dependencies", "devDependencies"],
"matchPackageNames": ["!vitest", "!@vitest/**"],
"assignees": ["drichar"],
"semanticCommitScope": "ui",
"rangeStrategy": "pin"
},
{
"groupName": "Vitest",
"matchPackageNames": ["vitest", "@vitest/**"]
},
{
"matchCategories": ["node"],
"enabled": false
},
{
"matchFileNames": ["nodemgr/go.mod", "Dockerfile-nodemgr"],
"groupName": "Node Manager",
"semanticCommitScope": "nodemgr",
"schedule": "before 4am on Monday"
"matchDepTypes": ["optionalDependencies", "peerDependencies", "engines"],
"enabled": false
}
],
"npm": {
"additionalBranchPrefix": "{{{parentDir}}}-",
"minimumReleaseAge": "3 days",
"lockFileMaintenance": {
"enabled": true,
"schedule": "on the 1st day of the month",
"semanticCommitScope": "deps",
"additionalBranchPrefix": ""
},
"packageRules": [
{
"matchDepTypes": ["dependencies", "devDependencies"],
"matchUpdateTypes": ["patch", "minor"],
"groupName": "non-major dependencies"
},
{
"matchDepTypes": ["devDependencies"],
"groupName": "ESLint/Prettier",
"matchPackageNames": ["/lint/", "/prettier/"]
},
{
"matchFileNames": ["contracts/bootstrap/package.json"],
"semanticCommitScope": "bootstrap"
},
{
"matchFileNames": ["ui/package.json"],
"assignees": ["drichar"],
"schedule": "on the 1st day of the month",
"semanticCommitScope": "ui",
"rangeStrategy": "pin"
},
{
"matchPackageNames": ["vitest", "@vitest/**"],
"groupName": "Vitest"
},
{
"matchDepTypes": [
"optionalDependencies",
"peerDependencies",
"engines"
],
"enabled": false
}
]
}
]
}
20 changes: 0 additions & 20 deletions ui/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ VITE_ALGOD_SERVER=http://localhost
VITE_ALGOD_PORT=4001
VITE_ALGOD_NETWORK="localnet"

# Indexer
VITE_INDEXER_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
VITE_INDEXER_SERVER=http://localhost
VITE_INDEXER_PORT=8980

# KMD
# Please note:
# 1. This is only needed for LocalNet since
Expand Down Expand Up @@ -53,11 +48,6 @@ VITE_ALGOD_SERVER="https://testnet-api.algonode.cloud"
VITE_ALGOD_PORT=""
VITE_ALGOD_NETWORK="testnet"

# Indexer
VITE_INDEXER_TOKEN=""
VITE_INDEXER_SERVER="https://testnet-idx.algonode.cloud"
VITE_INDEXER_PORT=""

# Block Explorer
VITE_EXPLORER_ACCOUNT_URL=https://testnet.explorer.perawallet.app/address
VITE_EXPLORER_TRANSACTION_URL=https://testnet.explorer.perawallet.app/tx
Expand Down Expand Up @@ -85,11 +75,6 @@ VITE_ALGOD_SERVER="https://fnet-api.4160.nodely.dev/"
VITE_ALGOD_PORT=""
VITE_ALGOD_NETWORK="fnet"

# Indexer
VITE_INDEXER_TOKEN=""
VITE_INDEXER_SERVER="https://fnet-idx.4160.nodely.dev/"
VITE_INDEXER_PORT=""

# Block Explorer
VITE_EXPLORER_ACCOUNT_URL=https://lora.algokit.io/fnet/account/
VITE_EXPLORER_TRANSACTION_URL=https://lora.algokit.io/fnet/transaction/
Expand All @@ -116,11 +101,6 @@ VITE_ALGOD_SERVER="https://mainnet-api.algonode.cloud"
VITE_ALGOD_PORT=""
VITE_ALGOD_NETWORK="mainnet"

# Indexer
VITE_INDEXER_TOKEN=""
VITE_INDEXER_SERVER="https://mainnet-idx.algonode.cloud"
VITE_INDEXER_PORT=""

# Block Explorer
VITE_EXPLORER_ACCOUNT_URL=https://allo.info/account
VITE_EXPLORER_TRANSACTION_URL=https://allo.info/tx
Expand Down
4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reti-ui",
"version": "0.11.2",
"version": "0.11.3",
"private": true,
"type": "module",
"engines": {
Expand Down Expand Up @@ -37,7 +37,7 @@
"vitest": "2.1.2"
},
"dependencies": {
"@algorandfoundation/algokit-utils": "7.0.0-beta.14",
"@algorandfoundation/algokit-utils": "7.0.0-beta.16",
"@blockshake/defly-connect": "1.1.6",
"@hookform/resolvers": "3.9.0",
"@perawallet/connect": "1.3.5",
Expand Down
6 changes: 3 additions & 3 deletions ui/src/components/AddValidatorForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ export function AddValidatorForm({ constraints }: AddValidatorFormProps) {
<FormLabel htmlFor="manager-input">
Manager account
<InfoPopover className={infoPopoverClassName} label="Manager account">
Account that triggers payouts and keyreg transactions (must sign
transactions)
Account that must be available to Node Daemon that triggers payouts and
keyreg transactions ('new' hot wallet)
</InfoPopover>
<span className="text-primary">*</span>
</FormLabel>
Expand Down Expand Up @@ -615,7 +615,7 @@ export function AddValidatorForm({ constraints }: AddValidatorFormProps) {
<FormLabel htmlFor="commission-percent-input">
Commission percent
<InfoPopover className={infoPopoverClassName} label="Commission percent">
Payout percentage w/ up to four decimals (e.g., 5.0001)
Commission percentage per-Epoch w/ up to four decimals (e.g., 5.0001)
</InfoPopover>
<span className="text-primary">*</span>
</FormLabel>
Expand Down
3 changes: 2 additions & 1 deletion ui/src/components/ValidatorInfoRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export function ValidatorInfoRow({ validator, constraints }: ValidatorInfoRowPro
<span className="whitespace-nowrap">
{validator.state.numPools > 0 ? (
<>
{validator.state.totalStakers} / {calculateMaxStakers(validator, constraints)}
{validator.state.totalStakers.toString()} /{' '}
{calculateMaxStakers(validator, constraints)}
</>
) : (
<>--</>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/contracts/StakingPoolClient.ts

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions ui/src/contracts/ValidatorRegistryClient.ts

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion ui/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ import { version } from './package.json'
* This plugin replaces the `__APP_VERSION__` placeholder in the `public/version.json` file
*/
const replaceVersionPlugin = () => {
let outDir
return {
name: 'replace-version-in-json',
apply: 'build',
enforce: 'pre',
configResolved(config) {
outDir = config.build.outDir
},
generateBundle() {
const filePath = path.resolve(__dirname, 'public/version.json')
const content = fs.readFileSync(filePath, 'utf-8')
const updatedContent = content.replace('__APP_VERSION__', version)
const newFilePath = path.resolve(__dirname, 'dist/version.json')
const newFilePath = path.resolve(outDir, 'version.json')
fs.writeFileSync(newFilePath, updatedContent, 'utf-8')
},
}
Expand Down

0 comments on commit 7bebc0b

Please sign in to comment.