-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #587 from neutron-org/feat/whitelist-tf-hooks
Feat: Whitelist tokenfactory hooks
- Loading branch information
Showing
28 changed files
with
1,514 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
syntax = "proto3"; | ||
package osmosis.tokenfactory; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/neutron-org/neutron/v4/x/tokenfactory/types"; | ||
|
||
// WhitelistedHook describes a beforeSendHook which is allowed to be added and executed | ||
// SetBeforeSendHook can only be called on denoms where the denom creator and | ||
// code_id for the `contract_addr` match a WhitelistedHook | ||
message WhitelistedHook { | ||
uint64 code_id = 1 [(gogoproto.customname) = "CodeID"]; | ||
string denom_creator = 2; | ||
} | ||
|
||
// Params defines the parameters for the tokenfactory module. | ||
message 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. | ||
repeated cosmos.base.v1beta1.Coin denom_creation_fee = 1 [ | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", | ||
(gogoproto.moretags) = "yaml:\"denom_creation_fee\"", | ||
(gogoproto.nullable) = false | ||
]; | ||
|
||
// 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 | ||
uint64 denom_creation_gas_consume = 2 [ | ||
(gogoproto.moretags) = "yaml:\"denom_creation_gas_consume\"", | ||
(gogoproto.nullable) = true | ||
]; | ||
|
||
// FeeCollectorAddress is the address where fees collected from denom creation | ||
// are sent to | ||
string fee_collector_address = 3; | ||
// whitelisted_hooks is the list of hooks which are allowed to be added and executed | ||
repeated WhitelistedHook whitelisted_hooks = 4; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.