Skip to content
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

feat: add clarity version #392

Merged
merged 6 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/sweet-pumas-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@stacks/connect-react': minor
'@stacks/connect': minor
---

Add `clarityVersion` to contract deploys.
5 changes: 1 addition & 4 deletions .github/.husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --extends @commitlint/config-conventional --edit ${1}
npx @commitlint/cli --extends @commitlint/config-conventional --edit $1
385 changes: 186 additions & 199 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build:connect-ui": "lerna run build --scope @stacks/connect-ui",
"build:docs": "typedoc && mkdir -p docs/.github && cp -r .github/img docs/.github/img",
"deploy-contracts": "lerna run deploy-contracts --stream",
"postinstall": "concurrently 'husky install .github/.husky' 'npm run build:connect-ui'",
"postinstall": "concurrently 'husky .github/.husky' 'npm run build:connect-ui'",
"lint": "npm run lint:eslint && npm run lint:prettier",
"lint:eslint": "eslint \"packages/**/src/**/*.{ts,tsx}\"",
"lint:eslint:fix": "eslint \"packages/**/src/**/*.{ts,tsx}\" --fix",
Expand All @@ -23,27 +23,27 @@
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.7",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@changesets/cli": "^2.27.9",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@stacks/eslint-config": "^2.0.0",
"@stacks/prettier-config": "^0.0.10",
"@stencil-community/eslint-plugin": "^0.7.2",
"concurrently": "^9.0.1",
"concurrently": "^9.1.0",
"eslint": "^8.49.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-unused-imports": "^3.2.0",
"husky": "^9.0.11",
"lerna": "^8.1.8",
"husky": "^9.1.6",
"lerna": "8.1.8",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.8",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tsup": "^8.3.0",
"tsup": "^8.3.5",
"typedoc": "^0.26.10",
"typescript": "^5.3.2"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/connect-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"jsontokens": "^4.0.1"
},
"devDependencies": {
"@types/react-dom": "^17.0.2",
"@types/styled-components": "^5.1.9",
"bundlesize": "^0.18.1"
"@types/react-dom": "^18.3.1",
"@types/styled-components": "^5.1.34",
"bundlesize": "^0.18.2"
},
"sideEffects": false,
"publishConfig": {
Expand Down
10 changes: 5 additions & 5 deletions packages/connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"build-storybook": "storybook build"
},
"dependencies": {
"@stacks/auth": "^7.0.0-next.70",
"@stacks/common": "^7.0.0-next.70",
"@stacks/auth": "^7.0.0",
"@stacks/common": "^7.0.0",
"@stacks/connect-ui": "6.5.0",
"@stacks/network": "^7.0.0-next.70",
"@stacks/network": "^7.0.0",
"@stacks/network-v6": "npm:@stacks/network@^6.16.0",
"@stacks/profile": "^7.0.0-next.70",
"@stacks/transactions": "^7.0.0-next.70",
"@stacks/profile": "^7.0.0",
"@stacks/transactions": "^7.0.0",
"@stacks/transactions-v6": "npm:@stacks/transactions@^6.16.0",
"jsontokens": "^4.0.1"
},
Expand Down
15 changes: 11 additions & 4 deletions packages/connect/src/types/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
PostCondition,
AnchorMode,
ClarityValue,
StacksTransaction,
StacksTransactionWire,
} from '@stacks/transactions';
import { ConnectNetwork } from './network';

Expand Down Expand Up @@ -51,15 +51,15 @@ export interface SponsoredFinishedTxPayload {
}

export interface SponsoredFinishedTxData extends SponsoredFinishedTxPayload {
stacksTransaction: StacksTransaction;
stacksTransaction: StacksTransactionWire;
}

export interface FinishedTxPayload extends SponsoredFinishedTxPayload {
txId: string;
}

export interface FinishedTxData extends FinishedTxPayload {
stacksTransaction: StacksTransaction;
stacksTransaction: StacksTransactionWire;
}

export enum TransactionTypes {
Expand Down Expand Up @@ -134,6 +134,13 @@ export interface ContractCallPayload extends ContractCallBase {
export interface ContractDeployBase extends TxBase {
contractName: string;
codeBody: string;
/**
* Optional integer value to specify the Clarity version to use for this contract.
* Current live Clarity versions are: `1`, `2`, and `3`.
*
* ⚠︎ Warning: Wallets may not support this parameter yet and typically default to the latest Clarity version.
*/
clarityVersion?: number;
}

export type ContractDeployRegularOptions = ContractDeployBase & RegularOptionsBase;
Expand Down Expand Up @@ -201,5 +208,5 @@ export type SignTransactionFinished = (data: SignTransactionFinishedTxData) => v
export type SignTransactionOptions = SignTransactionOptionBase;

export interface SignTransactionFinishedTxData {
stacksTransaction: StacksTransaction;
stacksTransaction: StacksTransactionWire;
}
Loading