Releases: 0xSpaceShard/starknet-hardhat-plugin
Releases · 0xSpaceShard/starknet-hardhat-plugin
v0.4.2
Usage changes
- Introduce utility functions for handling L1-L2 communication (postman message exchange with Devnet):
starknet.devnet.loadL1MessagingContract
- for loading an L1 contract that exchanges messages between L1 and L2starknet.devnet.flush
- for propagating messages to the other layer- Basic example
- Complex example
- Introduce an
Account
class for invoking/calling contract functions through an Account. CreateAccount
using utility functions:starknet.deployAccountFromABI
- for new Account deploymentstarknet.getAccountFromAddress
- for loading a predeployed Account- Basic example
- Complex example
Dev specific changes
- None
PRs merged
- Postman by @badurinantun in #58
- Account enhancement by @dribeiro-ShardLabs in #62
- Reflect flush resp with l1 and l2 messages by @FabijanC in #66
Full Changelog: v0.4.1...v0.4.2
v0.4.1
Usage
- Use cairo-lang 0.7.1 by default.
- Make hardhat a peerDependency (and devDependency).
Dev
- Introduce formatting (prettier).
- Fix CI/CD workflow.
What's Changed
- Fix poetry to version 1.1.12 by @FabijanC in #56
- Updated to cairo 0.7.1 by @dribeiro-ShardLabs in #57
- Add prettier config file and modify files by @badurinantun in #60
- Move hardhat to peerDependencies by @badurinantun in #59
New Contributors
- @badurinantun made their first contribution in #60
Full Changelog: v0.4.0...v0.4.1
v0.4.0
Usage
- Expand tilde (~) to homedir in venv path.
- Add Docker issue fix to Readme.
- BREAKING changes:
- Rename string utility functions to reflect their real purpose (functionality stays the same, the name changes):
stringToBigInt
->shortStringToBigInt
bigIntToString
->bigIntToShortString
- Change the expected config file structure (check here for an example):
- Use
starknet
key. - Stop using
cairo
key:- Rename
version
todockerizedVersion
:- Because the
version
key affected and affects only the Docker image used (if user opts for dockerized mode).
- Because the
- Rename
- Move
wallets
key tostarknet
. - Rename
starknetNetwork
tonetwork
and move it frommocha
tostarknet
:- This is because the network wasn't just
mocha
specific but could be used in any Hardhat script.
- This is because the network wasn't just
- Use
- Use
options
object inStarknetContract
methods instead of using optional function arguments; e.g.:- OLD:
StarknetContract.call(functionName: string, args?: StringMap, signature?: Array<Numeric>, wallet?: Wallet, blockNumber?: string)
- NEW:
StarknetContract.call(functionName: string, args?: StringMap, options: CallOptions = {})
- OLD:
- Rename string utility functions to reflect their real purpose (functionality stays the same, the name changes):
Dev
- No dev-specific changes to list.
Merged PRs
- Expand tilde to homedir in venv path by @FabijanC in #53
- Introduce breaking changes for 0.4.0 by @FabijanC in #54
Full Changelog: v0.3.11...v0.4.0
v0.3.11
Usage
- Support for Accounts/Wallets:
- configure it in your hardhat.config file: https://github.com/Shard-Labs/starknet-hardhat-plugin/#wallet
starknet-deploy-account
task: https://github.com/Shard-Labs/starknet-hardhat-plugin/#starknet-deploy-account- in Mocha tests: https://github.com/Shard-Labs/starknet-hardhat-example/blob/master/test/wallet-test.ts
- IMPORTANT: The new developer experience of using
invoke
orcall
in Mocha is compromised by this (three optional parameters in a row) - this will be changed in 0.4.0.
- IMPORTANT: The new developer experience of using
- Target pending block by default when making calls.
cairo_path
option used bystarknet-compile
is configurable in hardhat.config.- Retry status checking if received 503 response.
- Increase status checking timeout to reduce network load.
Dev
- Update linter.
PRs merged
- Implement support for account contract by @dribeiro-ShardLabs in #47
- Fix account support by @dribeiro-ShardLabs in #49
- Update linter (no-unused-vars, semi-spacing, block-spacing) by @FabijanC in #50
- Implemented support for pending block querying by @dribeiro-ShardLabs in #43
- Multiple sources paths, rejected transaction error message by @dribeiro-ShardLabs in #48
- Fixed UnhandledPromise error, retry check status on 503 by @dribeiro-ShardLabs in #52
Full Changelog: v0.3.10...v0.3.11
v0.3.10
Usage
- Use cairo-lang v0.7.0 as the default Docker image (if using the Docker mode).
- Support arrays of structs in function input/output.
- Fix parsing negative BigInt by @clexmond.
- Improve error message on invalid CLI input to deploy/invoke/call (the
--inputs
option).
Dev
- Use cache in CircleCI.
- Use hardhat v2.8.2.
PRs merged
- Using caching in CircleCI to optimize workflow. by @dribeiro-ShardLabs in #41
- Update to hardhat v2.8.2 and use cairo-lang v0.7.0 by @FabijanC in #46
- Accept arrays of structs as inputs and outputs by @dribeiro-ShardLabs in #42
Full Changelog: v0.3.9...v0.3.10
v0.3.9
Usage
- Add
starknet-invoke
andstarknet-call
tasks. - Improved error logging:
- If invalid number of arguments or keys passed to Starknet functions.
- Log available networks.
- Improve Readme.
- Support specifying salt when deploying contracts:
- With
npx hardhat starknet-deploy
. - With
ContractFactory.deploy
.
- With
Dev
- Add linting.
- Update hardhat version.
- Refactor.
PRs
- Added check for number of arguments and nested objects' members by @dribeiro-ShardLabs in #36
- Add linting; Update Readme with
require
statements by @FabijanC in #37 - Log available networks by @FabijanC in #38
- Invoke call tasks by @dribeiro-ShardLabs in #39
Full Changelog: v0.3.8...v0.3.9
v0.3.8
Usage
- Add utility functions for converting short string literals to BigInt and vice versa:
stringToBigInt
bigIntToString
- Improve Readme.
- Improve deployment logging.
Dev
- Refactor
index.ts
intotask-actions.ts
andextend-utils.ts
. - In Starknet wrappers:
- Consistently
await
internal function calls. - Fix typo.
- Consistently
PRs
- Added short string support, refactored index.ts by @dribeiro-ShardLabs in #34
- Deploy logging and consistent await by @dribeiro-ShardLabs in #35
Full Changelog: v0.3.7...v0.3.8
v0.3.7
What's Changed
- Use parameterized jobs in CircleCI by @FabijanC in #31
- Fixed dockerOptions, changed tests to not use test.cairo file by @dribeiro-ShardLabs in #33
Usage
- Fix interacting with
starknet-devnet
if using the Docker option (specified withcairo.version
in hardhat.config).
Dev
- Restructure tests.
- Reduce the amount of work done in CI.
- Test
starknet-devnet
interaction in CI.
Full Changelog: v0.3.6...v0.3.7
v0.3.6
What's Changed
- Parallelize testing workflow + adapt to cairo-lang v0.6.2 by @dribeiro-ShardLabs in #30
- Refactor running Starknet commands; Fix devnet interaction on macOS+venv by @FabijanC in #29
Usage
- Fix interaction with
starknet-devnet
when usingvenv
on macOS. - Adapt to v0.6.2:
- when awaiting transactions, they are resolved when ACCEPTED_ON_L2)
- have both
alpha
andgoerli-alpha
as predefined network names for Alpha Testnet (on Goerli)
- Use
alpha-mainnet
as the predefined network name of Alpha Mainnet. - Improve Readme.
Dev
- Parallelize jobs in CircleCI (reduce testing time).
- Major refactor of how Starknet CLI commands are internally run.
Full Changelog: v0.3.5...v0.3.6
v0.3.5
What's Changed
- Voyager contract verification by @dribeiro-ShardLabs in #25
- Change contract path handling by @dribeiro-ShardLabs in #26
Usage
- Add
starknet-verify
task: - Add
--wait
flag tostarknet-deploy
task:- Allows waiting until deployment becomes at least
PENDING
.
- Allows waiting until deployment becomes at least
- Handle error arising on using Python virtual environment without
cairo-lang
. - Improve
getContractFactory
(the function that creates a contract factory from the provided contract):- Handle ambiguous input.
- Allow specifying the contract by the path of its source.
Dev
- Replace the recursive
traverseFiles
withglob
package.
New Contributors
- @dribeiro-ShardLabs made their first contribution in #25
Full Changelog: v0.3.4...v0.3.5