mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-08-16 14:20:47 +03:00
parent
4ec439f789
commit
2c502dea95
@ -50,12 +50,13 @@ def launcher_conditions_and_spend_bundle(
|
|||||||
) -> Tuple[bytes32, List[Program], SpendBundle]:
|
) -> Tuple[bytes32, List[Program], SpendBundle]:
|
||||||
launcher_puzzle_hash = launcher_puzzle.get_tree_hash()
|
launcher_puzzle_hash = launcher_puzzle.get_tree_hash()
|
||||||
launcher_coin = Coin(parent_coin_id, launcher_puzzle_hash, launcher_amount)
|
launcher_coin = Coin(parent_coin_id, launcher_puzzle_hash, launcher_amount)
|
||||||
|
launcher_id = launcher_coin.name()
|
||||||
singleton_full_puzzle = SINGLETON_MOD.curry(
|
singleton_full_puzzle = SINGLETON_MOD.curry(
|
||||||
SINGLETON_MOD_HASH, launcher_coin.name(), launcher_puzzle_hash, initial_singleton_inner_puzzle
|
SINGLETON_MOD_HASH, launcher_id, launcher_puzzle_hash, initial_singleton_inner_puzzle
|
||||||
)
|
)
|
||||||
singleton_full_puzzle_hash = singleton_full_puzzle.get_tree_hash()
|
singleton_full_puzzle_hash = singleton_full_puzzle.get_tree_hash()
|
||||||
message_program = Program.to([singleton_full_puzzle_hash, launcher_amount, metadata])
|
message_program = Program.to([singleton_full_puzzle_hash, launcher_amount, metadata])
|
||||||
expected_announcement = Announcement(launcher_coin.name(), message_program.get_tree_hash())
|
expected_announcement = Announcement(launcher_id, message_program.get_tree_hash())
|
||||||
expected_conditions = []
|
expected_conditions = []
|
||||||
expected_conditions.append(
|
expected_conditions.append(
|
||||||
Program.to(
|
Program.to(
|
||||||
@ -70,7 +71,7 @@ def launcher_conditions_and_spend_bundle(
|
|||||||
launcher_solution = Program.to([singleton_full_puzzle_hash, launcher_amount, metadata])
|
launcher_solution = Program.to([singleton_full_puzzle_hash, launcher_amount, metadata])
|
||||||
coin_spend = make_spend(launcher_coin, launcher_puzzle, launcher_solution)
|
coin_spend = make_spend(launcher_coin, launcher_puzzle, launcher_solution)
|
||||||
spend_bundle = SpendBundle([coin_spend], G2Element())
|
spend_bundle = SpendBundle([coin_spend], G2Element())
|
||||||
return launcher_coin.name(), expected_conditions, spend_bundle
|
return launcher_id, expected_conditions, spend_bundle
|
||||||
|
|
||||||
|
|
||||||
def singleton_puzzle(launcher_id: Program, launcher_puzzle_hash: bytes32, inner_puzzle: Program) -> Program:
|
def singleton_puzzle(launcher_id: Program, launcher_puzzle_hash: bytes32, inner_puzzle: Program) -> Program:
|
||||||
|
Loading…
Reference in New Issue
Block a user