Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add fullnodeInfo to poly_version #1005

Merged
merged 2 commits into from
Feb 28, 2023
Merged

fix: Add fullnodeInfo to poly_version #1005

merged 2 commits into from
Feb 28, 2023

Conversation

classicalliu
Copy link
Contributor

If GODWOKEN_READONLY_JSON_RPC not provided, nodeInfo = fullnodeInfo

{
    "jsonrpc": "2.0",
    "id": 2,
    "result": {
        "versions": {
            "web3Version": "1.12.0-rc2",
            "web3IndexerVersion": "1.12.0-rc2",
            "godwokenVersion": "1.12.0-rc1 4d0e922"
        },
        "fullnodeInfo": {
            "nodeMode": "fullnode",
            "rollupCell": {
                "typeHash": "0x4adf1f0e307f83227a58a16e861dae206a55a0baef8d2df7ea00b37aa032c50c",
                "typeScript": {
                    "args": "0xe4d3b34a9ec6d38edae15ce992ab7240699668d46598658cb991415ab5112bb1",
                    "code_hash": "0xbd8d100ab734e134e564bce85ea7d2318150e6baeabcba0a26514fa6cc4737b1",
                    "hash_type": "type"
                }
            },
            "rollupConfig": {
                "chainId": "0x116e8",
                "challengeMaturityBlocks": "0x64",
                "finalityBlocks": "0x3",
                "requiredStakingCapacity": "0x2540be400",
                "rewardBurnRate": "0x32"
            },
            "gwScripts": {
                "deposit": {
                    "script": {
                        "args": "0x936f1538d66cfeea24e1283dc94b49c881afd20e1f9ebba31de5d252c669771d",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xd483176d9faa7278f8e05e14efd482a5eef36ec5abfb1b5a5d595d808a12579c"
                },
                "withdraw": {
                    "script": {
                        "args": "0x18e5cb4de6a634a0b3aa5630730e079ca1d6915c7d4fc92283bf8941a2da7a49",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xc4d713db311ab5df805675a1aa6a5f441fdf1fb2f24fc61c460cc157196cd173"
                },
                "stateValidator": {
                    "script": {
                        "args": "0x1536e8048d3305177c4044853034edec50d49799b1fba261ec9161bce7dcfc49",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xbd8d100ab734e134e564bce85ea7d2318150e6baeabcba0a26514fa6cc4737b1"
                },
                "stakeLock": {
                    "script": {
                        "args": "0xc1844e51890afaa05158fca36b56974b6a135fa94ac739c1076b7172c9855aae",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xeedb399ce44a66d73afcf5ab07e49248c357bcdf834f840da325aa032f369cb1"
                },
                "custodianLock": {
                    "script": {
                        "args": "0x18caa7562bf0c7f1135177ab4c767c80e01ae90675ba7fd8f3f2b87435c1c3f8",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xb67b195eaa601ccd97dc0768e87b0a9d66ad4f4db46bf858248bcf8811ec55be"
                },
                "challengeLock": {
                    "script": {
                        "args": "0xad24aba105ffd04aa24bb52969a7b80cf4f99d7d07f6822940c4ba572628b656",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xc4d713db311ab5df805675a1aa6a5f441fdf1fb2f24fc61c460cc157196cd173"
                },
                "l1Sudt": {
                    "script": {
                        "args": "0x57fdfd0617dcb74d1287bb78a7368a3a4bf9a790cfdcf5c1a105fd7cb406de0d",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0x6283a479a3cf5d4276cd93594de9f1827ab9b55c7b05b3d28e4c2e0a696cfefd"
                },
                "l2Sudt": {
                    "script": {
                        "args": "0x27fb0835fc0505efca480a176dd68293c6774518126f6a2dc9f7fe818ae58a1e",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0x7aefd62bb9d10281ba691fd933b96621ddd2ec2ce5fe11830713dc3918e75cb2"
                },
                "omniLock": {
                    "script": {
                        "args": "0x7005ea754481ea7d8fbd4f59d7c6d9dbe78b4437ca9dd532434e6ad1afa21d57",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xed4cbdbe1767275eab7c15664f2fcfa22980e235fd2fa4c83de06116f06eb50c"
                }
            },
            "eoaScripts": {
                "eth": {
                    "typeHash": "0x45895f48b7cb8bb67c03b7ec4363215d01d23cf38c968ec97996782b44e12cbe",
                    "script": {
                        "args": "0x71609c8c54f368ac44972216a952439cfe42feefddfbca95fd205b609c2dc9a6",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    }
                }
            },
            "backends": {
                "sudt": {
                    "validatorScriptTypeHash": "0x7aefd62bb9d10281ba691fd933b96621ddd2ec2ce5fe11830713dc3918e75cb2"
                },
                "meta": {
                    "validatorScriptTypeHash": "0x2dadf58d141bbdec854136e3bb068191d6054ceaf4ac6cfc88ddc87cddb55222"
                },
                "polyjuice": {
                    "validatorScriptTypeHash": "0xc24e643cd895b1ab2570d57d7447dc2d401ecea6ad1435eb380694292ce0cb15"
                },
                "ethAddrReg": {
                    "validatorScriptTypeHash": "0x7bdd7121902e860a192ff9637f11e6605aee64001ad168d1c0b07ef3c5afbc3c"
                }
            },
            "accounts": {
                "polyjuiceCreator": {
                    "id": "0x4",
                    "scriptHash": "0xf22ec5de53b63396882c7bcb6d9bd1f7abc259f71202526a1eaf6c55d73f48fb"
                },
                "ethAddrReg": {
                    "id": "0x2",
                    "scriptHash": "0x1336e9e975e6618cd21c50eb7fc5607a8bb4599c7bdb453f3337d7d06d23b8a3"
                },
                "defaultFrom": {
                    "id": "0x3",
                    "scriptHash": "0x111e0520015ecea97cc20043ed71e55de6615b44f9b6217f2ffccdce33fe53d6"
                }
            },
            "chainId": "0x116e8",
            "gaslessTx": {
                "support": false
            }
        },
        "nodeInfo": {
            "nodeMode": "readonly",
            "rollupCell": {
                "typeHash": "0x4adf1f0e307f83227a58a16e861dae206a55a0baef8d2df7ea00b37aa032c50c",
                "typeScript": {
                    "args": "0xe4d3b34a9ec6d38edae15ce992ab7240699668d46598658cb991415ab5112bb1",
                    "code_hash": "0xbd8d100ab734e134e564bce85ea7d2318150e6baeabcba0a26514fa6cc4737b1",
                    "hash_type": "type"
                }
            },
            "rollupConfig": {
                "chainId": "0x116e8",
                "challengeMaturityBlocks": "0x64",
                "finalityBlocks": "0x3",
                "requiredStakingCapacity": "0x2540be400",
                "rewardBurnRate": "0x32"
            },
            "gwScripts": {
                "deposit": {
                    "script": {
                        "args": "0x936f1538d66cfeea24e1283dc94b49c881afd20e1f9ebba31de5d252c669771d",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xd483176d9faa7278f8e05e14efd482a5eef36ec5abfb1b5a5d595d808a12579c"
                },
                "withdraw": {
                    "script": {
                        "args": "0x18e5cb4de6a634a0b3aa5630730e079ca1d6915c7d4fc92283bf8941a2da7a49",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xc4d713db311ab5df805675a1aa6a5f441fdf1fb2f24fc61c460cc157196cd173"
                },
                "stateValidator": {
                    "script": {
                        "args": "0x1536e8048d3305177c4044853034edec50d49799b1fba261ec9161bce7dcfc49",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xbd8d100ab734e134e564bce85ea7d2318150e6baeabcba0a26514fa6cc4737b1"
                },
                "stakeLock": {
                    "script": {
                        "args": "0xc1844e51890afaa05158fca36b56974b6a135fa94ac739c1076b7172c9855aae",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xeedb399ce44a66d73afcf5ab07e49248c357bcdf834f840da325aa032f369cb1"
                },
                "custodianLock": {
                    "script": {
                        "args": "0x18caa7562bf0c7f1135177ab4c767c80e01ae90675ba7fd8f3f2b87435c1c3f8",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xb67b195eaa601ccd97dc0768e87b0a9d66ad4f4db46bf858248bcf8811ec55be"
                },
                "challengeLock": {
                    "script": {
                        "args": "0xad24aba105ffd04aa24bb52969a7b80cf4f99d7d07f6822940c4ba572628b656",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xc4d713db311ab5df805675a1aa6a5f441fdf1fb2f24fc61c460cc157196cd173"
                },
                "l1Sudt": {
                    "script": {
                        "args": "0x57fdfd0617dcb74d1287bb78a7368a3a4bf9a790cfdcf5c1a105fd7cb406de0d",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0x6283a479a3cf5d4276cd93594de9f1827ab9b55c7b05b3d28e4c2e0a696cfefd"
                },
                "l2Sudt": {
                    "script": {
                        "args": "0x27fb0835fc0505efca480a176dd68293c6774518126f6a2dc9f7fe818ae58a1e",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0x7aefd62bb9d10281ba691fd933b96621ddd2ec2ce5fe11830713dc3918e75cb2"
                },
                "omniLock": {
                    "script": {
                        "args": "0x7005ea754481ea7d8fbd4f59d7c6d9dbe78b4437ca9dd532434e6ad1afa21d57",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    },
                    "typeHash": "0xed4cbdbe1767275eab7c15664f2fcfa22980e235fd2fa4c83de06116f06eb50c"
                }
            },
            "eoaScripts": {
                "eth": {
                    "typeHash": "0x45895f48b7cb8bb67c03b7ec4363215d01d23cf38c968ec97996782b44e12cbe",
                    "script": {
                        "args": "0x71609c8c54f368ac44972216a952439cfe42feefddfbca95fd205b609c2dc9a6",
                        "code_hash": "0x00000000000000000000000000000000000000000000000000545950455f4944",
                        "hash_type": "type"
                    }
                }
            },
            "backends": {
                "sudt": {
                    "validatorScriptTypeHash": "0x7aefd62bb9d10281ba691fd933b96621ddd2ec2ce5fe11830713dc3918e75cb2"
                },
                "meta": {
                    "validatorScriptTypeHash": "0x2dadf58d141bbdec854136e3bb068191d6054ceaf4ac6cfc88ddc87cddb55222"
                },
                "polyjuice": {
                    "validatorScriptTypeHash": "0xc24e643cd895b1ab2570d57d7447dc2d401ecea6ad1435eb380694292ce0cb15"
                },
                "ethAddrReg": {
                    "validatorScriptTypeHash": "0x7bdd7121902e860a192ff9637f11e6605aee64001ad168d1c0b07ef3c5afbc3c"
                }
            },
            "accounts": {
                "polyjuiceCreator": {
                    "id": "0x4",
                    "scriptHash": "0xf22ec5de53b63396882c7bcb6d9bd1f7abc259f71202526a1eaf6c55d73f48fb"
                },
                "ethAddrReg": {
                    "id": "0x2",
                    "scriptHash": "0x1336e9e975e6618cd21c50eb7fc5607a8bb4599c7bdb453f3337d7d06d23b8a3"
                },
                "defaultFrom": {
                    "id": "0x3",
                    "scriptHash": "0x111e0520015ecea97cc20043ed71e55de6615b44f9b6217f2ffccdce33fe53d6"
                }
            },
            "chainId": "0x116e8",
            "gaslessTx": {
                "support": false
            }
        }
    }
}

Copy link
Collaborator

@Flouse Flouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the API docs too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants