Golang SDK name claim issue

Hello, everyone! I used the golang SDK to claim domain name registration. After I got the tx, I found that the domain name with short digits was not successful, while the long domain name could be successful

This is the code that I called using the golang SDK

func ClaimAENS(account *account.Account, name string, fee *big.Int, isUpdate bool) (*aeternity.TxReceipt, error) {
client := naet.NewNode(nodeURL, false)
ctxAlice := aeternity.NewContext(account, client)

// Preclaim the name
preclaimTx, salt, err := transactions.NewNamePreclaimTx(account.Address, name, ctxAlice.TTLNoncer())
if err != nil {
	return nil, err
}
p, err := ctxAlice.SignBroadcastWait(preclaimTx, config.Client.WaitBlocks)
if err != nil {
	return nil, err
}
time.Sleep(3 * time.Second)
claimTx, err := transactions.NewNameClaimTx(account.Address, name, salt, fee, ctxAlice.TTLNoncer())
if err != nil {
	return nil, err
}
claimTx.TTL = 0
if isUpdate {
	claimTx.NameSalt = new(big.Int)
}
fmt.Println("Claim salt -> ",salt)
fmt.Println("p -> ",p)
txReceipt, err := ctxAlice.SignBroadcast(claimTx, config.Client.WaitBlocks)
if err != nil {
	return nil, err
}
return txReceipt, err

}

This is the tx that was returned to me, and I used it to get the information

{
“block_hash”: “none”,
“block_height”: -1,
“hash”: “th_2FGD8EbrSex7zkM6UZvqUjh3sK9QJikmQsQfC44ZaZ5GSqgiBQ”,
“signatures”: [
“sg_LpCEdNSLKN6CMprAhwk5ZhziSM1j6HzWwo8hASdPenXtEu9hk1zcFSukKfHiHsGvUmmQNiB3W6aDvDmxvnsUyqWLsjf1b”
],
“tx”: {
“account_id”: “ak_QyFYYpgJ1vUGk1Lnk8d79WJEVcAtcfuNHqquuP2ADfxsL6yKx”,
“fee”: 17060000000000,
“name”: “easy.chain”,
“name_fee”: 6599629780839766425,
“name_salt”: 31845597544495477576623107492387544795940627350563088759516475814962273966202,
“nonce”: 87,
“type”: “NameClaimTx”,
“version”: 2
}
}

Block_hash has always been none block_height has always been -1. It will never succeed if I register a 12-digit aens

Thank you very much

1 Like

[email protected] ,pls who can solve this problem.

easy is a 4 character name (.chain doesn’t count) so the minimum fee is 134.63 AE, the TX only set a name_fee of 6.6 AE so the transaction is not valid.

3 Likes

Thank you for solving my problem