Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
22b0996
upgrade dependencies
ItsNickBarry Apr 9, 2025
2b761ac
update package.json and tsconfig.json
ItsNickBarry Apr 9, 2025
40370ef
export HardhatPlugin object
ItsNickBarry Apr 10, 2025
4711a96
clean tsc output on build
ItsNickBarry Apr 17, 2025
b28ad97
fix build task
ItsNickBarry Apr 20, 2025
ea0af37
update tasks for Hardhat 3 task builder API and register in plugin
ItsNickBarry Apr 22, 2025
4f9b711
export plugin
ItsNickBarry Apr 22, 2025
4850988
use full package name as plugin id
ItsNickBarry Apr 22, 2025
82fc9bf
move task actions to actions/ directory
ItsNickBarry Apr 22, 2025
f2abab6
move core logic to lib/ directory
ItsNickBarry Apr 22, 2025
4c79596
set args type to allow building
ItsNickBarry Apr 22, 2025
890c410
add test script
ItsNickBarry Apr 22, 2025
a471971
add missing return value to encode task
ItsNickBarry Apr 22, 2025
5b2a1e8
set default values for variadic arguments
ItsNickBarry Apr 22, 2025
c94b0d5
register plugin in config
ItsNickBarry Apr 22, 2025
3f795db
replace mocha and chai with nodejs test runner
ItsNickBarry Apr 22, 2025
97119eb
enable prompt option via CLI
ItsNickBarry Apr 22, 2025
35fd127
upgrade dependencies
ItsNickBarry May 7, 2025
65e6c50
use prettier-plugin-packagejson to sort package.json
ItsNickBarry May 7, 2025
e53eea4
use knip
ItsNickBarry May 16, 2025
c581931
remove ts-node
ItsNickBarry May 16, 2025
62d50df
add missing tsx dependency
ItsNickBarry May 16, 2025
bccaf4c
set exports in package.json, remove dist/src/ nesting
ItsNickBarry May 16, 2025
5702aed
fix export paths
ItsNickBarry May 17, 2025
3edcddc
upgrade dependencies
ItsNickBarry May 20, 2025
9fac990
run knip via lint-staged
ItsNickBarry May 20, 2025
a826eaf
switch from yarn to pnpm
ItsNickBarry May 20, 2025
4d93dcc
use node types dependency
ItsNickBarry May 23, 2025
9330cd4
rename lib file to transaction and add to exports
ItsNickBarry May 23, 2025
bb0f5cd
remove defaultNetwork hardhat config
ItsNickBarry May 23, 2025
c9aa90a
rename namespaced transaction functions
ItsNickBarry May 23, 2025
fad0580
export task argument types
ItsNickBarry May 23, 2025
c8c2dc7
change chainId argument type to string
ItsNickBarry May 23, 2025
0e99c8d
parse chainId from dec or hex string
ItsNickBarry May 24, 2025
395af69
upgrade dependencies
ItsNickBarry May 27, 2025
70f8426
structure query with TxnDotXyzV0Query type
ItsNickBarry May 27, 2025
67be6ae
restore fnParams default value to tasks
ItsNickBarry May 28, 2025
3b7f635
use ethers abi package to infer ABI and valdiate parameters
ItsNickBarry May 28, 2025
62973d5
throw hardhat error if params do not match fn signature
ItsNickBarry May 28, 2025
e0adf5f
improve error message formatting
ItsNickBarry May 28, 2025
e3b2c01
update tests
ItsNickBarry May 28, 2025
8279b31
rename contractAddress to to
ItsNickBarry May 28, 2025
4bbf647
remove encode task
ItsNickBarry May 28, 2025
dbc474d
use experimental version of lint-staged with support for hiding all u…
ItsNickBarry May 28, 2025
0cdd8cd
run knip in production mode on commit
ItsNickBarry May 28, 2025
959a13b
build project in prepublishOnly script
ItsNickBarry May 30, 2025
ebad0ac
use hardhat-solidstate-utils dependency
ItsNickBarry May 31, 2025
623d438
use tsconfig node22 package, update tsconfig
ItsNickBarry May 31, 2025
d2c608a
set json import attribute on package.json imports
ItsNickBarry May 31, 2025
3529a56
replace tsc --build --clean with rm -rf in clean script
ItsNickBarry Jun 1, 2025
e93dd28
clean before tests rather than build
ItsNickBarry Jun 1, 2025
96fc368
test with --experimental-test-coverage flag
ItsNickBarry Jun 1, 2025
c9ac272
upgrade dependencies
ItsNickBarry Jun 3, 2025
90bdba2
use knip branch of lint-staged for, run prettier with --no-error-on-u…
ItsNickBarry Jun 8, 2025
985f72a
remove file extension from LICENSE
ItsNickBarry Jun 12, 2025
cd5d46c
upgrade dependencies
ItsNickBarry Jun 13, 2025
f27d88c
upgrade lint-staged fork
ItsNickBarry Jun 14, 2025
443a337
run knip --production in --strict mode
ItsNickBarry Jun 19, 2025
329b50a
simplify dependency plugin loading
ItsNickBarry Jul 15, 2025
9095fe5
upgrade dependencies
ItsNickBarry Aug 11, 2025
1428aea
update dynamic import method
ItsNickBarry Aug 11, 2025
14e8134
unpin hardhat solidstate utils plugin
ItsNickBarry Aug 13, 2025
7a92af3
update lint-staged
ItsNickBarry Aug 13, 2025
ce066a7
use camel case for plugin objects
ItsNickBarry Aug 14, 2025
e00578d
replace lint-staged with exec-staged
ItsNickBarry Sep 18, 2025
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.tsbuildinfo
artifacts/
cache/
dist/
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
yarn run lint-staged
pnpm exec-staged
3 changes: 0 additions & 3 deletions .lintstagedrc.json

This file was deleted.

5 changes: 4 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"plugins": ["@trivago/prettier-plugin-sort-imports"]
"plugins": [
"prettier-plugin-packagejson",
"@trivago/prettier-plugin-sort-imports"
]
}
File renamed without changes.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Format and trigger secure on-chain transactions via [txn.xyz](https://www.txn.xy
```bash
npm install --save-dev @solidstate/hardhat-txn-dot-xyz
# or
yarn add --dev @solidstate/hardhat-txn-dot-xyz
pnpm add -D @solidstate/hardhat-txn-dot-xyz
```

## Usage
Expand All @@ -23,7 +23,7 @@ Output usage information via Hardhat:
```bash
npx hardhat txn-dot-xyz-send --help
# or
yarn run hardhat txn-dot-xyz-send --help
pnpm hardhat txn-dot-xyz-send --help
```

### Example
Expand All @@ -33,7 +33,7 @@ This example will encode a Mainnet transaction which revokes the sender's approv
```bash
npx hardhat txn-dot-xyz-send --chain-id 1 --contract-address 0x6b175474e89094c44da98b954eedeac495271d0f --fn approve --fn-params '["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", 0]'
# or
yarn run hardhat txn-dot-xyz-send --chain-id 1 --contract-address 0x6b175474e89094c44da98b954eedeac495271d0f --fn approve --fn-params '["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", 0]'
pnpm hardhat txn-dot-xyz-send --chain-id 1 --contract-address 0x6b175474e89094c44da98b954eedeac495271d0f --fn approve --fn-params '["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", 0]'
```

It may also be run from within the Hardhat environment:
Expand All @@ -56,14 +56,14 @@ await hre.run('txn-dot-xyz-send', {

## Development

Install dependencies via Yarn:
Install dependencies via pnpm:

```bash
yarn install
pnpm install
```

Setup Husky to format code on commit:

```bash
yarn prepare
pnpm prepare
```
12 changes: 12 additions & 0 deletions exec-staged.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { ExecStagedUserConfig } from 'exec-staged/types';

const config: ExecStagedUserConfig = [
'knip',
'knip --strict',
{
task: 'prettier --write --no-error-on-unmatched-pattern $FILES',
glob: '*.{js,ts,sol,json,md}',
},
];

export default config;
4 changes: 2 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import './src/index';
import hardhatTxnDotXyz from './src/index.js';
import { HardhatUserConfig } from 'hardhat/config';

const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
plugins: [hardhatTxnDotXyz],
};

export default config;
55 changes: 33 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@solidstate/hardhat-txn-dot-xyz",
"version": "0.3.0",
"license": "MIT",
"description": "Generate and execute on-chain transactions via txn.xyz",
"keywords": [
"hardhat",
Expand All @@ -18,36 +17,48 @@
"wow"
],
"repository": "github:solidstate-network/hardhat-txn-dot-xyz",
"license": "MIT",
"author": "Nick Barry",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"scripts": {
"build": "tsc --build",
"prepare": "husky",
"prettier": "prettier --write ."
"type": "module",
"exports": {
".": "./dist/index.js",
"./transaction": "./dist/lib/transaction.js",
"./types": "./dist/types.js"
},
"types": "./dist/index.d.ts",
"files": [
"dist/",
"src/"
],
"dependencies": {
"open": "^8.4.0",
"query-string": "^7.1.1"
"scripts": {
"build": "pnpm clean && tsc --build",
"clean": "rm -rf dist/",
"prepare": "husky",
"prepublishOnly": "pnpm build",
"prettier": "prettier --write .",
"test": "pnpm clean && tsx --test --experimental-test-coverage"
},
"peerDependencies": {
"hardhat": "^2.0.0"
"dependencies": {
"@ethersproject/abi": "^5.8.0",
"@solidstate/hardhat-solidstate-utils": "^1.0.0-next.4",
"open": "^10.2.0",
"query-string": "^9.2.2"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/chai": "^4.3.19",
"@types/mocha": "^10.0.6",
"chai": "^4.4.1",
"hardhat": "^2.22.4",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.4.5"
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@tsconfig/node22": "^22.0.2",
"@types/node": "^24.2.1",
"exec-staged": "^0.1.0",
"hardhat": "^3.0.0-next.30",
"husky": "^9.1.7",
"knip-exec-staged": "^5.63.1",
"prettier": "^3.6.2",
"prettier-plugin-packagejson": "^2.5.19",
"tsx": "^4.20.3",
"typescript": "^5.9.2"
},
"peerDependencies": {
"hardhat": "^3.0.0-next.3"
},
"publishConfig": {
"access": "public"
Expand Down
Loading