Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Release V0.10.0 #39

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

## [0.10.0] - 2024-10-31

### Changed
- Make faucet transactions async i.e. using `faucet_tx.wait()` to wait for the transaction to be confirmed.
- This will make the SDK more consistent and make faucet transactions more reliable.

## [0.0.9] - 2024-10-29

### Fixed
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ testnet ETH. You are allowed one faucet claim per 24-hour window.
# Fund the wallet with a faucet transaction.
faucet_tx = wallet1.faucet()

# Wait for the faucet transaction to complete.
faucet_tx.wait()

print(f"Faucet transaction successfully completed: {faucet_tx}")
```

Expand Down Expand Up @@ -135,6 +138,9 @@ print(f"Wallet successfully created: {wallet3}")
# Fund the wallet with USDC with a faucet transaction.
usdc_faucet_tx = wallet1.faucet("usdc")

# Wait for the faucet transaction to complete.
usdc_faucet_tx.wait()

print(f"Faucet transaction successfully completed: {usdc_faucet_tx}")

transfer = wallet1.transfer(0.00001, "usdc", wallet3, gasless=True).wait()
Expand Down
2 changes: 1 addition & 1 deletion cdp/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.9"
__version__ = "0.10.0"
5 changes: 4 additions & 1 deletion cdp/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ def faucet(self, asset_id=None) -> FaucetTransaction:

"""
model = Cdp.api_clients.external_addresses.request_external_faucet_funds(
network_id=self.network_id, address_id=self.address_id, asset_id=asset_id
network_id=self.network_id,
address_id=self.address_id,
asset_id=asset_id,
skip_wait=True
)

return FaucetTransaction(model)
Expand Down
12 changes: 11 additions & 1 deletion cdp/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from cdp.client.api.contract_events_api import ContractEventsApi
from cdp.client.api.contract_invocations_api import ContractInvocationsApi
from cdp.client.api.external_addresses_api import ExternalAddressesApi
from cdp.client.api.fund_api import FundApi
from cdp.client.api.networks_api import NetworksApi
from cdp.client.api.onchain_identity_api import OnchainIdentityApi
from cdp.client.api.server_signers_api import ServerSignersApi
Expand Down Expand Up @@ -67,6 +68,8 @@
from cdp.client.models.contract_invocation_list import ContractInvocationList
from cdp.client.models.create_address_request import CreateAddressRequest
from cdp.client.models.create_contract_invocation_request import CreateContractInvocationRequest
from cdp.client.models.create_fund_operation_request import CreateFundOperationRequest
from cdp.client.models.create_fund_quote_request import CreateFundQuoteRequest
from cdp.client.models.create_payload_signature_request import CreatePayloadSignatureRequest
from cdp.client.models.create_server_signer_request import CreateServerSignerRequest
from cdp.client.models.create_smart_contract_request import CreateSmartContractRequest
Expand All @@ -77,10 +80,12 @@
from cdp.client.models.create_wallet_request_wallet import CreateWalletRequestWallet
from cdp.client.models.create_wallet_webhook_request import CreateWalletWebhookRequest
from cdp.client.models.create_webhook_request import CreateWebhookRequest
from cdp.client.models.crypto_amount import CryptoAmount
from cdp.client.models.deploy_smart_contract_request import DeploySmartContractRequest
from cdp.client.models.erc20_transfer_event import ERC20TransferEvent
from cdp.client.models.erc721_transfer_event import ERC721TransferEvent
from cdp.client.models.error import Error
from cdp.client.models.ethereum_token_transfer import EthereumTokenTransfer
from cdp.client.models.ethereum_transaction import EthereumTransaction
from cdp.client.models.ethereum_transaction_access import EthereumTransactionAccess
from cdp.client.models.ethereum_transaction_access_list import EthereumTransactionAccessList
Expand All @@ -91,6 +96,11 @@
from cdp.client.models.fetch_historical_staking_balances200_response import FetchHistoricalStakingBalances200Response
from cdp.client.models.fetch_staking_rewards200_response import FetchStakingRewards200Response
from cdp.client.models.fetch_staking_rewards_request import FetchStakingRewardsRequest
from cdp.client.models.fiat_amount import FiatAmount
from cdp.client.models.fund_operation import FundOperation
from cdp.client.models.fund_operation_fees import FundOperationFees
from cdp.client.models.fund_operation_list import FundOperationList
from cdp.client.models.fund_quote import FundQuote
from cdp.client.models.get_staking_context_request import GetStakingContextRequest
from cdp.client.models.historical_balance import HistoricalBalance
from cdp.client.models.multi_token_contract_options import MultiTokenContractOptions
Expand All @@ -99,7 +109,6 @@
from cdp.client.models.network_identifier import NetworkIdentifier
from cdp.client.models.onchain_name import OnchainName
from cdp.client.models.onchain_name_list import OnchainNameList
from cdp.client.models.onchain_name_text_records_inner import OnchainNameTextRecordsInner
from cdp.client.models.payload_signature import PayloadSignature
from cdp.client.models.payload_signature_list import PayloadSignatureList
from cdp.client.models.read_contract_request import ReadContractRequest
Expand Down Expand Up @@ -128,6 +137,7 @@
from cdp.client.models.staking_reward_format import StakingRewardFormat
from cdp.client.models.staking_reward_usd_value import StakingRewardUSDValue
from cdp.client.models.token_contract_options import TokenContractOptions
from cdp.client.models.token_transfer_type import TokenTransferType
from cdp.client.models.trade import Trade
from cdp.client.models.trade_list import TradeList
from cdp.client.models.transaction import Transaction
Expand Down
1 change: 1 addition & 0 deletions cdp/client/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from cdp.client.api.contract_events_api import ContractEventsApi
from cdp.client.api.contract_invocations_api import ContractInvocationsApi
from cdp.client.api.external_addresses_api import ExternalAddressesApi
from cdp.client.api.fund_api import FundApi
from cdp.client.api.networks_api import NetworksApi
from cdp.client.api.onchain_identity_api import OnchainIdentityApi
from cdp.client.api.server_signers_api import ServerSignersApi
Expand Down
9 changes: 6 additions & 3 deletions cdp/client/api/addresses_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2391,7 +2391,7 @@ def request_faucet_funds(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> FaucetTransaction:
"""Request faucet funds for onchain address.
"""(Deprecated) Request faucet funds for onchain address.

Request faucet funds to be sent to onchain address.

Expand Down Expand Up @@ -2422,6 +2422,7 @@ def request_faucet_funds(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("POST /v1/wallets/{wallet_id}/addresses/{address_id}/faucet is deprecated.", DeprecationWarning)

_param = self._request_faucet_funds_serialize(
wallet_id=wallet_id,
Expand Down Expand Up @@ -2466,7 +2467,7 @@ def request_faucet_funds_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[FaucetTransaction]:
"""Request faucet funds for onchain address.
"""(Deprecated) Request faucet funds for onchain address.

Request faucet funds to be sent to onchain address.

Expand Down Expand Up @@ -2497,6 +2498,7 @@ def request_faucet_funds_with_http_info(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("POST /v1/wallets/{wallet_id}/addresses/{address_id}/faucet is deprecated.", DeprecationWarning)

_param = self._request_faucet_funds_serialize(
wallet_id=wallet_id,
Expand Down Expand Up @@ -2541,7 +2543,7 @@ def request_faucet_funds_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Request faucet funds for onchain address.
"""(Deprecated) Request faucet funds for onchain address.

Request faucet funds to be sent to onchain address.

Expand Down Expand Up @@ -2572,6 +2574,7 @@ def request_faucet_funds_without_preload_content(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("POST /v1/wallets/{wallet_id}/addresses/{address_id}/faucet is deprecated.", DeprecationWarning)

_param = self._request_faucet_funds_serialize(
wallet_id=wallet_id,
Expand Down
Loading
Loading