nyxora 26.6.30 → 26.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/packages/core/src/web3/skills/defiLending.js +1 -1
- package/dist/packages/core/src/web3/skills/getBalance.js +1 -1
- package/dist/packages/core/src/web3/skills/provideLiquidity.js +1 -1
- package/dist/packages/core/src/web3/skills/revokeApprovals.js +1 -1
- package/dist/packages/core/src/web3/skills/swapToken.js +2 -2
- package/dist/packages/core/src/web3/skills/transfer.js +1 -1
- package/dist/packages/core/src/web3/skills/yieldVault.js +1 -1
- package/package.json +1 -1
- package/packages/core/package.json +1 -1
- package/packages/core/src/web3/skills/defiLending.ts +1 -1
- package/packages/core/src/web3/skills/getBalance.ts +1 -1
- package/packages/core/src/web3/skills/provideLiquidity.ts +1 -1
- package/packages/core/src/web3/skills/revokeApprovals.ts +1 -1
- package/packages/core/src/web3/skills/swapToken.ts +2 -2
- package/packages/core/src/web3/skills/transfer.ts +1 -1
- package/packages/core/src/web3/skills/yieldVault.ts +1 -1
- package/packages/dashboard/package.json +1 -1
- package/packages/mcp-server/package.json +1 -1
- package/packages/policy/package.json +1 -1
- package/packages/signer/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepashangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [26.7.1]
|
|
9
|
+
### Bug Fixes & Optimizations
|
|
10
|
+
- **Native Coin Resolution Mass Remediation**: Fixed a systemic architectural flaw where Web3 transaction modules strictly validated against the Zero Address (`0x00...00`) for native coins (ETH/BNB/MATIC). The codebase now universally intercepts and processes the `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` pseudo-address generated by aggregators. This stabilizes critical transactional skills including:
|
|
11
|
+
- **DEX Swapping**: Prevents contract decimals parsing crashes during Native to ERC20 swaps (`swapToken.ts`).
|
|
12
|
+
- **Asset Transfers**: Safely bypasses `transfer()` contract calls when sending native coins (`transfer.ts`).
|
|
13
|
+
- **DeFi Lending**: Ensures AAVE dynamically routes to WETH gateways for native deposits (`defiLending.ts`).
|
|
14
|
+
- **Yield Vaults & Liquidity (V3)**: Secures deposit validations and prevents false rejections (`yieldVault.ts`, `provideLiquidity.ts`).
|
|
15
|
+
- **Security Approvals**: Blocks artificial revoke requests on native coins gracefully (`revokeApprovals.ts`).
|
|
16
|
+
- **Balance Queries**: Correctly routes to native balance RPC methods instead of standard ERC20 `balanceOf` (`getBalance.ts`).
|
|
17
|
+
|
|
18
|
+
|
|
8
19
|
## [26.6.30]
|
|
9
20
|
### UI/UX & Quality of Life
|
|
10
21
|
- **AI Web Platform Style Empty State**: Overhauled the default chat interface when no messages are present. The dashboard now features a sleek, centered "What's on your mind today?" greeting, automatically repositioning the input bar to the center.
|
|
@@ -42,7 +42,7 @@ async function prepareAaveSupply(chainName, tokenAddressOrSymbol, amountStr) {
|
|
|
42
42
|
return `Error: Aave V3 is not officially supported or mapped by Nyxora on the ${chainName} network.`;
|
|
43
43
|
}
|
|
44
44
|
let tokenAddress = (0, tokens_1.resolveToken)(tokenAddressOrSymbol, chainName);
|
|
45
|
-
if (tokenAddress === "0x0000000000000000000000000000000000000000") {
|
|
45
|
+
if (tokenAddress === "0x0000000000000000000000000000000000000000" || tokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
46
46
|
return "Error: Cannot supply native ETH/BNB directly. Please provide WETH or a valid ERC-20 token.";
|
|
47
47
|
}
|
|
48
48
|
const metadata = await (0, tokens_1.getTokenMetadata)(publicClient, tokenAddress);
|
|
@@ -52,7 +52,7 @@ async function getBalance(chainName, address, token) {
|
|
|
52
52
|
}
|
|
53
53
|
if (token) {
|
|
54
54
|
const tokenAddress = (0, tokens_1.resolveToken)(token, chainName);
|
|
55
|
-
if (tokenAddress === "0x0000000000000000000000000000000000000000") {
|
|
55
|
+
if (tokenAddress === "0x0000000000000000000000000000000000000000" || tokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
56
56
|
const balanceWei = await client.getBalance({ address: targetAddress });
|
|
57
57
|
const balanceEth = (0, viem_1.formatEther)(balanceWei);
|
|
58
58
|
return `${balanceEth} on ${chainName}`;
|
|
@@ -86,7 +86,7 @@ async function prepareProvideLiquidity(chainName, token0AddressOrSymbol, token1A
|
|
|
86
86
|
}
|
|
87
87
|
let token0Addr = (0, tokens_1.resolveToken)(token0AddressOrSymbol, chainName);
|
|
88
88
|
let token1Addr = (0, tokens_1.resolveToken)(token1AddressOrSymbol, chainName);
|
|
89
|
-
if (token0Addr === "0x0000000000000000000000000000000000000000" || token1Addr === "0x0000000000000000000000000000000000000000") {
|
|
89
|
+
if (token0Addr === "0x0000000000000000000000000000000000000000" || token0Addr === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" || token1Addr === "0x0000000000000000000000000000000000000000" || token1Addr === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
90
90
|
return "Error: Cannot provide native ETH directly to V3. Must wrap to WETH first.";
|
|
91
91
|
}
|
|
92
92
|
// Uniswap requires token0 to be lexicographically smaller than token1
|
|
@@ -14,7 +14,7 @@ async function prepareRevokeApproval(chainName, tokenAddressOrSymbol, spenderAdd
|
|
|
14
14
|
const userAddress = await (0, config_1.getAddress)();
|
|
15
15
|
const account = userAddress;
|
|
16
16
|
let tokenAddress = (0, tokens_1.resolveToken)(tokenAddressOrSymbol, chainName);
|
|
17
|
-
if (tokenAddress === "0x0000000000000000000000000000000000000000") {
|
|
17
|
+
if (tokenAddress === "0x0000000000000000000000000000000000000000" || tokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
18
18
|
return "Cannot revoke approval for native tokens.";
|
|
19
19
|
}
|
|
20
20
|
const metadata = await (0, tokens_1.getTokenMetadata)(publicClient, tokenAddress);
|
|
@@ -50,11 +50,11 @@ async function prepareSwapToken(chainName, fromToken, toToken, amountStr, mode =
|
|
|
50
50
|
const userAddress = await (0, vaultClient_1.getAddress)();
|
|
51
51
|
const fromTokenAddress = (0, tokens_1.resolveToken)(fromToken, chainName);
|
|
52
52
|
const toTokenAddress = (0, tokens_1.resolveToken)(toToken, chainName);
|
|
53
|
-
const isNativeIn = fromTokenAddress === "0x0000000000000000000000000000000000000000";
|
|
53
|
+
const isNativeIn = fromTokenAddress === "0x0000000000000000000000000000000000000000" || fromTokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
54
54
|
// Auto-save to Degen Whitelist
|
|
55
55
|
if (!isNativeIn)
|
|
56
56
|
await (0, userWhitelistManager_1.saveTokenToWhitelist)(userAddress, chainName, fromTokenAddress, 'swap');
|
|
57
|
-
if (toTokenAddress !== "0x0000000000000000000000000000000000000000") {
|
|
57
|
+
if (toTokenAddress !== "0x0000000000000000000000000000000000000000" && toTokenAddress !== "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
58
58
|
await (0, userWhitelistManager_1.saveTokenToWhitelist)(userAddress, chainName, toTokenAddress, 'swap');
|
|
59
59
|
}
|
|
60
60
|
// Fetch actual token decimals on-chain to prevent overflow (BUG #1 Fix)
|
|
@@ -24,7 +24,7 @@ async function prepareTransfer(chainName, toAddress, amountStr, token) {
|
|
|
24
24
|
let symbol = "ETH/BNB"; // Generic fallback for native
|
|
25
25
|
if (token) {
|
|
26
26
|
tokenAddress = (0, tokens_1.resolveToken)(token, chainName);
|
|
27
|
-
isNative = tokenAddress === "0x0000000000000000000000000000000000000000";
|
|
27
|
+
isNative = tokenAddress === "0x0000000000000000000000000000000000000000" || tokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
28
28
|
}
|
|
29
29
|
let gasEstimate = 0n;
|
|
30
30
|
if (isNative) {
|
|
@@ -31,7 +31,7 @@ async function prepareVaultDeposit(chainName, protocol, vaultAddress, tokenAddre
|
|
|
31
31
|
const userAddress = await (0, config_1.getAddress)();
|
|
32
32
|
const account = userAddress;
|
|
33
33
|
let tokenAddress = (0, tokens_1.resolveToken)(tokenAddressOrSymbol, chainName);
|
|
34
|
-
if (tokenAddress === "0x0000000000000000000000000000000000000000") {
|
|
34
|
+
if (tokenAddress === "0x0000000000000000000000000000000000000000" || tokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
35
35
|
return "Error: Cannot deposit native token directly into Vaults. Please wrap it first (e.g. WETH).";
|
|
36
36
|
}
|
|
37
37
|
const metadata = await (0, tokens_1.getTokenMetadata)(publicClient, tokenAddress);
|
package/package.json
CHANGED
|
@@ -42,7 +42,7 @@ export async function prepareAaveSupply(chainName: ChainName, tokenAddressOrSymb
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
let tokenAddress = resolveToken(tokenAddressOrSymbol, chainName);
|
|
45
|
-
if (tokenAddress === "0x0000000000000000000000000000000000000000") {
|
|
45
|
+
if (tokenAddress === "0x0000000000000000000000000000000000000000" || tokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
46
46
|
return "Error: Cannot supply native ETH/BNB directly. Please provide WETH or a valid ERC-20 token.";
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -19,7 +19,7 @@ export async function getBalance(chainName: ChainName, address?: `0x${string}`,
|
|
|
19
19
|
|
|
20
20
|
if (token) {
|
|
21
21
|
const tokenAddress = resolveToken(token, chainName);
|
|
22
|
-
if (tokenAddress === "0x0000000000000000000000000000000000000000") {
|
|
22
|
+
if (tokenAddress === "0x0000000000000000000000000000000000000000" || tokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
23
23
|
const balanceWei = await client.getBalance({ address: targetAddress as `0x${string}` });
|
|
24
24
|
const balanceEth = formatEther(balanceWei);
|
|
25
25
|
return `${balanceEth} on ${chainName}`;
|
|
@@ -99,7 +99,7 @@ export async function prepareProvideLiquidity(
|
|
|
99
99
|
let token0Addr = resolveToken(token0AddressOrSymbol, chainName) as `0x${string}`;
|
|
100
100
|
let token1Addr = resolveToken(token1AddressOrSymbol, chainName) as `0x${string}`;
|
|
101
101
|
|
|
102
|
-
if (token0Addr === "0x0000000000000000000000000000000000000000" || token1Addr === "0x0000000000000000000000000000000000000000") {
|
|
102
|
+
if (token0Addr === "0x0000000000000000000000000000000000000000" || token0Addr === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" || token1Addr === "0x0000000000000000000000000000000000000000" || token1Addr === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
103
103
|
return "Error: Cannot provide native ETH directly to V3. Must wrap to WETH first.";
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -13,7 +13,7 @@ export async function prepareRevokeApproval(chainName: ChainName, tokenAddressOr
|
|
|
13
13
|
const account = userAddress as `0x${string}`;
|
|
14
14
|
|
|
15
15
|
let tokenAddress = resolveToken(tokenAddressOrSymbol, chainName);
|
|
16
|
-
if (tokenAddress === "0x0000000000000000000000000000000000000000") {
|
|
16
|
+
if (tokenAddress === "0x0000000000000000000000000000000000000000" || tokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
17
17
|
return "Cannot revoke approval for native tokens.";
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -21,11 +21,11 @@ export async function prepareSwapToken(
|
|
|
21
21
|
|
|
22
22
|
const fromTokenAddress = resolveToken(fromToken, chainName);
|
|
23
23
|
const toTokenAddress = resolveToken(toToken, chainName);
|
|
24
|
-
const isNativeIn = fromTokenAddress === "0x0000000000000000000000000000000000000000";
|
|
24
|
+
const isNativeIn = fromTokenAddress === "0x0000000000000000000000000000000000000000" || fromTokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
25
25
|
|
|
26
26
|
// Auto-save to Degen Whitelist
|
|
27
27
|
if (!isNativeIn) await saveTokenToWhitelist(userAddress, chainName, fromTokenAddress, 'swap');
|
|
28
|
-
if (toTokenAddress !== "0x0000000000000000000000000000000000000000") {
|
|
28
|
+
if (toTokenAddress !== "0x0000000000000000000000000000000000000000" && toTokenAddress !== "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
29
29
|
await saveTokenToWhitelist(userAddress, chainName, toTokenAddress, 'swap');
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -22,7 +22,7 @@ export async function prepareTransfer(chainName: ChainName, toAddress: `0x${stri
|
|
|
22
22
|
|
|
23
23
|
if (token) {
|
|
24
24
|
tokenAddress = resolveToken(token, chainName);
|
|
25
|
-
isNative = tokenAddress === "0x0000000000000000000000000000000000000000";
|
|
25
|
+
isNative = tokenAddress === "0x0000000000000000000000000000000000000000" || tokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
let gasEstimate: bigint = 0n;
|
|
@@ -29,7 +29,7 @@ export async function prepareVaultDeposit(chainName: ChainName, protocol: string
|
|
|
29
29
|
const account = userAddress as `0x${string}`;
|
|
30
30
|
|
|
31
31
|
let tokenAddress = resolveToken(tokenAddressOrSymbol, chainName);
|
|
32
|
-
if (tokenAddress === "0x0000000000000000000000000000000000000000") {
|
|
32
|
+
if (tokenAddress === "0x0000000000000000000000000000000000000000" || tokenAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
|
33
33
|
return "Error: Cannot deposit native token directly into Vaults. Please wrap it first (e.g. WETH).";
|
|
34
34
|
}
|
|
35
35
|
|