refactor: move all remaining files to orig/ directory

Completed clean root directory structure:
- Root now contains only: .git, .env, docs/, orig/
- Moved all remaining files and directories to orig/:
  - Config files (.claude, .dockerignore, .drone.yml, etc.)
  - All .env variants (except active .env)
  - Git config (.gitconfig, .github, .gitignore, etc.)
  - Tool configs (.golangci.yml, .revive.toml, etc.)
  - Documentation (*.md files, @prompts)
  - Build files (Dockerfiles, Makefile, go.mod, go.sum)
  - Docker compose files
  - All source directories (scripts, tests, tools, etc.)
  - Runtime directories (logs, monitoring, reports)
  - Dependency files (node_modules, lib, cache)
  - Special files (--delete)

- Removed empty runtime directories (bin/, data/)

V2 structure is now clean:
- docs/planning/ - V2 planning documents
- orig/ - Complete V1 codebase preserved
- .env - Active environment config (not in git)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Administrator
2025-11-10 10:53:05 +01:00
parent 803de231ba
commit c54c569f30
718 changed files with 8304 additions and 8281 deletions

View File

@@ -0,0 +1,32 @@
package mocks
import (
"testing"
"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/assert"
)
// TestMockDEXInteraction tests mock DEX interaction creation
func TestMockDEXInteraction(t *testing.T) {
dexInteraction := CreateMockDEXInteraction()
assert.Equal(t, "UniswapV3", dexInteraction.Protocol)
assert.Equal(t, common.HexToAddress("0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640"), dexInteraction.Pool)
assert.Equal(t, common.HexToAddress("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"), dexInteraction.TokenIn)
assert.Equal(t, common.HexToAddress("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"), dexInteraction.TokenOut)
assert.NotNil(t, dexInteraction.AmountIn)
assert.NotNil(t, dexInteraction.AmountOut)
}
// TestMockTransaction tests mock transaction creation
func TestMockTransaction(t *testing.T) {
to := common.HexToAddress("0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640")
data := []byte("test_data")
tx := CreateMockTransaction(to, data)
assert.Equal(t, to, *tx.To())
assert.Equal(t, data, tx.Data())
assert.Equal(t, uint64(1), tx.Nonce())
}

View File

@@ -0,0 +1,57 @@
package mocks
import (
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/fraktal/mev-beta/pkg/arbitrum"
)
// CreateMockL2Message creates a realistic L2 message for testing
func CreateMockL2Message() *arbitrum.L2Message {
// Create a mock transaction
to := common.HexToAddress("0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640") // Uniswap V3 pool
tx := types.NewTransaction(
1, // nonce
to, // to
big.NewInt(0), // value
21000, // gas limit
big.NewInt(20000000000), // gas price (20 gwei)
[]byte{}, // data
)
return &arbitrum.L2Message{
Type: arbitrum.L2Transaction,
MessageNumber: big.NewInt(12345),
ParsedTx: tx,
InnerTxs: []*types.Transaction{tx},
}
}
// CreateMockDEXInteraction creates a realistic DEX interaction for testing
func CreateMockDEXInteraction() *arbitrum.DEXInteraction {
return &arbitrum.DEXInteraction{
Protocol: "UniswapV3",
Pool: common.HexToAddress("0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640"),
TokenIn: common.HexToAddress("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"), // USDC
TokenOut: common.HexToAddress("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"), // WETH
AmountIn: big.NewInt(1000000000), // 1000 USDC
AmountOut: big.NewInt(500000000000000000), // 0.5 ETH
MessageNumber: big.NewInt(12345),
Timestamp: uint64(1234567890),
}
}
// CreateMockTransaction creates a realistic transaction for testing
func CreateMockTransaction(to common.Address, data []byte) *types.Transaction {
return types.NewTransaction(
1, // nonce
to, // to
big.NewInt(0), // value
21000, // gas limit
big.NewInt(20000000000), // gas price (20 gwei)
data, // data
)
}