caivega / ipfslib

Other
2 stars 1 forks source link

S2 - jt_signTransaction(9545):发行带issuer的代币不work #73

Closed zyd82 closed 3 years ago

zyd82 commented 4 years ago

发送如下请求,发行带issuer的代币

{
    "jsonrpc": "2.0",
    "method": "jt_signTransaction",
    "params": [
        {
            "type": "IssueCoin",
            "from": "jpYMybcoQaBRSArVcFbEaVFw6Lk6DefWu6",
            "secret": "shGFeVg8B6dz92ncGab4CiU6DwZRK",
            "name": "QQQ Token",
            "symbol": "QQQT",
            "decimals": 8,
            "total_supply": "100000000",
            "local": true
        }
    ],
    "id": 1
}

9545上返回长哈希,用jt_sendRawTransaction发送该哈希,显示交易成功。通过交易哈希查询该交易,发现代币的issuer还是jjjjjjjjjjjjjjjjjjjjjhoLvTp。(jt_sendTransaction上面也有这个问题,但是之前测试jt_sendTransaction的时候这个问题并不存在。)

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "TransactionType": "IssueCoin",
        "Flags": 2147483648,
        "Account": "jpYMybcoQaBRSArVcFbEaVFw6Lk6DefWu6",
        "Sequence": 6,
        "Fee": "10",
        "SigningPubKey": "0334737BCA46A31289BD2BEBF349C9640961D4D5CE12E1B78C972316F18E848313",
        "TxnSignature": "3045022100AC0D6BD04A2423C341A3857F40B8B8216B6E8DDD078E9CFA16D6DEAA13C1A04202207E7EA2F62D52BFDDCC7061064BC95BE6081B015585648DD2CDC799A3AF9FA7B4",
        "hash": "F7D6C8BAB6DFA9CD6E3A1CF78DE0F26F89CDF8758BCCE4A56B235346A386EAD5",
        "Name": "QQQ Token",
        "Decimals": 8,
        "TotalSupply": {
            "value": "100000000",
            "currency": "QQQT",
            "issuer": "jjjjjjjjjjjjjjjjjjjjjhoLvTp"
        },
        "date": 631003465,
        "inLedger": 171490,
        "ledger_index": 171490,
        "meta": {
            "AffectedNodes": [
                {
                    "ModifiedNode": {
                        "FinalFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Account": "jhCVwTcg5aYWMMdfDmwqYxBr5NMA1PDfyg",
                            "Sequence": 0,
                            "Balance": "100778"
                        },
                        "LedgerEntryType": "AccountRoot",
                        "PreviousFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Account": "jhCVwTcg5aYWMMdfDmwqYxBr5NMA1PDfyg",
                            "Sequence": 0,
                            "Balance": "100768"
                        }
                    }
                },
                {
                    "ModifiedNode": {
                        "FinalFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Account": "jpYMybcoQaBRSArVcFbEaVFw6Lk6DefWu6",
                            "Sequence": 6,
                            "Balance": "999940"
                        },
                        "LedgerEntryType": "AccountRoot",
                        "PreviousFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Account": "jpYMybcoQaBRSArVcFbEaVFw6Lk6DefWu6",
                            "Sequence": 5,
                            "Balance": "999950"
                        }
                    }
                },
                {
                    "CreatedNode": {
                        "LedgerEntryType": "AccountRoot",
                        "NewFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Account": "jpYMybcoQaBRSArVcFbEaVFw6Lk6DefWu6",
                            "Sequence": 6,
                            "Balance": {
                                "value": "100000000",
                                "currency": "QQQT",
                                "issuer": "jjjjjjjjjjjjjjjjjjjjjhoLvTp"
                            }
                        }
                    }
                },
                {
                    "CreatedNode": {
                        "LedgerEntryType": "CurrencyRoot",
                        "NewFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Flags": 0,
                            "Account": "jpYMybcoQaBRSArVcFbEaVFw6Lk6DefWu6",
                            "Sequence": 6,
                            "Name": "QQQ Token",
                            "Decimals": 8,
                            "TotalSupply": {
                                "value": "100000000",
                                "currency": "QQQT",
                                "issuer": "jjjjjjjjjjjjjjjjjjjjjhoLvTp"
                            }
                        }
                    }
                }
            ],
            "TransactionIndex": 0,
            "TransactionResult": "tesSUCCESS"
        }
    },
    "status": "success"
}
caivega commented 4 years ago

jjjjjjjjjjjjjjjjjjjjjhoLvTp, 就是0000000000000对应的帐户,全局的币实现上默认就是issuer为空,或者为零时的发的币

zyd82 commented 4 years ago

那这个就是work as design了,对吧?

zyd82 commented 3 years ago

9545验证通过,验证版本v0.5.3-dev

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "TransactionType": "IssueCoin",
        "Flags": 2147483648,
        "Account": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM",
        "Sequence": 11,
        "Fee": "10",
        "SigningPubKey": "02F28E0A8D5F9959838A84AA15120959CDD678D7BDC192E8140226A23EC753C9BC",
        "TxnSignature": "3045022100EB360F34FCB0A481BC7DD4C61F7A8AFA5E234FF0F9A912B500CE0F250710278502204F41E6BD71120AE1A65E2B5F5D021EE4162C2FACBDB6D8C4A6B705505E08343E",
        "hash": "F77B2CC7E4F760C6CACAA7487A04E695DE4B9693D3F36CC8E0A3641BA52D4929",
        "Name": "ZYDDD Token",
        "Decimals": 8,
        "TotalSupply": {
            "value": "1000000",
            "currency": "ZYDT",
            "issuer": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM"
        },
        "Owner": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM",
        "date": 660302505,
        "inLedger": 9962,
        "ledger_index": 9962,
        "meta": {
            "AffectedNodes": [
                {
                    "ModifiedNode": {
                        "FinalFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Account": "jhCVwTcg5aYWMMdfDmwqYxBr5NMA1PDfyg",
                            "Sequence": 0,
                            "Balance": "101490"
                        },
                        "LedgerEntryType": "AccountRoot",
                        "PreviousFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Account": "jhCVwTcg5aYWMMdfDmwqYxBr5NMA1PDfyg",
                            "Sequence": 0,
                            "Balance": "101480"
                        }
                    }
                },
                {
                    "ModifiedNode": {
                        "FinalFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Account": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM",
                            "Sequence": 11,
                            "Balance": "909710"
                        },
                        "LedgerEntryType": "AccountRoot",
                        "PreviousFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Account": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM",
                            "Sequence": 10,
                            "Balance": "909720"
                        }
                    }
                },
                {
                    "CreatedNode": {
                        "LedgerEntryType": "AccountRoot",
                        "NewFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Account": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM",
                            "Sequence": 11,
                            "Balance": {
                                "value": "1000000",
                                "currency": "ZYDT",
                                "issuer": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM"
                            }
                        }
                    }
                },
                {
                    "CreatedNode": {
                        "LedgerEntryType": "CurrencyRoot",
                        "NewFields": {
                            "Hash": "0000000000000000000000000000000000000000000000000000000000000000",
                            "Flags": 0,
                            "Account": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM",
                            "Sequence": 1,
                            "Name": "ZYDDD Token",
                            "Decimals": 8,
                            "TotalSupply": {
                                "value": "1000000",
                                "currency": "ZYDT",
                                "issuer": "jGQ14U9BeHn6kV9eofnVsshSCxAecBawPM"
                            }
                        }
                    }
                }
            ],
            "TransactionIndex": 0,
            "TransactionResult": "tesSUCCESS"
        }
    }
}