python-api icon indicating copy to clipboard operation
python-api copied to clipboard

How to mark primary_sale_happened

Open jpez16 opened this issue 4 years ago • 3 comments

Is there a way to do this?

jpez16 avatar Sep 08 '21 22:09 jpez16

You might have to separate out the metadata update function outside of mint function. More than welcome to make a PR to do so

jarry-xiao avatar Sep 09 '21 15:09 jarry-xiao

Also interested in that :+1: I guess the function to be modified is the following and especialy args=_data but how to insert a switch of primary_sale_happened ? def update_metadata_instruction_data(name, symbol, uri, fee, creators, verified, share): _data = bytes([1]) + _get_data_buffer(name, symbol, uri, fee, creators, verified, share) + bytes([0, 0]) instruction_layout = cStruct( "instruction_type" / Int8ul, "args" / Bytes(len(_data)), ) return instruction_layout.build( dict( instruction_type=InstructionType.UPDATE_METADATA, args=_data, ) )

ByteFan avatar Dec 04 '21 19:12 ByteFan

https://github.com/crypt0miester/python-api/tree/v1.2 here you go.

crypt0miester avatar Mar 15 '22 04:03 crypt0miester