Skip to content

Commit

Permalink
Merge pull request #150 from neutron-org/feat/whitelist-tf-hooks
Browse files Browse the repository at this point in the history
feat: whitelist tf hooks
  • Loading branch information
pr0n00gler authored Jul 4, 2024
2 parents 9aac376 + 813f9e0 commit 6043a8b
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 22 deletions.
2 changes: 1 addition & 1 deletion packages/neutron-sdk/src/proto_types/NEUTRON_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3357d418e391c14e1a4800ab640932896ed93fe8
a6eae66545df6e128da2c7cac81ff4c1c02deb7b
1 change: 1 addition & 0 deletions packages/neutron-sdk/src/proto_types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub mod neutron {
}
pub mod osmosis {
pub mod tokenfactory {
include!("osmosis.tokenfactory.rs");
pub mod v1beta1 {
include!("osmosis.tokenfactory.v1beta1.rs");
}
Expand Down
31 changes: 31 additions & 0 deletions packages/neutron-sdk/src/proto_types/osmosis.tokenfactory.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// @generated
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WhitelistedHook {
#[prost(uint64, tag = "1")]
pub code_id: u64,
#[prost(string, tag = "2")]
pub denom_creator: ::prost::alloc::string::String,
}
/// Params defines the parameters for the tokenfactory module.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
/// DenomCreationFee defines the fee to be charged on the creation of a new
/// denom. The fee is drawn from the MsgCreateDenom's sender account, and
/// transferred to the community pool.
#[prost(message, repeated, tag = "1")]
pub denom_creation_fee: ::prost::alloc::vec::Vec<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
/// DenomCreationGasConsume defines the gas cost for creating a new denom.
/// This is intended as a spam deterrence mechanism.
///
/// See: <https://github.com/CosmWasm/token-factory/issues/11>
#[prost(uint64, tag = "2")]
pub denom_creation_gas_consume: u64,
/// FeeCollectorAddress is the address where fees collected from denom creation
/// are sent to
#[prost(string, tag = "3")]
pub fee_collector_address: ::prost::alloc::string::String,
/// HookWhitelist is the list of hooks which are allowed to be added and executed
#[prost(message, repeated, tag = "4")]
pub whitelisted_hooks: ::prost::alloc::vec::Vec<WhitelistedHook>,
}
// @@protoc_insertion_point(module)
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ pub struct DenomAuthorityMetadata {
#[prost(string, tag = "1")]
pub admin: ::prost::alloc::string::String,
}
/// GenesisState defines the tokenfactory module's genesis state.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
/// params defines the parameters of the module.
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<super::Params>,
#[prost(message, repeated, tag = "2")]
pub factory_denoms: ::prost::alloc::vec::Vec<GenesisDenom>,
}
/// GenesisDenom defines a tokenfactory denom that is defined within genesis
/// state. The structure contains DenomAuthorityMetadata which defines the
/// denom's admin.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisDenom {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub authority_metadata: ::core::option::Option<DenomAuthorityMetadata>,
}
/// Params defines the parameters for the tokenfactory module.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
Expand All @@ -27,25 +46,6 @@ pub struct Params {
#[prost(string, tag = "3")]
pub fee_collector_address: ::prost::alloc::string::String,
}
/// GenesisState defines the tokenfactory module's genesis state.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
/// params defines the paramaters of the module.
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
#[prost(message, repeated, tag = "2")]
pub factory_denoms: ::prost::alloc::vec::Vec<GenesisDenom>,
}
/// GenesisDenom defines a tokenfactory denom that is defined within genesis
/// state. The structure contains DenomAuthorityMetadata which defines the
/// denom's admin.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisDenom {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub authority_metadata: ::core::option::Option<DenomAuthorityMetadata>,
}
/// QueryParamsRequest is the request type for the Query/Params RPC method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {}
Expand All @@ -54,7 +54,7 @@ pub struct QueryParamsRequest {}
pub struct QueryParamsResponse {
/// params defines the parameters of the module.
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
pub params: ::core::option::Option<super::Params>,
}
/// QueryDenomAuthorityMetadataRequest defines the request structure for the
/// DenomAuthorityMetadata gRPC query.
Expand Down Expand Up @@ -218,7 +218,7 @@ pub struct MsgUpdateParams {
///
/// NOTE: All parameters must be supplied.
#[prost(message, optional, tag = "2")]
pub params: ::core::option::Option<Params>,
pub params: ::core::option::Option<super::Params>,
}
/// MsgUpdateParamsResponse defines the response structure for executing a
/// MsgUpdateParams message.
Expand Down

0 comments on commit 6043a8b

Please sign in to comment.