✨ 🐍 Python SDK for StarkNet.

Overview

🐍 starknet.py

StarkNet SDK for Python

codecov pypi build docs license stars starkware

📘 Documentation

Installation

To install this package run

pip install starknet.py

or using Poetry:

poetry add starknet.py

▶️ Example usage

Asynchronous API

This is the recommended way of using the SDK.

from starknet.contract import Contract
from starknet.net.client import Client

key = 1234
contract = await Contract.from_address("0x01336fa7c870a7403aced14dda865b75f29113230ed84e3a661f7af70fe83e7b", Client("testnet"))
invocation = await contract.functions["set_value"].invoke(key, 7)
await invocation.wait_for_acceptance()

(saved,) = await contract.functions["get_value"].call(key) # (7)

Synchronous API

You can access synchronous world with _sync postfix.

from starknet.contract import Contract
from starknet.net.client import Client

key = 1234
contract = Contract.from_address_sync("0x01336fa7c870a7403aced14dda865b75f29113230ed84e3a661f7af70fe83e7b", Client("testnet"))
invocation = contract.functions["set_value"].invoke_sync(key, 7)
invocation.wait_for_acceptance_sync()

(saved,) = contract.functions["get_value"].call_sync(key) # 7

See more here.

Comments
  • [BUG] `estimate_fee_sync` always fails with `TRANSACTION_FAILED`

    [BUG] `estimate_fee_sync` always fails with `TRANSACTION_FAILED`

    Python version

    3.9.12

    Expected Behavior

    estimate_fee_sync should successfully complete

    Current Behavior

    It returns the following error:

    {"code": "StarknetErrorCode.TRANSACTION_FAILED", "message": "Error at pc=0:392:\nUnknown value for memory cell at address 12:0.\nCairo traceback (most recent call last):\nUnknown location (pc=0:534)\nUnknown location (pc=0:468)"}
    

    Possible Solution

    Steps to Reproduce

    (nonce,) = keeper_contract.functions["get_nonce"].call_sync()
    task_address_felt = int(task["address"], 16)
    args, signature = get_account_message_args_sig(keeper_address, registry, "executeTask", [task_address_felt], nonce, key)
    unsigned_invocation = keeper_contract.functions["execute"].prepare(*args)
    
    # This is where the error occurs
    estimation = unsigned_invocation.estimate_fee_sync()
    
    # This normally runs perfectly fine if I don't do gas estimation for all these transactions that are failing with `estimate_fee`
    invocation = unsigned_invocation.invoke_sync(signature=signature, max_fee=0)
    

    FYI - I'm using an older version of an account contract to issue transactions but I'm assuming that this should not impact estimate fee as the other starknet.py apis are working fine?

    Context (Environment)

    I've been using the excellent starknet.py library to power Yagi Keepers (http://www.yagi.fi/automation). I'm trying to upgrade keepers now to use fees on testnet before they are officially mandated.

    Detailed Description

    Possible Implementation

    question 
    opened by Pet3ris 11
  • Parametrize the contract you can use `AccountClient.create_account`

    Parametrize the contract you can use `AccountClient.create_account`

    Is your feature request related to a problem? Please describe. It is not a problem, but I like the transaction management and private key establishment that happens in this method however it is limited to the OZ contract. It would be nice to be able to allow the user to specify any contract to use here (and have it default to the OZ one).

    Describe the solution you'd like Allow the user to specify a separate contract to use in AccountClient.create_account()

    Describe alternatives you've considered Implement outside of lib.

    Additional context Add any other context or screenshots about the feature request here.

    enhancement question 
    opened by unparalleled-js 11
  • Fix result selector on Custom RPC call

    Fix result selector on Custom RPC call

    Please check if the PR fulfills these requirements

    • [x] The formatter, linter, and tests all run without an error
    • [x] Tests for the changes have been added (for bug fixes/features)
    • [x] Docs have been added / updated (for bug fixes / features)

    What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

    Bug Fix on Custom RPC call results -> starknet_call

    • What is the current behavior? (You can also link to an open issue here)

    Calling starknet_call will always result into a TypeError as we check twice "result" key

    What is the new behavior (if this is a feature change)?

    starknet_call is now working.

    Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

    No

    Other information

    opened by ExoMonk 7
  • [BUG] The CairoSerializer cannot handle names starting with a underscore

    [BUG] The CairoSerializer cannot handle names starting with a underscore

    I've a Cairo contract using names starting with a underscore. And using the FunctionCallSerializer for get back data from Cairo to Python (to decode transactions return data) will raise:

    ValueError: Field names cannot start with an underscore: '_name`
    

    It's a namedtuple limitation, from here: https://github.com/software-mansion/starknet.py/blob/36acd9f75e189b94a75ac413f99e72984d1e3121/starknet_py/utils/data_transformer/data_transformer.py#L207-L209

    Python version

    All.

    Expected Behavior

    Names starting with a underscore should not be a problem.

    Current Behavior

    ValueError: Field names cannot start with an underscore: '_name`
    

    Possible Solution

    1. We could use the rename kwargs from the namedtuple, but will would loose the real name then.
    2. An idea using dataclasses, but we would then loose the tuple comparison (which is mandatory to keep):
     from dataclasses import make_dataclass
    
     # instead of the namedtuple:
     result = make_dataclass("Result", [(k, v) for k, v in ...], order=True, frozen=True, slots=True)
    
    1. :heart_decoration: https://github.com/ksamuel/drecord

    Steps to Reproduce

    1. Use a name starting with a underscore, in any Cairo method.
    2. Use FunctionCallSerializer.to_python().
    3. See the exception.

    Context (Environment)

    The issue is quite big, because we're using the FunctionCallSerializer in the Ape StarkNet plugin to decode transactions return data. The goal is to leverage all the fantastic work you've already done to decode all kind of data types (like arrays, and custom complex structs).

    Detailed Description

    Possible Implementation

    I like the 3rd idea. If you think it's something you would like to implement, I could give a try.

    bug 
    opened by ca11ab1e 7
  • Token parameter in gateway client

    Token parameter in gateway client

    Please check if the PR fulfills these requirements

    • [x] The formatter, linter, and tests all run without an error
    • [ ] Tests for the changes have been added (for bug fixes/features)
    • [ ] Docs have been added / updated (for bug fixes / features)

    What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

    (closes #253 )

    • What is the current behavior? (You can also link to an open issue here)

    What is the new behavior (if this is a feature change)?

    Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

    Other information

    opened by war-in 7
  • invoke_sync method throws an error

    invoke_sync method throws an error

    Hello, I am trying to run below snippet, it is throwing an error.

    from starknet_py.contract import Contract from starknet_py.net.client import Client client = Client("testnet") contract_address = "0x01336fa7c870a7403aced14dda865b75f29113230ed84e3a661f7af70fe83e7b" key = 12345678 contract = Contract.from_address_sync(contract_address, client) invocation = contract.functions["set_value"].invoke_sync(key, 7, max_fee=500) invocation.wait_for_acceptance_sync()

    _Got BadRequest while trying to access https://alpha4.starknet.io/gateway/add_transaction. Status code: 500; text: {"code": "StarknetErrorCode.UNSUPPORTED_SELECTOR_FOR_FEE", "message": "All transactions should go through the execute entrypoint."}. Traceback (most recent call last): File "/home/iodishar/.local/lib/python3.8/site-packages/services/external_api/client.py", line 121, in _send_request raise BadRequest(status_code=response.status, text=text) services.external_api.client.BadRequest: HTTP error ocurred. Status: 500. Text: {"code": "StarknetErrorCode.UNSUPPORTED_SELECTOR_FOR_FEE", "message": "All transactions should go through the execute entrypoint."} Traceback (most recent call last): File "app/test.py", line 10, in invocation = contract.functions["set_value"].invoke_sync(key, 7, max_fee=500) File "/home/iodishar/.local/lib/python3.8/site-packages/starknet_py/utils/sync/sync.py", line 15, in impl return sync_fun(*args, **kwargs) File "/home/iodishar/.local/lib/python3.8/site-packages/asgiref/sync.py", line 218, in call return call_result.result() File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result return self.__get_result() File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result raise self._exception File "/home/iodishar/.local/lib/python3.8/site-packages/asgiref/sync.py", line 284, in main_wrap result = await self.awaitable(*args, **kwargs) File "/home/iodishar/.local/lib/python3.8/site-packages/starknet_py/contract.py", line 354, in invoke return await prepared_call.invoke(max_fee=max_fee, auto_estimate=auto_estimate) File "/home/iodishar/.local/lib/python3.8/site-packages/starknet_py/contract.py", line 241, in invoke response = await self._client.add_transaction(tx=tx) File "/home/iodishar/.local/lib/python3.8/site-packages/starknet_py/net/client.py", line 248, in add_transaction return await self._gateway.add_transaction(tx, token) File "/home/iodishar/.local/lib/python3.8/site-packages/starkware/starknet/services/api/gateway/gateway_client.py", line 16, in add_transaction raw_response = await self._send_request( File "/home/iodishar/.local/lib/python3.8/site-packages/services/external_api/client.py", line 121, in send_request raise BadRequest(status_code=response.status, text=text) services.external_api.client.BadRequest: HTTP error ocurred. Status: 500. Text: {"code": "StarknetErrorCode.UNSUPPORTED_SELECTOR_FOR_FEE", "message": "All transactions should go through the execute entrypoint."}

    opened by iraklio 7
  • feat: add gas_price to GatewayBlock

    feat: add gas_price to GatewayBlock

    Please check if the PR fulfills these requirements

    • [x] The formatter, linter, and tests all run without an error
    • [x] Tests for the changes have been added (for bug fixes/features)
    • [x] Docs have been added / updated (for bug fixes / features)

    What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

    • Adds gas_price to blocks from the Starknet gateway.

    • What is the current behavior? (You can also link to an open issue here)

    gas_price is not available even though it is present in the Gateway block response.

    What is the new behavior (if this is a feature change)?

    Now, when using the gateway client, you have access to the gas price from the block schema

    Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

    No breaking change.

    Other information

    Previous PR was closed because it got stale. Sorry about that!

    opened by unparalleled-js 6
  • Show rejection reason in exception

    Show rejection reason in exception

    Is your feature request related to a problem? Please describe.

    I am unable to make useful assertions on rejection reasons because the exception that gets raised in a generic exception that does not reveal any of the information.

    Describe the solution you'd like

    In client.wait_for_tx(), raise a custom error TransactionRejected(result["message"]) that includes that failure reason from the result.

    Describe alternatives you've considered

    Implementing a custom wait_for_tx().

    Additional context

    I was failing to sign a transaction correctly but the error message was not telling me that. I had to set a breakpoint in the lib to find out the details of the failure.

    enhancement 
    opened by unparalleled-js 5
  • chore: upgrade web.py and adjust supported python 3.7 range

    chore: upgrade web.py and adjust supported python 3.7 range

    Please check if the PR fulfills these requirements

    • [ ] The formatter, linter, and tests all run without an error
    • [ ] Tests for the changes have been added (for bug fixes/features)
    • [ ] Docs have been added / updated (for bug fixes / features)

    What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

    update web3.py

    • What is the current behavior? (You can also link to an open issue here) fixes: #91

    What is the new behavior (if this is a feature change)?

    Using latest web3.py

    Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

    The user may need to upgrade any logic related to older web3.py (though I am not sure what that would be, likely, it will be dealing with dependency related issues).

    Other information

    I am not sure how to test locally because I think the development branch is assuming unreleased changes to cairo-lang; correct me if I am wrong, please. I have not figured out how to get a working development environment for cairo-lang (and I really don't need to, for the most part).

    opened by unparalleled-js 5
  • Add TupleDataclass

    Add TupleDataclass

    About

    In data_transformer module we return Result class and pretend it is a NamedTuple. This can lead to some unexpected behaviour.

    The most important feature of NamedTuple is that it can be used both as tuple and a regular object. By using dataclasses with __getitem__ and __iter__ we can replicate this behaviour.

    Differences

    The differences with previous implementation:

    • No _asdict method
    • Comparison with tuple will return False I am wondering if we should support these two 🤔 Let me know what you think.

    I also added 2 utility functions: as_tuple and as_dict to make sure the most popular flows are covered out of the box.

    Cool things

    In the future when doing https://github.com/software-mansion/starknet.py/issues/492 we can easily subclass TupleDataclass to provide strict typing 🔥

    Other solutions

    To be honest ideally I would just switch to using dicts as returned values from functions, but we would be missing spreading values like this: x, y = result. It would be a big breaking change and would make quality of life worse. I think using simple dataclasses is nice compromise: we rely on solid, well known implementation and offer some simplifications.

    Related issues

    Closes https://github.com/software-mansion/starknet.py/issues/589.

    opened by Solpatium 4
  • [BUG] Outdated code examples in README

    [BUG] Outdated code examples in README

    What happened

    The code examples in readme, showing the use of async and sync api:

    • create Client instance which is now an abstract class
    • do not use an account, making invoke throw an error

    Probably the best solution would be to use only call and call_sync in the examples as they don't require an account.

    Stack trace

    Steps to reproduce

    SDK Version

    0.11.0-alpha

    Python version

    3.8.4

    What operating system are you using?

    Mac

    Is there an existing issue for this?

    • [ ] I have searched the existing issues and verified no issue exits for this problem.
    bug 
    opened by drknzz 4
  • Make Compiler module pending deprecation

    Make Compiler module pending deprecation

    Closes #635

    Introduced changes

    • Adds pending deprecation warnings to Compiler module and methods with compilation_source.
    • Removes the usage of Compiler in docs.

    • [ ] This PR contains breaking changes
    opened by cptartur 1
  • Benchmark crypto-cpp

    Benchmark crypto-cpp

    Feature Request

    We would like to use more cryptography from the crypto-cpp library. If the results will be promising we will probably use crypto-cpp to replace some functions:

    • private_to_stark_key
    • verify
    • sign
    • pedersen_hash
    question 
    opened by war-in 1
  • Refresh Contributing Guide

    Refresh Contributing Guide

    Closes #627

    Introduced changes

    • create a more descriptive Contributing Guide with a Table Of Contents for quick reference.

    • [ ] This PR contains breaking changes
    opened by drknzz 1
Releases(0.12.0-alpha)
  • 0.12.0-alpha(Dec 7, 2022)

    StarkNet.py has been updated to support cairo-lang 0.10.3 and also supports Testnet2!

    What's Changed

    • Added TESTNET2 predefined network
    • Replaced cairo-lang StarknetChainId with our implementation
    • Added StarknetChainId.TESTNET2

    For details, see the migration guide.

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.11.0-alpha...0.12.0-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.11.0-alpha(Dec 5, 2022)

    The Deploy transaction was officially blocked! The new version of StarkNet.py is here to help you with the new deployment flow 🔥

    What's Changed

    • Deploy transaction is removed from the library 😢 But can be fetched from the old blocks!
    • Since now we recommend using Invoke instead of InvokeFunction
    • PreparedFunctionCall.estimate_fee does not throw an error when max_fee is set
    • Improvements in the documentation (all available methods are present in the API section)

    Please read through the Migration Guide to be up to date with the API changes!

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.10.2-alpha...0.11.0-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.10.2-alpha(Nov 28, 2022)

    What's Changed

    • Update cairo-lang to 0.10.2 by @drknzz in https://github.com/software-mansion/starknet.py/pull/536
    • estimate_fee_bulk method was added to the GatewayClient

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.10.1-alpha...0.10.2-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.10.1-alpha(Nov 23, 2022)

    What's Changed

    • Fix RPC deploy schema by @cptartur in https://github.com/software-mansion/starknet.py/pull/531

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.10.0-alpha...0.10.1-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.10.0-alpha(Nov 21, 2022)

    What's Changed

    • Universal Deployer Contract is supported! 🎆
    • abi is returned from the Client.get_class_by_hash()
    • Contract.from_address() supports FullNodeClient 🔥
    • Simplified deployment flow was introduced. Read about it in the Guide
    • RPC 0.2.1 is supported!
    • ContractNotFoundError was improved

    Make sure to be familiar with the Deploying contracts section

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.9.0-alpha...0.10.0-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.9.0-alpha(Nov 14, 2022)

    What's Changed

    • RPC 0.2.0 🎉
    • Resolving proxies (check out the guide)
    • Account.sign_transaction and InvokeFunction as a call_contract parameter were removed

    Make sure to read through 0.9.0 Migration guide to be up to date with the changes!

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.8.0-alpha...0.9.0-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.8.0-alpha(Oct 24, 2022)

    The new version of StarkNet.py is here to support StarkNet 0.10.1 fully 🔥

    What's Changed

    • DeployAcount transaction can be used 🎆
    • Deploy transaction is deprecated
    • There is a new Account creation section in the docs

    Read through the 0.8.0 Migration guide to be up to date with breaking changes!

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.7.0-alpha...0.8.0-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.7.0-alpha(Oct 18, 2022)

    New version of StarkNet.py is out, bringing initial support for StarkNet 0.10.1. All existing functionalities of StarkNet.py should work with this update, and new features related to changes from StarkNet 0.10.1 is coming at a later date.

    Breaking Changes

    • InvokeTransaction.entry_point_selector has been changed from int to Optional[int] to reflect the changes in StarkNet gateway

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.6.3-alpha...0.7.0-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.6.3-alpha(Oct 14, 2022)

    What's Changed

    • Test and fix HttpClient custom session by @cptartur in https://github.com/software-mansion/starknet.py/pull/414
    • Support L1_HANDLER transactions in GatewayClient by @cptartur in https://github.com/software-mansion/starknet.py/pull/452

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.6.2-alpha...0.6.3-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.6.2-alpha(Oct 3, 2022)

    What's Changed

    • Add older macOS SDK targets for crypto-cpp-py by @THenry14 in https://github.com/software-mansion/starknet.py/pull/411

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.6.1-alpha...0.6.2-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.6.1-alpha(Sep 29, 2022)

    New version of Starknet.py:

    • adds custom exceptions for the CairoSerializer (CairoSerializerException is a general exception)
    • deprecates get_code method in the AccountClient
    • adds the gas_price field to the StarknetBlock returned by GatewayClient (GatewayBlock)
    • updates the docs:
      • adds information about AccountClient's supported_tx_version to the Quickstart
      • adds the Declaring contracts section to the Guide
      • removes outdated FullNodeClient info

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.6.0-alpha...0.6.1-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.6.0-alpha(Sep 15, 2022)

    What's Changed

    • Signing and verifying messages! (read the docs about it)
    • Deprecated chain property of all Clients was removed!
    • CairoSerializer.to_python checks range of Felt now
    • signature parameter was removed from Contract.call and similar methods
    • TransactionReceipt does not include deprecated version field

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.5.1-alpha...0.6.0-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.5.2-alpha(Sep 8, 2022)

    What's Changed

    • Fix result selector on Custom RPC call by @ExoMonk in https://github.com/software-mansion/starknet.py/pull/358

    New Contributors

    • @ExoMonk made their first contribution in https://github.com/software-mansion/starknet.py/pull/358

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.5.1-alpha...0.5.2-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.5.1-alpha(Sep 6, 2022)

    This version fixes problems with package release. No usage-related changes were introduced.

    What's Changed

    • Fix package release by @Solpatium in https://github.com/software-mansion/starknet.py/pull/355

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.5.0-alpha...0.5.1-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.5.0-alpha(Sep 5, 2022)

    New version of StarkNet.py has been released bringing support for new StarkNet features including:

    • signing declare transactions
    • new cairo syntax,
    • transaction version 1

    Please note however that old accounts and transaction versions will still work with previous StarkNet.py version, and update is not needed.

    See our migration guide for more informations about this release.

    What's Changed

    • Cairo 0.10.0 support by @Solpatium @cptartur @war-in @drknzz in https://github.com/software-mansion/starknet.py/pull/328
    • v0.5.0-alpha by @cptartur in https://github.com/software-mansion/starknet.py/pull/352
    • Update migration guide by @cptartur in https://github.com/software-mansion/starknet.py/pull/353

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.4.7-alpha...0.5.0-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.4.7-alpha(Aug 30, 2022)

    What's Changed

    • Exception is raised when too many values are passed to CairoSerializer.to_python
    • v0.1.0 RPC specification is supported!

    New Contributors

    • @Radinyn made their first contribution in https://github.com/software-mansion/starknet.py/pull/323

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.4.6-alpha...0.4.7-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.4.6-alpha(Aug 18, 2022)

    What's Changed

    • Proxy checks are updated and tested
    • AccountClient.get_transaction method's return value is correctly typed
    • CairoSerializer checks if unnecessary named arguments are passed
    • GatewayClient and FullNodeClient can be correctly created without the chain parameter

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.4.5-alpha...0.4.6-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.4.5-alpha(Aug 8, 2022)

    What's Changed

    • Cairo Transformer's result has repr method
    • GatewayClient can take dict with feeder_gateway_url and gateway_url as net parameter
    • The chain property in the Client interface is deprecated

    How to migrate

    • Remove chain parameter from Gateway and Full Node Clients constructors
    • Add chain parameter to AccountClient constructor and AccountClient.create_account method

    There are no breaking changes, so no action is required, but it is suggested to apply the above instructions.

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.4.4-alpha...0.4.5-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.4.4-alpha(Aug 1, 2022)

    What's Changed

    • block_number parameter is "pending" for the default
    • ContractNotFoundError in GatewayClient.get_code method has more significant message

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.4.3-alpha...0.4.4-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.4.3-alpha(Jul 29, 2022)

    What's Changed

    • Support for RPC write API
    • TransactionReceipt contains propper rejection_reason and actual_fee

    New Contributors

    • @drknzz made their first contribution in https://github.com/software-mansion/starknet.py/pull/267

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.4.2-alpha...0.4.3-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.4.2-alpha(Jul 25, 2022)

    What's Changed

    • Return types in transformed abis now support underscores 🎉

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.4.1-alpha...0.4.2-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.4.1-alpha(Jul 21, 2022)

    What's Changed

    • Cairo 0.9.1 support
    • Updated migration guide & docs
    • Restored token parameter for gateway client

    New Contributors

    Special thanks to @ca11ab1e for his contributions! Much appreciated 👍

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.4.0-alpha...0.4.1-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.4.0-alpha(Jul 15, 2022)

    What's Changed

    • Full node support! 🎉 Check out the guide in the docs for more
    • Multicall support for transactions
    • And some bugfixes/smaller features

    WARNING ⚠️ - This release includes some breaking changes (mainly in Client APIs) - please read through the migration guide for details on how to migrate to this version.

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.3.4-alpha...0.4.0-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.3.4-alpha(Jun 23, 2022)

    What's Changed

    • Add signature parameter to estimate_fee by @cptartur in https://github.com/software-mansion/starknet.py/pull/217
    • Improve signer related docs by @cptartur in https://github.com/software-mansion/starknet.py/pull/215

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.3.3-alpha...0.3.4-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.3.3-alpha(Jun 22, 2022)

    This versions improves estimate_fee behavior by adding a default block_number="pending" parameter that should result in more accurate fee estimations. It also fixes AccountClient behavior when used with account contracts that are using proxies.

    What's Changed

    • Rollback pylint to 2.13.5, remove duplicate-code warning by @cptartur in https://github.com/software-mansion/starknet.py/pull/209
    • estimate_fee updated by @war-in in https://github.com/software-mansion/starknet.py/pull/205
    • Hot fix for using "get_code" in add_transaction by @war-in in https://github.com/software-mansion/starknet.py/pull/211
    • migration guide deleted and guide updated by @war-in in https://github.com/software-mansion/starknet.py/pull/210
    • v0.3.3-alpha by @war-in in https://github.com/software-mansion/starknet.py/pull/214

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.3.2-alpha...0.3.3-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.3.2-alpha(Jun 15, 2022)

    This version brings support for new declare method, as well as fixes related to typing in the whole library. It also brings initial work on separation of AccountClient from message Signer.

    What's Changed

    • Change dependency source by @Arcticae in https://github.com/software-mansion/starknet.py/pull/196
    • Remove errors in whole codebase by @cptartur in https://github.com/software-mansion/starknet.py/pull/185
    • Use BaseSigner in AccountClient, add default KeypairSigner by @cptartur in https://github.com/software-mansion/starknet.py/pull/182
    • Use pylint 2.14.1 by @cptartur in https://github.com/software-mansion/starknet.py/pull/202
    • New declare method by @war-in in https://github.com/software-mansion/starknet.py/pull/178
    • Add new methods by @cptartur in https://github.com/software-mansion/starknet.py/pull/183
    • v0.3.2-alpha by @cptartur in https://github.com/software-mansion/starknet.py/pull/206

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.3.1-alpha...0.3.2-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.3.1-alpha(Jun 10, 2022)

    What's changed

    • Provide a fix for the security issue https://github.com/OpenZeppelin/cairo-contracts/issues/344 within our AccountClient contract
    Source code(tar.gz)
    Source code(zip)
  • 0.3.0-alpha(Jun 9, 2022)

    What's Changed

    • Use pending instead of latest as a default block parameter
    • Add is_account_contract parameter to compiler
    • Add deploy transaction version parameters
    • Enable warnings if max fee is set to zero
    • Bump cairo-lang to 0.9.0

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.2.5-alpha...0.3.0-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.2.5-alpha(Jun 3, 2022)

    What's Changed

    • Remove wheel packaging by @THenry14 in https://github.com/software-mansion/starknet.py/pull/168
    • Add checklist for releasing new starknet.py versions by @cptartur in https://github.com/software-mansion/starknet.py/pull/167
    • Two more tests for estimate fee by @war-in in https://github.com/software-mansion/starknet.py/pull/166
    • Update crypto-cpp-py by @THenry14 in https://github.com/software-mansion/starknet.py/pull/172
    • Add mac wheels for crypto-cpp-py to lock file by @THenry14 in https://github.com/software-mansion/starknet.py/pull/184
    • v0.2.5-alpha by @Arcticae in https://github.com/software-mansion/starknet.py/pull/186

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.2.4-alpha...0.2.5-alpha

    Source code(tar.gz)
    Source code(zip)
  • 0.2.4-alpha(May 25, 2022)

    This release brings long awaited updates to the documentation as well as improvements and fixes to APIs including:

    • fix for fee estimation in AccountClient
    • proxy support in Contract.from_address
    • support for checking balance in starknet token bridge using AccountClient
    • improved quick-start guide

    Proxy support

    Contract.from_address now support resolving proxies, with out of the box support for Argent and OpenZeppelin proxy format (see docs on how to add custom proxies). Just pass a proxy_config=True to use default proxy resolving:

    await contract = Contract.from_address("0x1234", client=client, proxy_config=True)
    

    or use with custom proxies:

    class CustomProxy(ProxyConfig):
        async def is_proxy(self, contract: "Contract") -> bool:
            ...
    
        async def implementation_address(self, contract: "Contract") -> int:
            ...
    
    
    proxy = CustomProxy()
    await contract = Contract.from_address("0x1234", client=client, proxy_config={"proxy_checks": [proxy]})
    

    What's Changed

    • Quickstart and guide update by @war-in in https://github.com/software-mansion/starknet.py/pull/140
    • Contract.from_address proxy support by @cptartur in https://github.com/software-mansion/starknet.py/pull/135
    • Add parameter for changing between testnet and devnet in e2e tests by @cptartur in https://github.com/software-mansion/starknet.py/pull/143
    • Fix parallel tests by @cptartur in https://github.com/software-mansion/starknet.py/pull/151
    • Move crypto-cpp to separate package by @THenry14 in https://github.com/software-mansion/starknet.py/pull/153
    • get_balance for account_client by @war-in in https://github.com/software-mansion/starknet.py/pull/150
    • Update the way of creating account client in tests by @war-in in https://github.com/software-mansion/starknet.py/pull/157
    • Fail checks if documentation fails by @war-in in https://github.com/software-mansion/starknet.py/pull/162
    • Bug/estimate fee for account client by @war-in in https://github.com/software-mansion/starknet.py/pull/164

    New Contributors

    • @THenry14 made their first contribution in https://github.com/software-mansion/starknet.py/pull/153

    Full Changelog: https://github.com/software-mansion/starknet.py/compare/0.2.3-alpha...0.2.4-alpha

    Source code(tar.gz)
    Source code(zip)
Running Performance Calculator

Running Performance Calculator 👉 Have you ever wondered if you ran 10km at 2000

Davide Liu 6 Oct 26, 2022
❄️ Don't waste your money paying for new tokens, once you have used your tokens, clean them up and resell them!

TokenCleaner Don't waste your money paying for new tokens, once you have used your tokens, clean them up and resell them! If you have a very large qua

0xVichy 59 Nov 14, 2022
Jira-cache - Jira cache with python

Direct queries to Jira have two issues: they are sloooooow many queries are impo

John Scott 6 Oct 08, 2022
Wordy is a Wordle-like Discord bot but with a twist.

Wordy Discord Bot Wordy is a Wordle-like Discord bot but with a twist. It already supports 6 languages from the beginning: English, Italian, French, G

The Coding Channel 2 Sep 06, 2022
Python package for agilex robotics mobile base platform

This is Python API for Agilex Robotics Mobile base This is a python API for Can communication with Agilex Robotics Mobile base and controlling it. Sup

7 Sep 06, 2022
Configure your linux server and check for vulnerabilities with serverlla

serverlla Configure your linux server and check for vulnerabilities with serverlla. Serverlla has a menu with options and allows you to configure your

Dylan Meca 10 Feb 01, 2022
🦈 Blahaj is a discord bot that shares random images of himself on discord.

🦈 Blahaj Bot Blahaj is a discord bot that shares random images of himself on discord. ⚙️ Developer's Guide To use the bot, follow along the steps Hea

Atul Anand 3 Oct 21, 2022
CyberTKR - CyberTK-API

CyberTKR - CyberTK-API

TKR 2 Apr 08, 2022
Ma2tl - macOS forensic timeline generator using the analysis result DBs of mac apt

ma2tl (mac_apt to timeline) This is a DFIR tool for generating a macOS forensic

Minoru Kobayashi 66 Nov 18, 2022
Cogs version of iso6.9 with the help of thatOneArchUser

iso6.9-cogs (debloated) This is a cogs version of iso6.9 by αrchιshα#5518. iso6.9 is a Discord bot written in Python and is used to make your Discord

Kamilla Youver 2 Jun 10, 2022
QuickStart specific rules for cfn-python-lint

AWS Quick Start cfn-lint rules This repo provides CloudFormation linting rules specific to AWS Quick Start guidelines, for more information see the Co

AWS Quick Start 12 Jul 30, 2022
A MassDM selfbot which is working in 2021

mass-dm-discord - Little preview of the Logger and the Spammer Features Logging User IDS Sending DMs to the logged IDs Blacklist IDs (add the ID of th

karma.meme 88 Dec 26, 2022
Get informed when your DeFI Earn CRO Validator is jailed or changes the commission rate.

CRO-DeFi-Warner Intro CRO-DeFi-Warner can be used to notify you when a validator changes the commission rate or gets jailed. It can also notify you wh

5 May 16, 2022
🔎 Hunt down social media accounts by username across social networks

Hunt down social media accounts by username across social networks Installation | Usage | Docker Notes | Contributing Installation # clone the repo $

Sherlock 38.2k Jan 01, 2023
Automatically pulls specified repository whenever a specified file is pushed. Great for working collaboratively when you need to run something locally.

autopull Simple python tool that allows you to automatically pull from a github repository whenever a file with a specified name is uploaded installat

carreb 0 Sep 27, 2022
Python client for the LightOn Muse API

lightonmuse Python bindings to production-ready intelligence primitives powered by state-of-the-art language models. Create. Process. Understand. Lear

LightOn 12 Apr 10, 2022
Telegram Remote Administration Tool

Telegram Remote Administration Tool DISCLAIMER | Telegram Remote Administration Tool can only be used at your PC. Do not be evil! Читайте на Русском |

13 Nov 12, 2022
Fully automated Chegg Discord bot for "homework help"

cheggbog Fully automated Chegg Discord bot for "homework help". Working Sept 15, 2021 Overview Recently, Chegg has made it extremely difficult to auto

Bryce Hackel 8 Dec 23, 2022
Python script to backup/convert your Spotify playlists into the XSPF format.

Python script to backup/convert your Spotify playlists into the XSPF format.

Chris Ovenden 4 Jun 09, 2022
批量下载抖音无水印视频

版权说明 本项目fork自Johnserf-Seed TikTokDownload。目的是为了增加个性化的功能,若想体验更多完善的功能请支持原作者的项目。 免责声明 本代码仅用于学习,下载后请勿用于商业用途。 环境要求 请检查宿主机,是否安装了python环境,并且配置了环境变量 pytho

Zhiwu Mao 44 Dec 28, 2022