Releases: 0xSpaceShard/starknet-hardhat-plugin
Releases · 0xSpaceShard/starknet-hardhat-plugin
v0.6.2
Usage related changes
- Adapted to cairo-lang and Starknet 0.9.1
estimateFee
response still has theamount
property, it is just expanded with the newgas_price
andgas_usage
properties
- Fixed running of scripts with
hardhat run
- no more signature issues. - Fixed running of
hardhat starknet-invoke
- Updated OpenZeppelin account version to v0.2.1
- Adapted
hardhat starknet-verify
to the new Voyager verification API - Expanded docs with 3rd party library installation guide
Development related changes
- Updated development docs
Merged PRs
- Fix invalid signature on hardhat run & Unsupported chain ID: undefined on starknet-invoke/call by @Nathan-SL in #159
- Update OpenZeppelin account artifacts to v0.2.1 by @amanusk in #169
- Adapt to cairo-lang/starknet 0.9.1 by @FabijanC in #170
- Add account param to voyager verifier API by @Nathan-SL in #172
New Contributors
Full Changelog: v0.6.1...v0.6.2
v0.6.1
Usage related changes
- Fixed error logging (removed duplication and improved newline display)
- integrated-devnet changes:
- Fixed error and exit handling
- Using starknet-devnet v0.2.5 by default
- Updated used OpenZeppelin account artifacts to v0.2.0
- Supported event decoding (example):
const txHash = await contract.invoke("increase_balance", { amount: 10 });
const receipt = await starknet.getTransactionReceipt(txHash);
const decodedEvents = contract.decodeEvents(receipt.events);
// decodedEvents contains hex data array converted to a structured object
// { name: "increase_balance_called", data: { current_balance: 0n, amount: 10n } }
- Supported devnet-specific client utility functions:
hardhat.starknet.devnet.load
- load a devnet instance via HTTPhardhat.starknet.devnet.dump
- dump a devnet instance via HTTPhardhat.starknet.devnet.getPredeployedAccounts
- get accounts predeployed on Devnet
Development related changes
- Updated development docs
Merged PRs
- Minor fix to Readme by @charlietilt in #129
- Support dump and load endpoints by @Nathan-SL in #134
- Add decodeEvents function by @qperrot in #130
- Add get-predeployed-accounts function by @qperrot in #125
- Fix exiting in integrated-devnet by @FabijanC in #132
- Update OpenZeppelin account artifacts to v0.2.0 by @FabijanC in #139
- Fix logging by @FabijanC in #138
New Contributors
- @charlietilt made their first contribution in #129
- @qperrot made their first contribution in #130
Full Changelog: v0.6.0...v0.6.1
v0.6.0
Usage related changes
- Introduced timestamp manipulation functions (Devnet only):
starknet.devnet.setTime(1000)
starknet.devnet.increaseTime(500)
- Added support for named tuples, nested tuples and type aliases as function arguments.
- Adapted to cairo-lang/starknet 0.9.0:
- Introduced the
declare
method to theStarknetFactory
class:const classHash = await contractFactory.declare()
- Introduced the
- Updated the Argent account version used (v0.2.2):
- BREAKING CHANGES:
- Guardian not used by default anymore (it's set to 0).
- Initialization with a fundedAccount required after deployment:
const acc = <ArgentAccount> await starknet.deployAccount("Argent")
await acc.initialize({ fundedAccount, maxFee })
- Useful scripts:
deploy-argent.ts
- deploy and initialize an Argent account.transfer-funds.ts
- transfer funds from one account to another.
- BREAKING CHANGES:
- Updated the OpenZeppelin account version used (OZ commit b27101eb8).
- Automatically fetching
-arm
docker images on arm64 computers. - Fixed support for interaction with Devnet on WSL and mac when used with the dockerizedVersion of the plugin.
- Adapted to the new Voyager verification API.
- Added support for relative paths as arguments to
getContractFactory
. integrated-devnet
- docs:- Not marked as experimental anymore.
- Added
args
property tointegratedDevnet
hardhat config definition to allow passing Devnet CLI arguments (e.g.--lite-mode
).
Development related changes
- Reduced amount of tests done on alpha-goerli.
- Using sleep-check-loop in devnet tests.
- This version was not published to npm via CircleCI because the network (alpha-goerli) was too slow - that's why if one observes CI information they might see the workflow having failed and the npm-publish task never having been executed.
Merged PRs
- Time manipulation functions by @Nathan-SL in #114
- Add time manipulation test by @Nathan-SL in #115
- Removed unused argument by @taco-paco in #119
- Adapt to new Voyager verification API by @Nathan-SL in #120
- Arm docker image by @Nathan-SL in #123
- Relative artifacts by @taco-paco in #118
- Use sleep-check loop on integrated-devnet startup by @FabijanC in #126
- Support named tuples, nested tuples and type aliases by @taco-paco in #128
- Adapt to cairo-lang 0.9.0 by @FabijanC in #124
- Support optional arguments on Integrated-devnet by @Nathan-SL in #122
New Contributors
- @taco-paco made their first contribution in #119
Full Changelog: v0.5.5...v0.6.0
v0.5.5
Usage related changes
- Account classes use OpenZeppelin v0.1.0 and Argent v0.2.1 (new versions coming soon, but better late than never)
- Easier getting of account address (
account.address
) - In CLI commands,
--signature
is fixed and now accepts multiple values url
property made optional for hardhat network configsdockerizedVersion
defaults to cairo-lang 0.8.2- Integrated-devnet uses uses starknet-devnet v0.2.2 by default
- Voyager has recently updated its verification API, so the
starknet-verify
command will not work with this and older versions of the plugin
Development related changes
- Read account artifacts from the plugin itself (part of npm package, used to be fetched from the example repo)
Merged PRs
- Make url optional for hardhat network config by @FabijanC in #105
- Add account artifacts [skip ci] by @FabijanC in #107
- Multiple signatures by @badurinantun in #109
- Added getter for starknetContract.address in Account class by @ivpavici in #110
- Cairo lang 0.8.2 by @FabijanC in #111
- Adapt Account to OpenZeppelin 0.1.0 and Argent 0.2.1 by @FabijanC in #108
- Release v0.5.5 by @FabijanC in #112
New Contributors
Full Changelog: v0.5.4...v0.5.5
v0.5.4
Usage related changes
- Introduced integrated-devnet:
- experimental feature
- run Devnet in Hardhat background without having to run it in a separate shell
- a predefined network configurable through the hardhat.config file
- activated by using
--starknet-network integrated-devnet
or specifyingnetwork: "integrated-devnet"
in the hardhat.config
- Introduced
starknet.getBlock
utility function for block retrieval - Fixed
hardhat starknet-verify
:- adapted to to the new Voyager API
- now logging a link to Voyager where the verified contract can be checked
- Added deployment options to
starknet.deployAccount
(whitelistedness token, salt, key) - Improved error logging on unsuccessful contract deployment (stopped masking the actual error).
Development related changes
- Use config.json for storing versions of tools used in the project
- Change how testing network is referenced
- Uncomment Voyager verification testing
- CircleCI improvements:
- Fix Devnet caching
- Fix BASH_ENV population
- Use machine executor for npm publish - the same one as in other linux jobs (instead of a docker image with legacy npm)
PRs merged
- Fix Devnet caching by @FabijanC in #95
- Enable normal fee estimation on Devnet by @FabijanC in #96
- Add restart method to devnet utils by @badurinantun in #89
- Integrate devnet by @badurinantun in #77
- Get Block Utility Function by @Nathan-SL in #97
- Jq config by @FabijanC in #99
- Adapt Voyager verification by @FabijanC in #98
- Improve block handling by @FabijanC in #101
- Add deployment options to deployAccount by @FabijanC in #100
- Devnet adaptations by @FabijanC in #102
- Release v0.5.4 by @FabijanC in #104
New Contributors
- @Nathan-SL made their first contribution in #97
Full Changelog: v0.5.3...v0.5.4
v0.5.3
Usage related changes
- Adapted to cairo-lang v0.8.1.
- Introduced
--disable-hint-validation
flag to thehardhat starknet-compile
command:- Allows compiling contracts with e.g. printing in hints (useful when executing on Devnet).
- Introduced
--token
option to thehardhat starknet-deploy
:- Allows whitelisted deployment on mainnet.
Development related changes
- Improved testing.
- Use stable version of devnet in testing (instead of latest GitHub commit).
Merged PRs
- Add assert-contains.py script by @FabijanC in #86
- --disable-hint-validation flag by @LucasLvy in #85
- Fix paths in compilation-option tests by @FabijanC in #87
- Release v0.5.3 by @FabijanC in #91
- Introduce --token flag for whitelisted deployment by @FabijanC in #92
- Adapt 0.8.1 by @badurinantun in #90
- Fix fee estimate by @badurinantun in #94
New Contributors
- @LucasLvy made their first contribution in #85
Full Changelog: v0.5.2...v0.5.3
v0.5.2
Usage changes
- Introduce Argent account implementation.
- Use updated OZ and Argent account implementations that support
multicall
/multiinvoke
- docs. - Adapt to cairo-lang 0.8.0:
- Introduce
contract.estimateFee
- example. - Allow specifying maxFee and nonce in calls.
- Introduce
hardhat starknet-estimate-fee
. - Introduce
--account-contract
flag tohardhat starknet-compile
to allow compiling contracts.
- Introduce
- Introduce
starknet.getTransaction
andstarknet.getTransactionReceipt
utility functions - Support hex strings as contract function input.
Dev changes
- Refactor
- Use
interact
to refer tocall
/invoke
/estimateFee
- Use classes instead of strings for interaction specification
- Use
- Wallet testing enabled on devnet
Merged PRs
- Argent account implementation by @dribeiro-ShardLabs in #79
- Use pyenv in CircleCI by @FabijanC in #82
- Adapt to 0.8.0 by @FabijanC in #80
- Added getTransaction and getTransaction receipt functions by @dribeiro-ShardLabs in #81
- Invoke options by @FabijanC in #84
Full Changelog: v0.5.1...v0.5.2
v0.5.1
Hotfix of v0.5.0
Usage changes
- Fix account resource handling; resolves errors of the type
Error: ENOENT: no such file or directory, scandir '.../starknet-artifacts/account-contract-artifacts'
- Account.invoke also returns txHash (previously didn't)
Dev specific changes
- Return type of invoke is
InvokeResponse
, currently equal tostring
Merged PRs
- Hotfix for account artifacts, return tx hash on invoke by @dribeiro-ShardLabs in #78
Full Changelog: v0.5.0...v0.5.1
v0.5.0
Usage changes
- Change
deployAccountFromABI
(breaking):- Now called
deployAccount
- First parameter (specifying file name) not needed anymore:
- Fetching of Account files done automatically - fetches the latest account version compatible with plugin
- Now called
- Fix deploying contracts with empty constructors.
- Remove
--starknet-network
CLI option fromhardhat run
:- There are issues with overriding hardhat tasks and introducing new CLI options - however
hardhat test
keeps its--starknet-network
option. - One might argue that this is a breaking change, but this feature was never available at all because v0.4.3 made deploying in hardhat scripts impossible - this is now fixed.
- Specifying the network can still be done through the
network
property ofstarknet
inhardhat.config
.
- There are issues with overriding hardhat tasks and introducing new CLI options - however
- Return tx hash on
StarknetContract.invoke
.
Dev specific changes
- Introduce PR template.
- Simplify constructor args handling.
- Improve constructor testing.
Merged PRs
- Automatic account artifacts fetching by @dribeiro-ShardLabs in #72
- Returning tx hash on invoke by @dribeiro-ShardLabs in #73
- Fix starknet-network specifying with hh run by @FabijanC in #74
- Fix empty constructor by @FabijanC in #75
- Rename deployAccountFromABI to deployAccount by @FabijanC in #76
Full Changelog: v0.4.3...v0.5.0
v0.4.3
Usage changes
- Introduce
--starknet-network
flag tohardhat test
andhardhat run
- Properly adapt input before passing to account:
- Fixes BigNumber, Array, Struct, Tuple support (for the case of interacting through an account)
- Also exposes
StarknetContract.adaptInput
andStarknetContract.adaptOutput
- Use hardhat 2.9.0 as a dependency.
- Update
hardhat starknet-verify
command:- Adapt to the new Voyager API
- Allow multi-file contracts.
Dev specific changes
- Fix testing with hardhat 2.9.0 (mocha updated)
- Specify which network to use in CI/CD tests using network.json files in desired test directories.
PRs merged
- Add
--starknet-network
tohardhat test
andhardhat run
by @FabijanC in #65 - Specify testing network with a network.json file by @FabijanC in #67
- Account adapt input by @FabijanC in #69
- Update hardhat to 2.9.0 by @FabijanC in #70
- Updated starknet-verify action by @dribeiro-ShardLabs in #68
Full Changelog: v0.4.2...v0.4.3