diff --git a/.well-known/stellar.toml b/.well-known/stellar.toml index 94dac3f..178a8ea 100644 --- a/.well-known/stellar.toml +++ b/.well-known/stellar.toml @@ -63,14 +63,14 @@ is_unlimited=false image="https://nft.montelibero.org/images/UB2117.png" [[CURRENCIES]] -code="Hub1369p14" -issuer="GCTE2BR4WYD73Y3KRC6JOX2LYFH5WKAWO7VYCZXVZ5XLNWMYCIQFDNFT" +code="Hub1369p13" +issuer="GBGWJMXGISX5YXQMTWOPJT6QZADQLFJPHREXDTM7JJCSOZWC7BVM3NFT" name="Montelibero-City Corporate hub" -desc="Corporate hub at plot 1369/14" +desc="Corporate hub at plot 1369/13" status="live" display_decimals=0 is_unlimited=false -image="https://nft.montelibero.org/images/Hub1369p14.jpeg" +image="https://nft.montelibero.org/images/Hub1369p13.jpeg" [[CURRENCIES]] code="MtlDome001" diff --git a/images/Hub1369p13.jpeg b/images/Hub1369p13.jpeg new file mode 100644 index 0000000..ca999c8 Binary files /dev/null and b/images/Hub1369p13.jpeg differ diff --git a/images/Hub1369p14.jpeg b/images/Hub1369p14.jpeg deleted file mode 100644 index 2e49c59..0000000 Binary files a/images/Hub1369p14.jpeg and /dev/null differ diff --git a/mtl_nft.py b/mtl_nft.py index 02fcb7e..8618f3e 100755 --- a/mtl_nft.py +++ b/mtl_nft.py @@ -10,23 +10,22 @@ from stellar_sdk import Asset, Keypair, Network, Server, TransactionBuilder -OPERATOR_KP = Keypair.from_secret("") +OPERATOR_KP = Keypair.from_secret(open("/tmp/a").read().strip()) ISSUER_KP = Keypair.from_secret( - "SBOEURAX4BL5LQVLIN6LOMPM2DFLOYTVCQ5HHRK4IMVQGOYKDJ67EEIS" + "SCGZP5RWVGLZ6HQHF4ANMZHRSQANRZ2SVJEHFWEDN5P6WQUAWA7FWGIW" ) ISSUER_ACCOUNT = ( ISSUER_KP.public_key - # GCTE2BR4WYD73Y3KRC6JOX2LYFH5WKAWO7VYCZXVZ5XLNWMYCIQFDNFT + # GBGWJMXGISX5YXQMTWOPJT6QZADQLFJPHREXDTM7JJCSOZWC7BVM3NFT ) -TOKEN_NAMES = ["Hub1369p14", "MtlDome001", "MtlDome002", "WH1369p20"] +TOKEN_NAMES = ["Hub1369p13"] TOKENS_TO_MINT = [Asset(name, ISSUER_ACCOUNT) for name in TOKEN_NAMES] -TOKENS_TO_BURN = [ - Asset("BP1369p14", "GC2ZK7OONSYECUWI42A5KXG2M7XIGEC2CIBOD4BJ4EHWYJWV6BHC6NFT"), - Asset("BP1369p20", "GC2ZK7OONSYECUWI42A5KXG2M7XIGEC2CIBOD4BJ4EHWYJWV6BHC6NFT"), -] +TOKENS_TO_BURN = [] + TOKEN_HOLDER = "GBJ3HT6EDPWOUS3CUSIJW5A4M7ASIKNW4WFTLG76AAT5IE6VGVN47TIC" +# TOKEN_HOLDER = "GCOJHUKGHI6IATN7AIEK4PSNBPXIAIZ7KB2AWTTUCNIAYVPUB2DMCITY" DISTRIBUTOR_ACCOUNT = "GDPHAKGLJ3B56BK4CZ2VMTYEDI6VZ2CTHUHSFAFSPGSTJHZEI3ATOKEN" DISTRIBUTOR_KP = Keypair.from_public_key(DISTRIBUTOR_ACCOUNT) @@ -47,9 +46,11 @@ def __init__(self, source_address: str, issuer_address: str): def create_issuer(self): self.append_create_account_op(self.issuer_address, "1") - def init_issuer(self): + def init_and_lock_issuer(self): self.append_set_options_op( - home_domain="nft.montelibero.org", source=self.issuer_address + home_domain="nft.montelibero.org", + master_weight=0, + source=self.issuer_address, ) def create_and_init_issuer(self): @@ -59,13 +60,13 @@ def create_and_init_issuer(self): def set_issuer_data(self, key, value): self.append_manage_data_op(key, value, source=self.issuer_address) - def trust(self, asset: Asset, account: Optional[str] = None): - self.append_change_trust_op(asset, limit=ATOMIC_TOKEN, source=account) + def trust(self, asset: Asset, source: Optional[str] = None): + self.append_change_trust_op(asset, limit=ATOMIC_TOKEN, source=source) def mint_to(self, asset: Asset, receiver: str): self.trust( asset, - account=( + source=( None if receiver == self.source_account.account.account_id else receiver ), ) @@ -76,9 +77,6 @@ def mint_to(self, asset: Asset, receiver: str): def mint(self, asset: Asset): self.mint_to(asset, DISTRIBUTOR_ACCOUNT) - def lock_issuer(self): - self.append_set_options_op(master_weight=0, source=self.issuer_address) - def build_and_sign(self, signers): transaction = self.build() for signer in signers: @@ -91,7 +89,7 @@ def send(self, asset: Asset, source: str, destination: str): def send_from_distributor(self, asset: Asset, destination: str): self.send(asset, DISTRIBUTOR_ACCOUNT, destination) - def untrust(self, asset: Asset, source: str): + def untrust(self, asset: Asset, source: Optional[str] = None): self.append_change_trust_op(asset=asset, limit="0", source=source) def burn( @@ -113,16 +111,34 @@ def main(): builder = TokenBuilder( source_address=DISTRIBUTOR_ACCOUNT, issuer_address=ISSUER_ACCOUNT ) - # builder.create_and_init_issuer() - for token in TOKENS_TO_MINT: - builder.trust(token) - # builder.mint_to(token, TOKEN_HOLDER) + builder.add_text_memo("+Hub13") + + # builder.create_issuer() + # for token in TOKENS_TO_MINT: + # # builder.trust(token, DISTRIBUTOR_ACCOUNT) + # builder.mint_to(token, TOKEN_HOLDER) + # builder.init_and_lock_issuer() + + # correct mistakes + builder.untrust( + Asset("BP1369p13", "GC2ZK7OONSYECUWI42A5KXG2M7XIGEC2CIBOD4BJ4EHWYJWV6BHC6NFT") + ) + builder.trust( + Asset("BP1369p14", "GC2ZK7OONSYECUWI42A5KXG2M7XIGEC2CIBOD4BJ4EHWYJWV6BHC6NFT") + ) + builder.untrust( + Asset("Hub1369p14", "GCTE2BR4WYD73Y3KRC6JOX2LYFH5WKAWO7VYCZXVZ5XLNWMYCIQFDNFT") + ) + builder.trust( + Asset("Hub1369p13", "GBGWJMXGISX5YXQMTWOPJT6QZADQLFJPHREXDTM7JJCSOZWC7BVM3NFT") + ) # for token in TOKENS_TO_BURN: - # builder.burn(token, source=TOKEN_HOLDER) - # builder.lock_issuer() + # builder.burn(token) + # builder.untrust(token) - transaction = builder.build_and_sign([OPERATOR_KP]) # ISSUER_KP, + # transaction = builder.build() + transaction = builder.build_and_sign([OPERATOR_KP]) print(transaction.to_xdr()) print(SERVER.submit_transaction(transaction))