✨ 🐍 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)
An automated, headless YouTube Uploader

An automated, headless YouTube Uploader Authors: Christian C., Moritz M., Luca S. Related Projects: YouTube Watcher, Twitch Compilation Creator, Neura

127 Dec 23, 2022
VaccineAlarm is a simple python script that allows user to get notified when their desired vaccine doses are available at vaccine centers near them.

Introduction VaccineAlarm is a simple python script that allows user to get notified when their desired vaccine doses are available at vaccine centers

Ankit Tripathi 5 Nov 26, 2021
Diablo II Resurrected helper

Diablo II Resurrected 快捷施法辅助 功能: + 创建守护进程,注册全局热键 alt+/ 启用和关闭功能 (todo: 播放声音提示) + 按 x 强制移动 + 按 1 ~ 0 快捷施法到鼠标区域 使用 编辑配置 settings.py 技能信息做如下定义: SKILLS:

Wan 2 Nov 06, 2022
Python client for Toyota North America service API

toyota-na Python client for Toyota North America service API Install pip install toyota-na[qt] [qt] is required for generating authorization code. Us

Gavin Ni 18 Sep 06, 2022
Nasdaq Cloud Data Service (NCDS) provides a modern and efficient method of delivery for realtime exchange data and other financial information. This repository provides an SDK for developing applications to access the NCDS.

Nasdaq Cloud Data Service (NCDS) Nasdaq Cloud Data Service (NCDS) provides a modern and efficient method of delivery for realtime exchange data and ot

Nasdaq 8 Dec 01, 2022
Leveraged grid-trading bot using CCXT/CCXT Pro library in FTX exchange.

Leveraged-grid-trading-bot The code is designed to perform infinity grid trading strategy in FTX exchange. The basic trader named Gridtrader.py contro

Hao-Liang Wen 25 Oct 07, 2021
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
Python library for RetroMMO related stuff, including API wrapper

python library for RetroMMO related stuff, including API wrapper.

1 Nov 25, 2021
A discord bot for tracking Iranian Minecraft servers and showing the statistics of them

A discord bot for tracking Iranian Minecraft servers and showing the statistics of them

MCTracker 20 Dec 30, 2022
A discord bot to assist you when playing phasmophobia.

phasbot A discord bot to assist you when playing phasmophobia. Add phasbot to your server here! Bot Commands ?help - shows commands ?info [ghost name]

1 Dec 22, 2021
A Python module for communicating with the Twilio API and generating TwiML.

twilio-python The default branch name for this repository has been changed to main as of 07/27/2020. Documentation The documentation for the Twilio AP

Twilio 1.6k Jan 05, 2023
Amazon AWS Web Tool (view only)

Amazon AWS Web Tool (AAWT) discontinued Features Cloudfront (simple) EC2 (With Charts and Prices) EC2 Reserved EBS ELB (With Charts) Obs:. only classi

Carlos Augusto Malucelli 9 Nov 07, 2022
Simple integrate of API musixmatch.com with python

Python Musixmatch Simple integrate of API musixmatch.com with python Quick start $ pip install pymusixmatch or $ python setup.py install Authenticatio

Hudson Brendon 79 Dec 20, 2022
Python client for Arista eAPI

Arista eAPI Python Library The Python library for Arista's eAPI command API implementation provides a client API work using eAPI and communicating wit

Arista Networks EOS+ 124 Nov 23, 2022
An attempt to escape the horrible JIRA editor.

An attempt to escape the horrible JIRA editor. jira_filter.py is a pandoc filter that cleans up some of JIRA's html so that it can be converted to Mar

Stefan Matting 2 Feb 10, 2022
Simple stock price analytics

mune · Mune is an open source python web application built to analyze stocks, named after Homma Munehisa. Currently, the forecasting component is powe

Richard Hong 14 Aug 30, 2021
A python interface for interacting with the Ethereum blockchain and ecosystem.

Web3.py A Python library for interacting with Ethereum, inspired by web3.js. Python 3.6+ support Quickstart Get started in 5 minutes or take a tour of

3.9k Jan 03, 2023
The official Python library for Shodan

shodan: The official Python library and CLI for Shodan Shodan is a search engine for Internet-connected devices. Google lets you search for websites,

John Matherly 2.1k Dec 31, 2022
Discord Token Generator based on HTTPX, makes unverified tokens and automatically joins your server! this is used for memberboosting

Discord Token Generator | 2021 Features: (1) hCaptcha Bypasser, latest hfuck.py Updated by me (2) Free Proxy Support/Scrapper (3) Custom Realistic Dat

2 Nov 30, 2021
⬇️ Telegram Bot to download TikTok videos without watermark in a snap with Inline mode support.

⬇️ Tokmate - Telegram Bot to download TikTok videos ⛲ Features Superfast and supports all type of TikTok links Download any TikTok videos without mate

Hemanta Pokharel 35 Jan 05, 2023