Skip to content

Releases: 0xSpaceShard/starknet-hardhat-plugin

v0.6.2

20 Jul 15:23
Compare
Choose a tag to compare

Usage related changes

  • Adapted to cairo-lang and Starknet 0.9.1
    • estimateFee response still has the amount property, it is just expanded with the new gas_price and gas_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

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

11 Jul 14:42
Compare
Choose a tag to compare

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 HTTP
    • hardhat.starknet.devnet.dump - dump a devnet instance via HTTP
    • hardhat.starknet.devnet.getPredeployedAccounts - get accounts predeployed on Devnet

Development related changes

Merged PRs

New Contributors

Full Changelog: v0.6.0...v0.6.1

v0.6.0

28 Jun 09:41
Compare
Choose a tag to compare

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 the StarknetFactory class:
      • const classHash = await contractFactory.declare()
  • 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:
  • 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 to integratedDevnet 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

New Contributors

Full Changelog: v0.5.5...v0.6.0

v0.5.5

26 May 13:59
b854c8f
Compare
Choose a tag to compare

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 configs
  • dockerizedVersion 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

New Contributors

Full Changelog: v0.5.4...v0.5.5

v0.5.4

06 May 13:42
Compare
Choose a tag to compare

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 specifying network: "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

New Contributors

Full Changelog: v0.5.3...v0.5.4

v0.5.3

21 Apr 12:43
Compare
Choose a tag to compare

Usage related changes

  • Adapted to cairo-lang v0.8.1.
  • Introduced --disable-hint-validation flag to the hardhat starknet-compile command:
    • Allows compiling contracts with e.g. printing in hints (useful when executing on Devnet).
  • Introduced --token option to the hardhat 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

New Contributors

  • @LucasLvy made their first contribution in #85

Full Changelog: v0.5.2...v0.5.3

v0.5.2

29 Mar 08:06
Compare
Choose a tag to compare

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 to hardhat starknet-compile to allow compiling contracts.
  • Introduce starknet.getTransaction and starknet.getTransactionReceipt utility functions
  • Support hex strings as contract function input.

Dev changes

  • Refactor
    • Use interact to refer to call/invoke/estimateFee
    • Use classes instead of strings for interaction specification
  • Wallet testing enabled on devnet

Merged PRs

Full Changelog: v0.5.1...v0.5.2

v0.5.1

10 Mar 15:58
Compare
Choose a tag to compare

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 to string

Merged PRs

Full Changelog: v0.5.0...v0.5.1

v0.5.0

10 Mar 09:29
Compare
Choose a tag to compare

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
  • Fix deploying contracts with empty constructors.
  • Remove --starknet-network CLI option from hardhat 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 of starknet in hardhat.config.
  • Return tx hash on StarknetContract.invoke.

Dev specific changes

  • Introduce PR template.
  • Simplify constructor args handling.
  • Improve constructor testing.

Merged PRs

Full Changelog: v0.4.3...v0.5.0

v0.4.3

03 Mar 12:23
Compare
Choose a tag to compare

Usage changes

  • Introduce --starknet-network flag to hardhat test and hardhat 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 and StarknetContract.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

Full Changelog: v0.4.2...v0.4.3