Skip to content

Commit

Permalink
whitelist percentage fee handler in call filter (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
tolak authored Dec 13, 2023
1 parent 399a7ef commit 88e5b7c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions runtime/khala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ impl Contains<RuntimeCall> for BaseCallFilter {
RuntimeCall::ChainBridge { .. } |
RuntimeCall::SygmaAccessSegregator { .. } |
RuntimeCall::SygmaBasicFeeHandler { .. } |
RuntimeCall::SygmaPercentageFeeHandler { .. } |
RuntimeCall::SygmaFeeHandlerRouter { .. } |
RuntimeCall::SygmaBridge { .. } |
RuntimeCall::XTransfer { .. } |
Expand Down
1 change: 1 addition & 0 deletions runtime/phala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ impl Contains<RuntimeCall> for BaseCallFilter {
RuntimeCall::ChainBridge { .. } |
RuntimeCall::SygmaAccessSegregator { .. } |
RuntimeCall::SygmaBasicFeeHandler { .. } |
RuntimeCall::SygmaPercentageFeeHandler { .. } |
RuntimeCall::SygmaFeeHandlerRouter { .. } |
RuntimeCall::SygmaBridge { .. } |
RuntimeCall::XTransfer { .. } |
Expand Down
9 changes: 6 additions & 3 deletions runtime/rhala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ impl Contains<RuntimeCall> for BaseCallFilter {
RuntimeCall::ChainBridge { .. } |
RuntimeCall::SygmaAccessSegregator { .. } |
RuntimeCall::SygmaBasicFeeHandler { .. } |
RuntimeCall::SygmaPercentageFeeHandler { .. } |
RuntimeCall::SygmaFeeHandlerRouter { .. } |
RuntimeCall::SygmaBridge { .. } |
RuntimeCall::XTransfer { .. } |
Expand Down Expand Up @@ -1640,17 +1641,19 @@ parameter_types! {
// SygmaBridgeFeeAccountKey Address: 5FbR7ZkYSgsFsBMmqsdEpgAU7DkMdKpkGWSBZdhn6LAdesQ6
pub SygmaBridgeFeeAccountKey: [u8; 32] = hex_literal::hex!("9c20f205595671c6f121b9d9bbfb9caa66380f8f3ad8d47d901b84b7fb757042");
pub SygmaBridgeFeeAccount: AccountId = SygmaBridgeFeeAccountKey::get().into();
// SygmaBridgeAdminAccountKey Address: 43CLf23S1KsVhDn56SQfaAC8dbbnM24qS5A8jnbBixxqu3Cg
pub SygmaBridgeAdminAccountKey: [u8; 32] = hex_literal::hex!("720ef4138de57eff791ccfc14c249e58aa7718e71700892c2c59cec28a3900b9");
// SygmaBridgeAdminAccountKey Address: 42JAeZKj1w45HcnzRuXyhh2J5CY69eo5QEKSo6dtea2L2Vab
pub SygmaBridgeAdminAccountKey: [u8; 32] = hex_literal::hex!("4a4480ae399d87614e08d052cbe5d15fe3332f8a9786b456000c64fca2128a33");
pub SygmaBridgeAdminAccount: AccountId = SygmaBridgeAdminAccountKey::get().into();
// EIP712ChainID is the chainID that pallet is assigned with, used in EIP712 typed data domain
pub EIP712ChainID: SygmaChainID = U256::from(5231);
// DestVerifyingContractAddress is a H160 address that is used in proposal signature verification, specifically EIP712 typed data
// When relayers signing, this address will be included in the EIP712Domain
// As long as the relayer and pallet configured with the same address, EIP712Domain should be recognized properly.
pub DestVerifyingContractAddress: VerifyingContractAddress = primitive_types::H160::from_slice(hex::decode(DEST_VERIFYING_CONTRACT_ADDRESS).ok().unwrap().as_slice());
pub sygUSDLocation: MultiLocation = MultiLocation::new(1, X2(Parachain(1000), GeneralKey { length: 6, data: hex_literal::hex!("7379675553440000000000000000000000000000000000000000000000000000") })).into();
pub SygmaReserveAccounts: BTreeMap::<XcmAssetId, AccountId> = BTreeMap::from([
(PHALocation::get().into(), SygmaBridgeAccount::get().into())
(PHALocation::get().into(), SygmaBridgeAccount::get().into()),
(sygUSDLocation::get().into(), SygmaBridgeAccount::get().into())
]);
}

Expand Down
1 change: 1 addition & 0 deletions runtime/thala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ impl Contains<RuntimeCall> for BaseCallFilter {
RuntimeCall::ChainBridge { .. } |
RuntimeCall::SygmaAccessSegregator { .. } |
RuntimeCall::SygmaBasicFeeHandler { .. } |
RuntimeCall::SygmaPercentageFeeHandler { .. } |
RuntimeCall::SygmaFeeHandlerRouter { .. } |
RuntimeCall::SygmaBridge { .. } |
RuntimeCall::XTransfer { .. } |
Expand Down

0 comments on commit 88e5b7c

Please sign in to comment.