set-before-send-hook
Configure a token's before-send hook on the Osmosis blockchain by specifying a contract address, enabling custom pre-transaction logic (admin access required).
Instructions
Set a before send hook for a token (admin only)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
contractAddr | Yes | Contract address for the hook | |
denom | Yes | Token denomination to set hook for | |
gas | No | Gas limit (default: auto-estimate) | |
gasPrice | No | Gas price (default: 0.025uosmo) | |
memo | No | Transaction memo | |
mnemonic | Yes | BIP-39 mnemonic phrase for signing the transaction (must be admin) |
Input Schema (JSON Schema)
{
"properties": {
"contractAddr": {
"description": "Contract address for the hook",
"type": "string"
},
"denom": {
"description": "Token denomination to set hook for",
"type": "string"
},
"gas": {
"description": "Gas limit (default: auto-estimate)",
"type": "string"
},
"gasPrice": {
"description": "Gas price (default: 0.025uosmo)",
"type": "string"
},
"memo": {
"description": "Transaction memo",
"type": "string"
},
"mnemonic": {
"description": "BIP-39 mnemonic phrase for signing the transaction (must be admin)",
"type": "string"
}
},
"required": [
"mnemonic",
"denom",
"contractAddr"
],
"type": "object"
}