Skip to content

Commit f1f5247

Browse files
committed
add GetDomainFromAuction function
1 parent 2a359a8 commit f1f5247

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

mytoncore.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,6 +2896,16 @@ def GetItemFromDict(self, data, search):
28962896
#end for
28972897
return None
28982898
#end define
2899+
2900+
def GetDomainFromAuction(self, walletName, addr):
2901+
wallet = self.GetLocalWallet(walletName)
2902+
bocPath = local.buffer.my_temp_dir + "get_dns_data.boc"
2903+
bocData = bytes.fromhex("b5ee9c7241010101000e0000182fcb26a20000000000000000f36cae4d")
2904+
with open(bocPath, 'wb') as file:
2905+
file.write(bocData)
2906+
resultFilePath = self.SignBocWithWallet(wallet, bocPath, addr, 0.1)
2907+
self.SendFile(resultFilePath, wallet)
2908+
#end define
28992909

29002910
def NewDomain(self, domain):
29012911
local.add_log("start NewDomain function", "debug")

mytonctrl.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def Init(argv):
4646
console.AddItem("dl", PrintDomainsList, local.translate("dl_cmd"))
4747
console.AddItem("vds", ViewDomainStatus, local.translate("vds_cmd"))
4848
console.AddItem("dd", DeleteDomain, local.translate("dd_cmd"))
49+
console.AddItem("gdfa", GetDomainFromAuction, local.translate("gdfa_cmd"))
4950

5051
console.AddItem("ol", PrintOffersList, local.translate("ol_cmd"))
5152
console.AddItem("vo", VoteOffer, local.translate("vo_cmd"))
@@ -959,6 +960,17 @@ def DeleteDomain(args):
959960
color_print("DeleteDomain - {green}OK{endc}")
960961
#end define
961962

963+
def GetDomainFromAuction(args):
964+
try:
965+
walletName = args[0]
966+
addr = args[1]
967+
except:
968+
color_print("{red}Bad args. Usage:{endc} gdfa <wallet-name> <addr>")
969+
return
970+
ton.GetDomainFromAuction(walletName, addr)
971+
color_print("GetDomainFromAuction - {green}OK{endc}")
972+
#end define
973+
962974
def PrintElectionEntriesList(args):
963975
past = "past" in args
964976
entries = ton.GetElectionEntries(past=past)

0 commit comments

Comments
 (0)