Closed zyd82 closed 3 years ago
symbol, [a-zA-Z0-9_],现在只允许字母(大小写), 数字及下划线及中文除标点外的字符
好像加了下划线不行,不加下划线可以。 发送如下请求:
{
"jsonrpc": "2.0",
"method": "jt_sendTransaction",
"params": [
{
"type": "IssueCoin",
"from": "jEwE94Yhi2iLqVuFAL7K1XbHoaFES9N3pm",
"secret": "ssCR6vTQeD4rBDaD7cGZCM9w6bVfH",
"name": "CCC Token",
"symbol": "das_sdfdsr", => 带下划线
"decimals": 8,
"total_supply": "100000000"
}
],
"id": 1
}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": "runtime error: invalid memory address or nil pointer dereference",
"status": "error"
}
版本v0.2.1-testing,发行symbol长度为12的代币失败,返回如下:
{
"jsonrpc": "2.0",
"method": "jt_signTransaction",
"params": [
{
"type": "IssueCoin",
"from": "jKnUV9RPe1apMP43ZED68ujYk513w9QfY7",
"secret": "shCQEm9jrWGpYvjCg5brXknDd2j6A",
"name": "kdhgfueosh Token",
"symbol": "IFJGTENIJSGT",
"decimals": "8",
"total_supply": "100000000"
}
],
"id": 1
}
{
"id": 1,
"jsonrpc": "2.0",
"result": "runtime error: invalid memory address or nil pointer dereference",
"status": "error"
}
9545已验证,验证版本v0.5.2-dev
{
"id": 1,
"jsonrpc": "2.0",
"message": {
"reason": "1 errors",
"result": [
{
"error": "symbol must be the characters with alphas[a-zA-Z], numbers[0-9], chinese characters[一-龥] and underscores[_]",
"message": {
"decimals": "8",
"flags": 65536,
"from": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM",
"name": "weasd Token",
"symbol": "a..23",
"total_supply": "100000000",
"type": "IssueCoin"
},
"status": -278
}
]
},
"result": [
""
],
"status": -278
}
发送如下请求,其中symbol参数里有字符“/”。
9545上发币成功。建议发币时symbol参数不能包含特殊字符,最好只允许输入字母、数字、下划线这些常用字符。