caivega / ipfslib

Other
2 stars 1 forks source link

S3 - jt_sendTransaction:发行代币时total_supply为"100/USD/issuer"格式的问题 #158

Closed zyd82 closed 3 years ago

zyd82 commented 3 years ago

测试版本:v0.5.3-dev-20201228-2d55b2941a775a8c090b9039d57ef805dba3c516 用例编号:jt_sendTransaction_000340

不论是发行本地代币还是全局代币,"total_supply"写成"100/USD/issuer"格式,都可以成功发行代币。但是下面这个例子里面,total_supply里面的issuer部分与发币地址并不一致,最后也能发币成功。把issuer部分换成钱包秘钥,也能发行成功。

{
    "jsonrpc": "2.0",
    "method": "jt_sendTransaction",
    "params": [
        { 
            "type": "IssueCoin",
            "from": "jPdx7mG595P6CowtGYbxRkik9HdWUWtB2J",
            "secret": "shhquPeZm7uQ6Rvjrqn6L2cR6H33u",
            "name": "slkjgs",
            "symbol": "AAT3",
            "decimals": "6",
            "total_supply": "90000/AAT3/js3MF5kQkTG6NBVj9HEiw9cFe4ckNvMYGg",
            "local": true
        }
    ],
    "id": 1
}

此处建议不论发行本地代币还是全局代币,都不要支持"100/USD/issuer"格式,只支持"100"和"100/USD"格式。

caivega commented 3 years ago

已修复,下一个build验证

zyd82 commented 3 years ago

v0.5.3-dev-20201229-549e506fdf4556bc9bfd675559fd201421bd3036版本验证通过。

{
    "error": {
        "count": 1,
        "description": "The compound error.",
        "information": "1 errors"
    },
    "id": 1,
    "jsonrpc": "2.0",
    "result": [
        {
            "error": {
                "description": "The transaction is ill-formed.",
                "information": "issuer in total_supply is not supported",
                "message": {
                    "decimals": "12",
                    "flags": "65536",
                    "from": "jPdx7mG595P6CowtGYbxRkik9HdWUWtB2J",
                    "local": true,
                    "name": "slkjgs",
                    "symbol": "AAT31",
                    "total_supply": "9.0123456789/AAT31/jPdx7mG595P6CowtGYbxRkik9HdWUWtB2J",
                    "type": "IssueCoin"
                }
            },
            "status": -278,
            "type": "temINVALID"
        }
    ],
    "status": 1000,
    "type": "tedCOMPOUND"
}