Skip to content

Commit

Permalink
chore: ugprade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hugocaillard committed Apr 26, 2024
1 parent 545c661 commit 7ff91f8
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 199 deletions.
2 changes: 1 addition & 1 deletion Clarinet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requirements = []
[contracts.counter]
path = 'contracts/counter.clar'
clarity_version = 2
epoch = 2.4
epoch = 2.5

[repl.analysis]
passes = ['check_checker']
Expand Down
2 changes: 1 addition & 1 deletion deployments/default.devnet-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ plan:
path: contracts/counter.clar
anchor-block-only: true
clarity-version: 2
epoch: "2.4"
epoch: "2.5"
14 changes: 10 additions & 4 deletions deployments/default.simnet-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,18 @@ plan:
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: contracts/counter.clar
clarity-version: 2
epoch: "2.4"
- id: 1
transactions:
- emulated-contract-call:
contract-id: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.counter
emulated-sender: ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5
method: increment
parameters: []
epoch: "2.4"
epoch: "2.5"
- id: 1
transactions:
- stx-transfer:
expected-sender: ST3PF13W7Z0RRM42A8VZRVFQ75SV1K26RXEP8YGKJ
recipient: ST3NBRSFKX28FQ2ZJ1MAKX58HKHSDGNV5N7R21XCP
mstx-amount: 2222222
cost: 1000
anchor-block-only: true
epoch: "2.5"
362 changes: 199 additions & 163 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"author": "",
"license": "ISC",
"dependencies": {
"@hirosystems/clarinet-sdk": "^2.4.1",
"@hirosystems/clarinet-sdk": "^2.6.0",
"@stacks/transactions": "^6.8.1",
"chokidar-cli": "^3.0.0",
"typescript": "^5.3.3",
"vite": "^5.0.2",
"vitest": "^1.0.4",
"vitest-environment-clarinet": "^2.0.0"
"vitest": "^1.5.2",
"vitest-environment-clarinet": "2.1.0"
}
}
38 changes: 15 additions & 23 deletions settings/Devnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,16 @@ balance = 100_000_000_000_000
[devnet]
disable_stacks_explorer = false
disable_stacks_api = false
use_nakamoto = false
bitcoin_controller_block_time = 500

# disable_bitcoin_explorer = true
# working_dir = "tmp/devnet"
# stacks_node_events_observers = ["host.docker.internal:8002"]
# miner_mnemonic = "twice kind fence tip hidden tilt action fragile skin nothing glory cousin green tomorrow spring wrist shed math olympic multiply hip blue scout claw"
# miner_derivation_path = "m/44'/5757'/0'/0/0"
# faucet_mnemonic = "shadow private easily thought say logic fault paddle word top book during ignore notable orange flight clock image wealth health outside kitten belt reform"
# faucet_derivation_path = "m/44'/5757'/0'/0/0"
# orchestrator_port = 20445
# bitcoin_node_p2p_port = 18444
# bitcoin_node_rpc_port = 18443
# bitcoin_node_username = "devnet"
# bitcoin_node_password = "devnet"
# bitcoin_controller_block_time = 10_0000
# stacks_node_rpc_port = 20443
# stacks_node_p2p_port = 20444
# stacks_api_port = 3999
Expand All @@ -106,38 +102,34 @@ use_nakamoto = false
# stacks_explorer_image_url = "hirosystems/explorer:latest"
# bitcoin_explorer_image_url = "quay.io/hirosystems/bitcoin-explorer:devnet"
# postgres_image_url = "postgres:14"
# enable_subnet_node = true
# subnet_node_image_url = "hirosystems/hyperchains:0.0.4-stretch"
# subnet_leader_mnemonic = "female adjust gallery certain visit token during great side clown fitness like hurt clip knife warm bench start reunion globe detail dream depend fortune"
# subnet_leader_derivation_path = "m/44'/5757'/0'/0/0"
# subnet_contract_id = "STXMJXCJDCT4WPF2X1HE42T6ZCCK3TPMBRZ51JEG.hc-alpha"
# subnet_node_rpc_port = 30443
# subnet_node_p2p_port = 30444
# subnet_events_ingestion_port = 30445
# subnet_node_events_observers = ["host.docker.internal:8002"]
# epoch_3_0=142

# epoch_2_0 = 100
# epoch_2_05 = 101
# epoch_2_1 = 102
# pox_2_activation = 103
# epoch_2_2 = 104
# epoch_2_3 = 105
# epoch_2_4 = 106

# Send some stacking orders
[[devnet.pox_stacking_orders]]
start_at_cycle = 2
duration = 2
start_at_cycle = 1
duration = 10
wallet = "wallet_1"
slots = 2
btc_address = "mr1iPkD9N3RJZZxXRk7xF9d36gffa6exNC"
auto_extend = true

[[devnet.pox_stacking_orders]]
start_at_cycle = 2
duration = 2
start_at_cycle = 1
duration = 10
wallet = "wallet_2"
slots = 2
btc_address = "muYdXKmX9bByAueDe6KFfHd5Ff1gdN9ErG"
auto_extend = true

[[devnet.pox_stacking_orders]]
start_at_cycle = 2
duration = 2
start_at_cycle = 1
duration = 10
wallet = "wallet_3"
slots = 2
btc_address = "mvZtbibDAAA3WLpY7zXXFqRa3T4XSknBX7"
Expand Down
17 changes: 14 additions & 3 deletions tests/counter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,20 @@ import { describe, expect, it } from "vitest";
const accounts = simnet.getAccounts();
const address1 = accounts.get("wallet_1")!;

// the count is incremented by 1 in a contract-call in the deployment-plan
const initialCount = 1;

describe("the chain reset between tests", () => {
it("advances 20 blocks", () => {
expect(simnet.blockHeight).toBe(2);
simnet.mineEmptyBlocks(20);
expect(simnet.blockHeight).toBe(22);
});

it("is back to initial height", () => {
expect(simnet.blockHeight).toBe(2);
});
});

describe("test get counter", () => {
it("ensures <get-count> send the counter value", async () => {
const { result } = simnet.callReadOnlyFn(
Expand Down Expand Up @@ -42,7 +53,7 @@ describe("test <increment>", () => {
expect(counter).toBeUint(initialCount + 1);
});

it("ensures <increment> trasnfers 10 ustx", () => {
it("ensures <increment> transfers 10 ustx", () => {
const { events } = simnet.callPublicFn(
"counter",
"increment",
Expand Down Expand Up @@ -106,7 +117,7 @@ describe("test <add>", () => {
expect(counter).toBeUint(initialCount + 3);
});

it("ensures <add> trasnfers right amout of ustx", () => {
it("ensures <add> transfers right amout of ustx", () => {
const { events } = simnet.callPublicFn(
"counter",
"add",
Expand Down
1 change: 0 additions & 1 deletion vitest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default defineConfig({
environment: "clarinet", // use vitest-environment-clarinet
pool: "forks",
poolOptions: {
threads: { singleThread: true },
forks: { singleFork: true },
},
setupFiles: [
Expand Down

0 comments on commit 7ff91f8

Please sign in to comment.