Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

Commit a5b0dde

Browse files
Merge pull request #432 from aibtcdev/discord-message-robust
default stx transfer
2 parents aae7ec3 + 8b9b467 commit a5b0dde

6 files changed

Lines changed: 21 additions & 21 deletions

File tree

app/services/infrastructure/job_management/tasks/agent_wallet_balance_monitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ async def _queue_funding_request(
238238
message={
239239
"recipient": wallet_address,
240240
"amount": self.funding_amount,
241-
"fee": 200, # Standard fee
241+
"fee": 400, # Standard fee
242242
"memo": f"Auto-fund: {current_balance}",
243243
"reason": reason,
244244
},

app/services/infrastructure/job_management/tasks/stx_transfer_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ async def process_message(self, message: QueueMessage) -> Dict[str, Any]:
166166
# Extract transfer parameters
167167
recipient = message_data["recipient"]
168168
amount = message_data["amount"]
169-
fee = message_data.get("fee", 200) # Default fee
169+
fee = message_data.get("fee", 400) # Default fee
170170
memo = "dusting" # Hard coded memo
171171

172172
# Validate and truncate memo to ensure it doesn't exceed 34 bytes

app/tools/wallet.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class WalletSendSTXInput(BaseModel):
134134
..., description="Amount of STX to send not in microSTX. Default is 1."
135135
)
136136
fee: Optional[int] = Field(
137-
200, description="Transaction fee in microSTX. Default is 200."
137+
400, description="Transaction fee in microSTX. Default is 400."
138138
)
139139
memo: Optional[str] = Field(
140140
"", description="Optional memo to include with the transaction."
@@ -145,7 +145,7 @@ class WalletSendSTX(BaseTool):
145145
name: str = "wallet_send_stx"
146146
description: str = (
147147
"Send STX tokens from your wallet to a recipient address. Specify amount in STX "
148-
"(not microSTX), optional fee in microSTX (default 200), and optional memo."
148+
"(not microSTX), optional fee in microSTX (default 400), and optional memo."
149149
)
150150
args_schema: Type[BaseModel] = WalletSendSTXInput
151151
return_direct: bool = False
@@ -159,7 +159,7 @@ def _deploy(
159159
self,
160160
recipient: str,
161161
amount: int,
162-
fee: Optional[int] = 200,
162+
fee: Optional[int] = 400,
163163
memo: Optional[str] = "",
164164
**kwargs,
165165
) -> Dict[str, Union[str, bool, None]]:
@@ -184,7 +184,7 @@ def _run(
184184
self,
185185
recipient: str,
186186
amount: int,
187-
fee: Optional[int] = 200,
187+
fee: Optional[int] = 400,
188188
memo: Optional[str] = "",
189189
**kwargs,
190190
) -> Dict[str, Union[str, bool, None]]:
@@ -195,7 +195,7 @@ async def _arun(
195195
self,
196196
recipient: str,
197197
amount: int,
198-
fee: Optional[int] = 200,
198+
fee: Optional[int] = 400,
199199
memo: Optional[str] = "",
200200
**kwargs,
201201
) -> Dict[str, Union[str, bool, None]]:

docs/agent-account-deployer-funding.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The funding behavior is controlled by these constants in the `AgentAccountDeploy
1616

1717
```python
1818
DEFAULT_AGENT_FUNDING_AMOUNT = 1 # STX to send to newly deployed agent accounts
19-
DEFAULT_AGENT_FUNDING_FEE = 200 # microSTX transaction fee
19+
DEFAULT_AGENT_FUNDING_FEE = 400 # microSTX transaction fee
2020
```
2121

2222
## Funding Process
@@ -31,7 +31,7 @@ Automatic funding is triggered after:
3131

3232
Each funded agent account receives:
3333
- **Amount**: 1 STX (configurable via `DEFAULT_AGENT_FUNDING_AMOUNT`)
34-
- **Fee**: 200 microSTX (configurable via `DEFAULT_AGENT_FUNDING_FEE`)
34+
- **Fee**: 200 microSTX (configurable via `DEFAULT_AGENT_FUNDING_FEE`)
3535
- **Recipient**: The deployed contract principal (e.g., `SP1ABC...DEF.aibtc-acct-12345`)
3636
- **Memo**: Descriptive text: `"Initial funding for deployed agent account: {contract_principal}"`
3737

@@ -61,7 +61,7 @@ QueueMessageCreate(
6161
message={
6262
"recipient": "SP1ABC...DEF.aibtc-acct-12345", # Agent contract address
6363
"amount": 1, # STX amount
64-
"fee": 200, # microSTX fee
64+
"fee": 400, # microSTX fee
6565
"memo": "Initial funding for deployed agent account: SP1ABC...DEF.aibtc-acct-12345"
6666
}
6767
)
@@ -191,7 +191,7 @@ if contract_balance < minimum_required_balance:
191191
Monitor funding operations through:
192192

193193
- **Deployment Results**: Check `funding_messages_created` in task results
194-
- **STX Transfer Task**: Monitor funding transfer success rates
194+
- **STX Transfer Task**: Monitor funding transfer success rates
195195
- **Wallet Balances**: Track treasury wallet balance for funding capacity
196196
- **Failed Funding**: Alert on persistent funding failures
197197

@@ -200,4 +200,4 @@ Monitor funding operations through:
200200
- **Wallet Security**: Ensure funding wallet private keys are secure
201201
- **Amount Limits**: Configure reasonable funding amounts to prevent abuse
202202
- **Rate Limiting**: Monitor funding frequency to detect anomalies
203-
- **Access Control**: Restrict who can modify funding configuration
203+
- **Access Control**: Restrict who can modify funding configuration

docs/stx-transfer-task.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ queue_message = QueueMessageCreate(
4646
message={
4747
"recipient": "SP1ABC123...", # Required: STX recipient address
4848
"amount": 5, # Required: Amount in STX (not microSTX)
49-
"fee": 200, # Optional: Fee in microSTX (default: 200)
49+
"fee": 400, # Optional: Fee in microSTX (default: 200)
5050
"memo": "Payment for..." # Optional: Transaction memo
5151
}
5252
)
@@ -55,7 +55,7 @@ queue_message = QueueMessageCreate(
5555
### Required Fields
5656

5757
- **`wallet_id`**: UUID of the wallet to send STX from (or `null` to use backend wallet)
58-
- **`message.recipient`**: Valid STX address (starts with SP or ST)
58+
- **`message.recipient`**: Valid STX address (starts with SP or ST)
5959
- **`message.amount`**: Positive integer amount in STX
6060

6161
### Optional Fields
@@ -109,7 +109,7 @@ message = QueueMessageCreate(
109109
message={
110110
"recipient": "SP1ABC123DEF456GHI789JKL012MNO345PQR678",
111111
"amount": 1,
112-
"fee": 200,
112+
"fee": 400,
113113
"memo": "Initial funding for agent account"
114114
}
115115
)
@@ -130,7 +130,7 @@ transfers = [
130130
"memo": "Payment 1"
131131
},
132132
{
133-
"wallet_id": UUID("wallet-2"),
133+
"wallet_id": UUID("wallet-2"),
134134
"recipient": "SP2DEF...",
135135
"amount": 3,
136136
"memo": "Payment 2"
@@ -266,4 +266,4 @@ This will log:
266266
- Message validation details
267267
- Transfer parameters
268268
- Tool execution results
269-
- Error details
269+
- Error details

examples/stx_transfer_example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def create_stx_transfer_message(
1414
wallet_id: UUID = None,
1515
recipient: str = None,
1616
amount: int = None,
17-
fee: int = 200,
17+
fee: int = 400,
1818
memo: str = "",
1919
dao_id: UUID = None,
2020
) -> str:
@@ -24,7 +24,7 @@ def create_stx_transfer_message(
2424
wallet_id: UUID of the wallet to send STX from (None = use backend wallet)
2525
recipient: STX address to send tokens to (e.g., "SP1ABC...DEF")
2626
amount: Amount of STX to send (in STX, not microSTX)
27-
fee: Transaction fee in microSTX (default: 200)
27+
fee: Transaction fee in microSTX (default: 400)
2828
memo: Optional memo for the transaction
2929
dao_id: Optional DAO ID if this transfer is DAO-related
3030
@@ -100,7 +100,7 @@ def create_multiple_stx_transfers(transfers: list) -> list:
100100
wallet_id=transfer["wallet_id"],
101101
recipient=transfer["recipient"],
102102
amount=transfer["amount"],
103-
fee=transfer.get("fee", 200),
103+
fee=transfer.get("fee", 400),
104104
memo=transfer.get("memo", ""),
105105
dao_id=transfer.get("dao_id"),
106106
)
@@ -123,7 +123,7 @@ def create_multiple_stx_transfers(transfers: list) -> list:
123123
wallet_id=example_wallet_id,
124124
recipient=example_recipient,
125125
amount=1, # Send 1 STX
126-
fee=200, # 200 microSTX fee
126+
fee=400, # 200 microSTX fee
127127
memo="Test transfer from example script",
128128
)
129129

0 commit comments

Comments
 (0)