fix(jsonrpc-types): no compatible_chain_id in rollup config
@@ -1052,6 +1052,7 @@ pub struct RollupConfig {
pub challenge_maturity_blocks: Uint64,
pub finality_blocks: Uint64,
pub reward_burn_rate: Uint32, // * reward_burn_rate / 100
+ pub compatible_chain_id: Uint32, // compatible chain id
pub allowed_eoa_type_hashes: Vec<AllowedEoaTypeHash>, // list of script code_hash allowed an EOA(external owned account) to use
pub allowed_contract_type_hashes: Vec<AllowedContractTypeHash>, // list of script code_hash allowed a contract account to use
}
@@ -1071,6 +1072,7 @@ impl From<RollupConfig> for packed::RollupConfig {
challenge_maturity_blocks,
finality_blocks,
reward_burn_rate, // * reward_burn_rate / 100
+ compatible_chain_id,
allowed_eoa_type_hashes, // list of script code_hash allowed an EOA(external owned account) to use
allowed_contract_type_hashes, // list of script code_hash allowed a contract account to use
} = json;
@@ -1078,6 +1080,7 @@ impl From<RollupConfig> for packed::RollupConfig {
let challenge_maturity_blocks: u64 = challenge_maturity_blocks.into();
let finality_blocks: u64 = finality_blocks.into();
let reward_burn_rate: u32 = reward_burn_rate.into();
+ let compatible_chain_id: u32 = compatible_chain_id.into();
let reward_burn_rate: u8 = reward_burn_rate.try_into().expect("reward burn rate");
packed::RollupConfig::new_builder()
.l1_sudt_script_type_hash(l1_sudt_script_type_hash.pack())
@@ -1092,6 +1095,7 @@ impl From<RollupConfig> for packed::RollupConfig {
.challenge_maturity_blocks(challenge_maturity_blocks.pack())
.finality_blocks(finality_blocks.pack())
.reward_burn_rate(reward_burn_rate.into())
+ .compatible_chain_id(compatible_chain_id.pack())
.allowed_eoa_type_hashes(allowed_eoa_type_hashes.into_iter().map(From::from).pack())
.allowed_contract_type_hashes(
allowed_contract_type_hashes
@@ -1109,6 +1113,7 @@ impl From<packed::RollupConfig> for RollupConfig {
let challenge_maturity_blocks: u64 = data.challenge_maturity_blocks().unpack();
let finality_blocks: u64 = data.finality_blocks().unpack();
let reward_burn_date: u8 = data.reward_burn_rate().into();
+ let compatible_chain_id: u32 = data.compatible_chain_id().unpack();
RollupConfig {
l1_sudt_script_type_hash: data.l1_sudt_script_type_hash().unpack(),
custodian_script_type_hash: data.custodian_script_type_hash().unpack(),
@@ -1122,6 +1127,7 @@ impl From<packed::RollupConfig> for RollupConfig {
challenge_maturity_blocks: challenge_maturity_blocks.into(),
finality_blocks: finality_blocks.into(),
reward_burn_rate: (reward_burn_date as u32).into(),
+ compatible_chain_id: compatible_chain_id.into(),
allowed_eoa_type_hashes: data
.allowed_eoa_type_hashes()
.into_iter()
