Skip to content

Commit 75164b9

Browse files
authored
Merge pull request #213 from Chia-Network/update_244
update to 2.4.4 and remove python 3.8
2 parents d219b7b + b443f9c commit 75164b9

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

.github/workflows/pre-commit.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
- name: macOS
2929
matrix: macos
3030
runs-on:
31-
intel: macos-12
32-
arm: [macos, arm64]
31+
intel: macos-13
32+
arm: macos-13-arm64
3333
- name: Windows
3434
matrix: windows
3535
runs-on:
@@ -40,7 +40,6 @@ jobs:
4040
- name: Intel
4141
matrix: intel
4242
python:
43-
- major_dot_minor: "3.8"
4443
- major_dot_minor: "3.9"
4544
- major_dot_minor: "3.10"
4645
- major_dot_minor: "3.11"

.github/workflows/run-tests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
python3 -m venv venv
5353
if [[ ${{ matrix.os.runs-on }} == windows-latest ]]; then
5454
source ./venv/Scripts/activate
55+
python -m pip install --upgrade pip
5556
else
5657
. ./venv/bin/activate
5758
fi

chianft/util/mint.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from chia.consensus.default_constants import DEFAULT_CONSTANTS
99
from chia.rpc.full_node_rpc_client import FullNodeRpcClient
10+
from chia.rpc.wallet_request_types import NFTMintBulkResponse
1011
from chia.rpc.wallet_rpc_client import WalletRpcClient
1112
from chia.types.blockchain_format.coin import Coin
1213
from chia.types.blockchain_format.program import INFINITE_COST
@@ -136,7 +137,7 @@ async def create_spend_bundles(
136137
assert royalty_percentage is not None
137138
assert royalty_address is not None
138139
for i in range(0, mint_total, chunk):
139-
resp = await self.wallet_client.nft_mint_bulk(
140+
resp: NFTMintBulkResponse = await self.wallet_client.nft_mint_bulk(
140141
wallet_id=self.nft_wallet_id,
141142
metadata_list=metadata_list[i : i + chunk],
142143
target_list=target_list[i : i + chunk],
@@ -151,12 +152,12 @@ async def create_spend_bundles(
151152
mint_from_did=mint_from_did,
152153
tx_config=DEFAULT_TX_CONFIG,
153154
)
154-
if not resp["success"]:
155+
if not resp:
155156
raise ValueError(
156157
"SpendBundle could not be created for metadata rows: %s to %s"
157158
% (i, i + chunk)
158159
)
159-
sb = SpendBundle.from_json_dict(resp["spend_bundle"])
160+
sb = resp.spend_bundle
160161
spend_bundles.append(bytes(sb))
161162
next_coin = [
162163
c for c in sb.additions() if c.puzzle_hash == funding_coin.puzzle_hash
@@ -223,7 +224,7 @@ async def add_fee_to_spend(
223224
return spend, 0
224225
total_fee = sb_cost * (fee_per_cost * attempt)
225226
print("Fee for inclusion: {}".format(total_fee))
226-
fee_tx = await self.wallet_client.create_signed_transaction(
227+
fee_tx = await self.wallet_client.create_signed_transactions(
227228
additions=[
228229
{
229230
"amount": fee_coin.amount - total_fee,
@@ -234,8 +235,8 @@ async def add_fee_to_spend(
234235
fee=uint64(total_fee),
235236
tx_config=DEFAULT_TX_CONFIG,
236237
)
237-
assert fee_tx.spend_bundle is not None
238-
spend_with_fee = SpendBundle.aggregate([fee_tx.spend_bundle, spend])
238+
assert fee_tx.signed_tx.spend_bundle is not None
239+
spend_with_fee = SpendBundle.aggregate([fee_tx.signed_tx.spend_bundle, spend])
239240
return spend_with_fee, total_fee
240241

241242
async def sb_in_mempool(self, sb_name: bytes32) -> bool:
@@ -365,11 +366,12 @@ async def create_offer(
365366
}
366367
for i in range(10):
367368
try:
368-
offer, tr = await self.wallet_client.create_offer_for_ids(
369+
offer_resp = await self.wallet_client.create_offer_for_ids(
369370
offer_dict,
370371
fee=0,
371372
tx_config=DEFAULT_TX_CONFIG,
372373
)
374+
offer = offer_resp.offer
373375
filepath = "offers/{}.offer".format(launcher_id)
374376
assert offer is not None
375377
with open(Path(filepath), "w") as file:

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
long_description = fh.read()
55

66
dependencies = [
7-
"chia-blockchain==2.4.2",
7+
"chia-blockchain==2.4.4",
88
]
99

1010
dev_dependencies = [
@@ -44,9 +44,9 @@
4444
long_description_content_type="text/markdown",
4545
classifiers=[
4646
"Programming Language :: Python :: 3",
47-
"Programming Language :: Python :: 3.8",
4847
"Programming Language :: Python :: 3.9",
4948
"Programming Language :: Python :: 3.10",
49+
"Programming Language :: Python :: 3.11",
5050
"License :: OSI Approved :: Apache Software License",
5151
"Topic :: Security :: Cryptography",
5252
],

0 commit comments

Comments
 (0)