Skip to content

Commit

Permalink
Merge branch 'realitySpiral/coinbaseTrading' of https://github.com/mo…
Browse files Browse the repository at this point in the history
…nilpat/eliza into realitySpiral/coinbaseTrading
  • Loading branch information
monilpat committed Nov 28, 2024
2 parents 90bf758 + 1f864a1 commit cd98ff9
Show file tree
Hide file tree
Showing 850 changed files with 71,456 additions and 38,903 deletions.
152 changes: 152 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Discord Configuration
DISCORD_APPLICATION_ID=
DISCORD_API_TOKEN= # Bot token
DISCORD_VOICE_CHANNEL_ID= # The ID of the voice channel the bot should join (optional)

# AI Model API Keys
OPENAI_API_KEY= # OpenAI API key, starting with sk-

ETERNALAI_URL=
ETERNALAI_API_KEY=

REDPILL_API_KEY= # REDPILL API Key
GROK_API_KEY= # GROK API Key
GROQ_API_KEY= # Starts with gsk_
OPENROUTER_API_KEY=
GOOGLE_GENERATIVE_AI_API_KEY= # Gemini API key

# Speech Synthesis
ELEVENLABS_XI_API_KEY= # API key from elevenlabs

# ElevenLabs Settings
ELEVENLABS_MODEL_ID=eleven_multilingual_v2
ELEVENLABS_VOICE_ID=21m00Tcm4TlvDq8ikWAM
ELEVENLABS_VOICE_STABILITY=0.5
ELEVENLABS_VOICE_SIMILARITY_BOOST=0.9
ELEVENLABS_VOICE_STYLE=0.66
ELEVENLABS_VOICE_USE_SPEAKER_BOOST=false
ELEVENLABS_OPTIMIZE_STREAMING_LATENCY=4
ELEVENLABS_OUTPUT_FORMAT=pcm_16000

# Twitter/X Configuration
TWITTER_DRY_RUN=false
TWITTER_USERNAME= # Account username
TWITTER_PASSWORD= # Account password
TWITTER_EMAIL= # Account email
TWITTER_2FA_SECRET=
TWITTER_COOKIES= # Account cookies
X_SERVER_URL=
XAI_API_KEY=
XAI_MODEL=

# Post Interval Settings (in minutes)
POST_INTERVAL_MIN= # Default: 90
POST_INTERVAL_MAX= # Default: 180
POST_IMMEDIATELY=

# Feature Flags
IMAGE_GEN= # Set to TRUE to enable image generation
USE_OPENAI_EMBEDDING= # Set to TRUE for OpenAI, leave blank for local

# OpenRouter Models
OPENROUTER_MODEL= # Default: uses hermes 70b/405b
SMALL_OPENROUTER_MODEL=
MEDIUM_OPENROUTER_MODEL=
LARGE_OPENROUTER_MODEL=

# Ollama Configuration
OLLAMA_SERVER_URL= # Default: localhost:11434
OLLAMA_MODEL=
OLLAMA_EMBEDDING_MODEL= # Default: mxbai-embed-large
SMALL_OLLAMA_MODEL= # Default: llama3.2
MEDIUM_OLLAMA_MODEL= # Default: hermes3
LARGE_OLLAMA_MODEL= # Default: hermes3:70b

# API Keys
ANTHROPIC_API_KEY= # For Claude
HEURIST_API_KEY= # Get from https://heurist.ai/dev-access

# Heurist Models
SMALL_HEURIST_LANGUAGE_MODEL=
MEDIUM_HEURIST_LANGUAGE_MODEL=
LARGE_HEURIST_LANGUAGE_MODEL=
HEURIST_IMAGE_MODEL=

# EVM
EVM_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY
EVM_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY

# Solana
SOLANA_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY
SOLANA_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY

# Fallback Wallet Configuration (deprecated)
WALLET_PRIVATE_KEY=EXAMPLE_WALLET_PRIVATE_KEY
WALLET_PUBLIC_KEY=EXAMPLE_WALLET_PUBLIC_KEY

BIRDEYE_API_KEY=

# Solana Configuration
SOL_ADDRESS=So11111111111111111111111111111111111111112
SLIPPAGE=1
BASE_MINT=So11111111111111111111111111111111111111112
RPC_URL=https://api.mainnet-beta.solana.com
HELIUS_API_KEY=

# Telegram Configuration
TELEGRAM_BOT_TOKEN=

# Together Configuration
TOGETHER_API_KEY=

# Server Configuration
SERVER_PORT=3000

# Starknet Configuration
STARKNET_ADDRESS=
STARKNET_PRIVATE_KEY=
STARKNET_RPC_URL=

# Intiface Configuration
INTIFACE_WEBSOCKET_URL=ws://localhost:12345


# Farcaster
FARCASTER_HUB_URL=
FARCASTER_FID=
FARCASTER_PRIVATE_KEY=

# Coinbase
COINBASE_COMMERCE_KEY= # from coinbase developer portal
COINBASE_API_KEY= # from coinbase developer portal
COINBASE_PRIVATE_KEY= # from coinbase developer portal
# if not configured it will be generated and written to runtime.character.settings.secrets.COINBASE_GENERATED_WALLET_ID and runtime.character.settings.secrets.COINBASE_GENERATED_WALLET_HEX_SEED
COINBASE_GENERATED_WALLET_ID= # not your address but the wallet id from generating a wallet through the plugin
COINBASE_GENERATED_WALLET_HEX_SEED= # not your address but the wallet hex seed from generating a wallet through the plugin and calling export

# Conflux Configuration
CONFLUX_CORE_PRIVATE_KEY=
CONFLUX_CORE_SPACE_RPC_URL=
CONFLUX_ESPACE_PRIVATE_KEY=
CONFLUX_ESPACE_RPC_URL=
CONFLUX_MEME_CONTRACT_ADDRESS=

#ZeroG
ZEROG_INDEXER_RPC=
ZEROG_EVM_RPC=
ZEROG_PRIVATE_KEY=
ZEROG_FLOW_ADDRESS=


# Coinbase
COINBASE_COMMERCE_KEY=
COINBASE_API_KEY=
COINBASE_PRIVATE_KEY=

COINBASE_GENERATED_WALLET_ID=
COINBASE_GENERATED_WALLET_HEX_SEED=


# TEE Configuration
DSTACK_SIMULATOR_ENDPOINT=
WALLET_SECRET_SALT=secret_salt
8 changes: 7 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ If a docs change is needed: I have updated the documentation accordingly.
## Detailed testing steps

<!--
None, automtated tests are fine.
None, automated tests are fine.
-->

<!--
Expand Down Expand Up @@ -77,3 +77,9 @@ None, automtated tests are fine.
<!--
## Deployment instructions
-->

<!-- If you are on Discord, please join https://discord.gg/ai16z and state your Discord username here for contribute role and join us in #development-feed -->
<!--
## Discord username
-->
9 changes: 6 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ jobs:
- name: Run Prettier
run: pnpm run prettier --check .

- name: Run Linter
run: pnpm run lint

- name: Create test env file
run: |
echo "TEST_DATABASE_CLIENT=sqlite" > core/.env.test
echo "NODE_ENV=test" >> core/.env.test
echo "TEST_DATABASE_CLIENT=sqlite" > packages/core/.env.test
echo "NODE_ENV=test" >> packages/core/.env.test
- name: Run tests
run: cd core && pnpm test
run: cd packages/core && pnpm test

- name: Build packages
run: pnpm run build
28 changes: 28 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PR Title Check

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
check-pr-title:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v2

- name: Validate PR title
id: validate
run: |
PR_TITLE=$(jq -r .pull_request.title "$GITHUB_EVENT_PATH")
echo "PR Title: $PR_TITLE"
if [[ ! "$PR_TITLE" =~ ^(feat|fix|docs|style|refactor|test|chore):\ .+ ]]; then
echo "PR title does not match the required pattern."
exit 1
fi
- name: Set status
if: failure()
run: |
gh pr comment ${{ github.event.pull_request.number }} --body "❌ PR title does not match the required pattern. Please use the format: 'type: description' (e.g., 'feat|fix|docs|style|refactor|test|chore: title')."
76 changes: 76 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Pre-Release

on:
workflow_dispatch:
inputs:
release_type:
description: "Type of release (prerelease, prepatch, patch, minor, preminor, major)"
required: true
default: "prerelease"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 22

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Configure Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: "Setup npm for npmjs"
run: |
npm config set registry https://registry.npmjs.org/
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install Protobuf Compiler
run: sudo apt-get install -y protobuf-compiler

- name: Install dependencies
run: pnpm install

- name: Build packages
run: pnpm run build

- name: Tag and Publish Packages
id: tag_publish
run: |
RELEASE_TYPE=${{ github.event_name == 'push' && 'prerelease' || github.event.inputs.release_type }}
npx lerna version $RELEASE_TYPE --conventional-commits --yes --no-private --force-publish
npx lerna publish from-git --yes --dist-tag next
- name: Get Version Tag
id: get_tag
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT

- name: Generate Release Body
id: release_body
run: |
if [ -f CHANGELOG.md ]; then
echo "body=$(cat CHANGELOG.md)" >> $GITHUB_OUTPUT
else
echo "body=No changelog provided for this release." >> $GITHUB_OUTPUT
fi
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
with:
tag_name: ${{ steps.get_tag.outputs.TAG }}
release_name: Release
body_path: CHANGELOG.md
draft: false
prerelease: ${{ github.event_name == 'push' }}
75 changes: 75 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Release

on:
workflow_dispatch:
inputs:
release_type:
description: "Type of release (prerelease, prepatch, patch, minor, preminor, major)"
required: true
default: "patch"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 22

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Configure Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: "Setup npm for npmjs"
run: |
npm config set registry https://registry.npmjs.org/
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install Protobuf Compiler
run: sudo apt-get install -y protobuf-compiler

- name: Install dependencies
run: pnpm install

- name: Build packages
run: pnpm run build

- name: Tag and Publish Packages
id: tag_publish
run: |
npx lerna version ${{ github.event.inputs.release_type }} --conventional-commits --yes --no-private --force-publish
npx lerna publish from-git --yes --dist-tag ${{ github.event.inputs.release_type == 'preminor' && 'next' || 'latest' }}
- name: Get Version Tag
id: get_tag
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT

- name: Generate Release Body
id: release_body
run: |
if [ -f CHANGELOG.md ]; then
echo "body=$(cat CHANGELOG.md)" >> $GITHUB_OUTPUT
else
echo "body=No changelog provided for this release." >> $GITHUB_OUTPUT
fi
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
with:
tag_name: ${{ steps.get_tag.outputs.TAG }}
release_name: Release
body_path: CHANGELOG.md
draft: false
prerelease: false
Loading

0 comments on commit cd98ff9

Please sign in to comment.