Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7c4b282
chore: use common version across all packages
Nov 28, 2025
3ece6e9
Add SLSA generic generator workflow
SanadAlrowaili Feb 17, 2026
efba005
Add TestTrader contract for token swapping
SanadAlrowaili Feb 17, 2026
45cb2e0
Add initial CodeQL workflow configuration
SanadAlrowaili Feb 18, 2026
7733138
Merge pull request #1 from SanadAlrowaili/fix/deps
SanadAlrowaili Feb 19, 2026
e8452ae
Create FUNDING.json
SanadAlrowaili Feb 25, 2026
a9202a0
Revert "chore: use common version across all packages"
SanadAlrowaili Feb 26, 2026
d33862e
Update swap-vm.spec.ts
SanadAlrowaili Feb 26, 2026
d43eff2
Merge pull request #2 from SanadAlrowaili/revert-1-fix/deps
SanadAlrowaili Feb 26, 2026
b0a7619
Update address-half.test.ts
SanadAlrowaili Feb 26, 2026
5ae7438
Merge pull request #4 from SanadAlrowaili/SanadAlrowaili-patch-1
SanadAlrowaili Feb 28, 2026
c63085b
Set up Vercel Web Analytics integration (#5)
vercel[bot] Feb 28, 2026
929a92a
Set up Vercel Web Analytics integration (#6)
SanadAlrowaili Mar 1, 2026
457fb3e
Update release.yml (#7)
SanadAlrowaili Mar 1, 2026
468ad51
Potential fix for code scanning alert no. 2: Workflow does not contai…
SanadAlrowaili Mar 13, 2026
f4802e2
Merge branch '1inch:master' into master
SanadAlrowaili Apr 18, 2026
edc0262
Create SECURITY.md
SanadAlrowaili Apr 18, 2026
c3e305c
Create SECURITY.md for security policy (#11)
SanadAlrowaili Apr 21, 2026
e829102
chore(deps): bump the npm_and_yarn group across 1 directory with 3 up…
dependabot[bot] Apr 26, 2026
4ac840c
Update FUNDING.json
SanadAlrowaili Jul 31, 2026
24519e6
fix(security): patch dependency vulnerabilities via pnpm overrides
SanadAlrowaili Aug 2, 2026
9c5ef56
fix(sdk-core): repair broken AddressHalf test
SanadAlrowaili Aug 2, 2026
e7cd675
chore(ci): remove unused SLSA generic generator workflow
SanadAlrowaili Aug 4, 2026
efa9091
chore(deps): take upstream master's pnpm-workspace.yaml
SanadAlrowaili Aug 4, 2026
7fb1579
chore(deps): take upstream master's pnpm-lock.yaml
SanadAlrowaili Aug 4, 2026
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
43 changes: 43 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: 2

updates:
# npm / pnpm workspace (root manifest covers the whole monorepo)
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
groups:
# Security patches land on their own so they can be merged fast.
npm-security:
applies-to: security-updates
patterns:
- '*'
# Routine bumps are batched to keep PR noise down.
npm-dev-minor-patch:
applies-to: version-updates
dependency-type: development
update-types:
- minor
- patch
npm-prod-minor-patch:
applies-to: version-updates
dependency-type: production
update-types:
- minor
- patch

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
actions:
patterns:
- '*'

# Foundry dependencies are vendored as git submodules (see .gitmodules).
- package-ecosystem: gitsubmodule
directory: /
schedule:
interval: weekly
101 changes: 101 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '15 21 * * 5'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- name: Run manual build steps
if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release typescript
name: Release typescript/${{ inputs.project }} with ${{ inputs.bump }} version

on:
workflow_dispatch:
Expand Down
7 changes: 7 additions & 0 deletions FUNDING.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"drips": {
"ethereum": {
"ownedBy": "0xef0dd916f754087d1D4f520F6Da132169424320c"
}
}
}
21 changes: 21 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security Policy

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
79 changes: 79 additions & 0 deletions contracts/src/aqua/TestTrader1.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// SPDX-License-Identifier: LicenseRef-Degensoft-Aqua-Source-1.1
pragma solidity ^0.8.30;

import {IAqua, IERC20} from "@1inch/aqua/src/Aqua.sol";
import {IXYCSwapCallback} from "@1inch/aqua/examples/apps/interfaces/IXYCSwapCallback.sol";
import {XYCSwap} from "@1inch/aqua/examples/apps/XYCSwap.sol";

contract TestTrader is IXYCSwapCallback {
IAqua public immutable AQUA;
address public owner;
bool public isSellingPaused; // مفتاح التحكم في البيع

event AssetsWithdrawn(address token, uint256 amount);
event SaleStatusUpdated(bool paused);

modifier onlyOwner() {
require(msg.sender == owner, "Caller is not the owner");
_;
}

constructor(IAqua _aqua, IERC20[] memory tokens) {
AQUA = _aqua;
owner = msg.sender; // تعيينك كمالك للعقد
for (uint256 i = 0; i < tokens.length; i++) {
tokens[i].approve(address(AQUA), type(uint256).max);
}
}

// --- وظيفة التحكم في البيع ---
function toggleSale(bool _paused) external onlyOwner {
isSellingPaused = _paused;
emit SaleStatusUpdated(_paused);
}

// --- وظيفة سحب الأرباح والسيولة ---
function withdraw(address token, uint256 amount) external onlyOwner {
require(IERC20(token).transfer(owner, amount), "Transfer failed");
emit AssetsWithdrawn(token, amount);
}

function swap(
XYCSwap app,
XYCSwap.Strategy calldata strategy,
bool zeroForOne,
uint256 amountIn
) external returns (uint256 amountOut) {
// التحقق من حالة البيع قبل التنفيذ
require(!isSellingPaused, "Selling is currently disabled by admin");

IERC20 token = IERC20(zeroForOne ? strategy.token0 : strategy.token1);
require(
token.transferFrom(msg.sender, address(this), amountIn),
"transferFrom failed"
);

return
app.swapExactIn(
strategy,
zeroForOne,
amountIn,
0,
msg.sender,
""
);
}

function xycSwapCallback(
address tokenIn,
address,
uint256 amountIn,
uint256,
address maker,
address app,
bytes32 strategyHash,
bytes calldata data
) external override {
// يمكن إضافة منطق إضافي هنا لمراقبة كل عملية تبادل تحدث
}
}
Loading