Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions developers/modules/tokenfactory/explanation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type TrackBeforeSendMsg struct {
}
```
- Used for monitoring/tracking transfers
- Has gas limit of 500,000 gas
- Has gas limit defined by the module's `track_before_send_gas_limit` param
- Errors are suppressed (don't block transfers)

**BlockBeforeSend:**
Expand Down Expand Up @@ -161,7 +161,7 @@ type BlockBeforeSendMsg struct {

**Gas Consumption:**
- Additional gas cost via `denom_creation_gas_consume` parameter
- TrackBeforeSend hooks have 500,000 gas limit
- TrackBeforeSend hooks have a gas limit defined by the module's `track_before_send_gas_limit` param
- Gas consumption prevents infinite contract calls

## Force Transfer Capability
Expand Down
2 changes: 1 addition & 1 deletion developers/modules/tokenfactory/how-to.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ neutrond tx tokenfactory mint 1000000factory/neutron1creator.../mytoken --from c
2. **Irreversible Actions**: Admin renunciation cannot be undone
3. **Hook Dependencies**: Before-send hooks must be whitelisted by governance
4. **Fee Requirements**: Check current creation fees via `params` query
5. **Gas Limits**: Before-send hooks have execution gas limits
5. **Gas Limits**: Before-send hooks have execution gas limits

## Troubleshooting

Expand Down
6 changes: 4 additions & 2 deletions developers/modules/tokenfactory/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ message Params {
uint64 denom_creation_gas_consume = 2;
string fee_collector_address = 3;
repeated WhitelistedHook whitelisted_hooks = 4;
uint64 track_before_send_gas_limit = 5;
}

message WhitelistedHook {
Expand All @@ -113,6 +114,7 @@ message WhitelistedHook {
| `denom_creation_gas_consume` | uint64 | Additional gas cost for denomination creation |
| `fee_collector_address` | string | Address receiving creation fees |
| `whitelisted_hooks` | []WhitelistedHook | Approved contracts for before-send hooks |
| `track_before_send_gas_limit` | uint64 | Sets a limit on the gas that can be consumed by the before_send hook |

## Before-Send Hooks

Expand All @@ -124,7 +126,7 @@ Before-send hooks allow token admins to implement custom logic that executes bef
- Provides security against malicious hook contracts

### Hook Types
- **TrackBeforeSend**: Monitoring hooks with gas limits (500,000 gas limit)
- **TrackBeforeSend**: Monitoring hooks with gas limits (defined by the module's `track_before_send_gas_limit` param, default vaule is 500,000)
- **BlockBeforeSend**: Blocking hooks that can prevent transfers

## Administrative Model
Expand All @@ -139,4 +141,4 @@ Before-send hooks allow token admins to implement custom logic that executes bef
- **Admin Controls**: Only token admin can perform privileged operations
- **Hook Restrictions**: Governance-controlled hook whitelisting
- **Module Account Protection**: Burning from module accounts is prevented
- **Gas Limits**: Before-send hooks have gas consumption limits
- **Gas Limits**: Before-send hooks have gas consumption limits defined by the module's `track_before_send_gas_limit` param
2 changes: 2 additions & 0 deletions developers/modules/tokenfactory/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The Token Factory module enables creation and management of custom tokens with c
| `denom_creation_gas_consume` | uint64 | Additional gas consumed during token creation |
| `fee_collector_address` | string | Address where creation fees are sent |
| `whitelisted_hooks` | WhitelistedHook[] | List of approved before-send hook contracts |
| `track_before_send_gas_limit` | uint64 | Sets a limit on the gas that can be consumed by the before_send hook |


## Messages

Expand Down
Loading