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

update to 2.4.4 and remove python 3.8 #213

Merged
merged 3 commits into from
Oct 17, 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
5 changes: 2 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
- name: macOS
matrix: macos
runs-on:
intel: macos-12
arm: [macos, arm64]
intel: macos-13
arm: macos-13-arm64
- name: Windows
matrix: windows
runs-on:
Expand All @@ -40,7 +40,6 @@ jobs:
- name: Intel
matrix: intel
python:
- major_dot_minor: "3.8"
- major_dot_minor: "3.9"
- major_dot_minor: "3.10"
- major_dot_minor: "3.11"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
python3 -m venv venv
if [[ ${{ matrix.os.runs-on }} == windows-latest ]]; then
source ./venv/Scripts/activate
python -m pip install --upgrade pip
else
. ./venv/bin/activate
fi
Expand Down
16 changes: 9 additions & 7 deletions chianft/util/mint.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from chia.consensus.default_constants import DEFAULT_CONSTANTS
from chia.rpc.full_node_rpc_client import FullNodeRpcClient
from chia.rpc.wallet_request_types import NFTMintBulkResponse
from chia.rpc.wallet_rpc_client import WalletRpcClient
from chia.types.blockchain_format.coin import Coin
from chia.types.blockchain_format.program import INFINITE_COST
Expand Down Expand Up @@ -136,7 +137,7 @@ async def create_spend_bundles(
assert royalty_percentage is not None
assert royalty_address is not None
for i in range(0, mint_total, chunk):
resp = await self.wallet_client.nft_mint_bulk(
resp: NFTMintBulkResponse = await self.wallet_client.nft_mint_bulk(
wallet_id=self.nft_wallet_id,
metadata_list=metadata_list[i : i + chunk],
target_list=target_list[i : i + chunk],
Expand All @@ -151,12 +152,12 @@ async def create_spend_bundles(
mint_from_did=mint_from_did,
tx_config=DEFAULT_TX_CONFIG,
)
if not resp["success"]:
if not resp:
raise ValueError(
"SpendBundle could not be created for metadata rows: %s to %s"
% (i, i + chunk)
)
sb = SpendBundle.from_json_dict(resp["spend_bundle"])
sb = resp.spend_bundle
spend_bundles.append(bytes(sb))
next_coin = [
c for c in sb.additions() if c.puzzle_hash == funding_coin.puzzle_hash
Expand Down Expand Up @@ -223,7 +224,7 @@ async def add_fee_to_spend(
return spend, 0
total_fee = sb_cost * (fee_per_cost * attempt)
print("Fee for inclusion: {}".format(total_fee))
fee_tx = await self.wallet_client.create_signed_transaction(
fee_tx = await self.wallet_client.create_signed_transactions(
additions=[
{
"amount": fee_coin.amount - total_fee,
Expand All @@ -234,8 +235,8 @@ async def add_fee_to_spend(
fee=uint64(total_fee),
tx_config=DEFAULT_TX_CONFIG,
)
assert fee_tx.spend_bundle is not None
spend_with_fee = SpendBundle.aggregate([fee_tx.spend_bundle, spend])
assert fee_tx.signed_tx.spend_bundle is not None
spend_with_fee = SpendBundle.aggregate([fee_tx.signed_tx.spend_bundle, spend])
return spend_with_fee, total_fee

async def sb_in_mempool(self, sb_name: bytes32) -> bool:
Expand Down Expand Up @@ -365,11 +366,12 @@ async def create_offer(
}
for i in range(10):
try:
offer, tr = await self.wallet_client.create_offer_for_ids(
offer_resp = await self.wallet_client.create_offer_for_ids(
offer_dict,
fee=0,
tx_config=DEFAULT_TX_CONFIG,
)
offer = offer_resp.offer
filepath = "offers/{}.offer".format(launcher_id)
assert offer is not None
with open(Path(filepath), "w") as file:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
long_description = fh.read()

dependencies = [
"chia-blockchain==2.4.2",
"chia-blockchain==2.4.4",
]

dev_dependencies = [
Expand Down Expand Up @@ -44,9 +44,9 @@
long_description_content_type="text/markdown",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: Apache Software License",
"Topic :: Security :: Cryptography",
],
Expand Down