Skip to content

Commit

Permalink
Merge pull request #276 from TxnLab/dev
Browse files Browse the repository at this point in the history
0.10.0
  • Loading branch information
pbennett authored Sep 28, 2024
2 parents b05151e + 688c118 commit 30ad704
Show file tree
Hide file tree
Showing 77 changed files with 57,689 additions and 57,237 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
pull_request:
branches:
- 'main'
# - 'dev'

jobs:
ci-tests:
Expand Down Expand Up @@ -61,7 +60,7 @@ jobs:
run: pipx install algokit

- name: Start local Algorand network
run: algokit localnet start
run: algokit localnet start --name master --config-dir ./contracts/localnet_config

- name: Run Contract tests from already built contracts
run: pnpm --filter ./contracts run retest
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
1 change: 1 addition & 0 deletions contracts/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
contracts/artifacts
contracts/clients
localnet_config
7 changes: 3 additions & 4 deletions contracts/__test__/contracts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { afterEach, beforeAll, beforeEach, describe, expect, test } from 'vitest
import { algoKitLogCaptureFixture, algorandFixture } from '@algorandfoundation/algokit-utils/testing'
import { consoleLogger } from '@algorandfoundation/algokit-utils/types/logging'
import { AlgoAmount } from '@algorandfoundation/algokit-utils/types/amount'
import { Account, decodeAddress, encodeAddress, getApplicationAddress } from 'algosdk'
import { Account, encodeAddress, getApplicationAddress } from 'algosdk'
import { assetOptIn, transferAlgos, transferAsset } from '@algorandfoundation/algokit-utils'
import { AlgorandTestAutomationContext } from '@algorandfoundation/algokit-utils/types/testing'
import { StakingPoolClient } from '../contracts/clients/StakingPoolClient'
Expand Down Expand Up @@ -37,7 +37,7 @@ import {
ValidatorPoolKey,
} from '../helpers/helpers'

const FEE_SINK_ADDR = 'Y76M3MSY6DKBRHBL7C3NNDXGS5IIMQVQVUAB6MP4XEMMGVF2QWNPL226CA'
const FEE_SINK_ADDR = 'A7NMWS3NT3IUDMLVO26ULGXGIIOUQ3ND2TXSER6EBGRZNOBOUIQXHIBGDE'

const MaxPoolsPerNode = 3
// Periodically set this to max amount allowed in protocol (200 atm) but when testing more frequently this should be lowered to something like 20 stakers
Expand Down Expand Up @@ -77,7 +77,6 @@ beforeAll(async () => {
const { approvalCompiled } = await poolClient.appClient.compile({
deployTimeParams: {
nfdRegistryAppId: 0,
feeSinkAddr: decodeAddress(FEE_SINK_ADDR).publicKey,
},
})
validatorMasterClient = new ValidatorRegistryClient(
Expand Down Expand Up @@ -450,7 +449,7 @@ describe('StakeAdds', () => {
// capture current 'total' state for all pools
const origValidatorState = await getValidatorState(validatorMasterClient, validatorId)

// we create 'max pools per node' new pools on new node (first pool is still there which wee added as part of beforeAll)
// we create 'max pools per node' new pools on new node (first pool is still there which we added as part of beforeAll)
for (let i = 0; i < poolsToCreate; i += 1) {
const newPool = await addStakingPool(
fixture.context,
Expand Down
5 changes: 2 additions & 3 deletions contracts/bootstrap/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as algokit from '@algorandfoundation/algokit-utils'
import { AlgorandClient } from '@algorandfoundation/algokit-utils'
import { Account, decodeAddress, secretKeyToMnemonic } from 'algosdk'
import { Account, secretKeyToMnemonic } from 'algosdk'
import { AlgoAmount } from '@algorandfoundation/algokit-utils/types/amount'
import { getTestAccount } from '@algorandfoundation/algokit-utils/testing'
import * as fs from 'fs'
Expand Down Expand Up @@ -89,7 +89,7 @@ async function main() {
}).argv

console.log(`Network:${args.network}`)
const [algodConfig, registryAppID, feeSink] = getNetworkConfig(args.network)
const [algodConfig, registryAppID] = getNetworkConfig(args.network)

// default to localnet
let algorand: AlgorandClient = AlgorandClient.defaultLocalNet()
Expand Down Expand Up @@ -141,7 +141,6 @@ async function main() {
id: 0,
deployTimeParams: {
nfdRegistryAppId: Number(registryAppID),
feeSinkAddr: decodeAddress(feeSink).publicKey,
},
},
algorand.client.algod,
Expand Down
2 changes: 1 addition & 1 deletion contracts/bootstrap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap",
"version": "0.9.9",
"version": "0.10.0",
"description": "",
"main": "index.ts",
"scripts": {
Expand Down
Loading

0 comments on commit 30ad704

Please sign in to comment.