-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/send-token' into feat/swap-token
# Conflicts: # packages/espressocash_app/assets/icons/swap.svg # packages/espressocash_app/lib/features/token_details/screens/token_details_screen.dart # packages/espressocash_app/lib/l10n/intl_en.arb
- Loading branch information
Showing
370 changed files
with
17,105 additions
and
10,165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"flutterSdkVersion": "3.22.2", | ||
"flutterSdkVersion": "3.24.5", | ||
"flavors": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
name: "Solana Local Validator" | ||
author: "Switchboard Labs" | ||
description: | ||
"Start a localnet Solana validator with a specific feature set enabled." | ||
branding: | ||
color: purple | ||
icon: activity | ||
inputs: | ||
cluster: | ||
type: choice | ||
description: "the cluster to match a feature set for" | ||
required: false | ||
default: "local" | ||
options: | ||
- "all" | ||
- "local" | ||
- "devnet" | ||
- "testnet" | ||
- "mainnet" | ||
rust-version: | ||
description: "" | ||
required: false | ||
default: "stable" | ||
solana-version: | ||
description: "the Solana version to install" | ||
required: false | ||
default: "stable" | ||
anchor-version: | ||
description: | ||
"the Anchor version to install. if blank then dont install anchor" | ||
required: false | ||
default: "" | ||
args: | ||
description: "solana-test-validator arguements" | ||
required: false | ||
default: "" | ||
quiet: | ||
type: boolean | ||
description: "suppress solana-test-validator stdout" | ||
required: false | ||
default: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
# Install Linux Compilers | ||
- name: Install Linux Deps | ||
shell: bash | ||
run: | ||
sudo apt-get update && sudo apt-get install -y pkg-config | ||
build-essential libudev-dev | ||
|
||
# Install Rust Toolchain | ||
- name: Install Rust Stable | ||
id: rust_toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ inputs.rust-version }} | ||
override: true | ||
profile: minimal | ||
components: rustfmt, clippy | ||
- name: Add Cargo bin to Path | ||
shell: bash | ||
run: | | ||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
- name: Verify Rust install | ||
shell: bash | ||
run: | | ||
echo "Verifying rust '${{ inputs.toolchain }}' ..." | ||
rustc --version | ||
cargo --version | ||
cargo clippy --version | ||
rustfmt --version | ||
- name: Share rustc hash | ||
shell: bash | ||
run: | | ||
echo 'RUSTC_HASH=${{ steps.rust_toolchain.outputs.rustc_hash }}' >> $GITHUB_ENV | ||
# Check Solana channels versions | ||
- name: Determine Solana CLI version | ||
id: solana-channel-version | ||
shell: bash | ||
run: | | ||
chmod +x ./.github/solana_local_validator/scripts/channel-info.sh | ||
output=$(./.github/solana_local_validator/scripts/channel-info.sh) | ||
read -r BETA_CHANNEL_LATEST_TAG STABLE_CHANNEL_LATEST_TAG <<< "$output" | ||
echo "BETA_CHANNEL_LATEST_TAG=$BETA_CHANNEL_LATEST_TAG" >> $GITHUB_ENV | ||
echo "STABLE_CHANNEL_LATEST_TAG=$STABLE_CHANNEL_LATEST_TAG" >> $GITHUB_ENV | ||
# Install Solana Toolchain | ||
- name: Cache Solana Install | ||
id: cache-solana-install | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/solana/ | ||
~/.local/share/solana/ | ||
key: ${{ runner.os }}-Solana-${{ inputs.solana-version == 'stable' && env.STABLE_CHANNEL_LATEST_TAG || inputs.solana-version == 'beta' && env.BETA_CHANNEL_LATEST_TAG || inputs.solana-version }} | ||
- name: Install Solana | ||
shell: bash | ||
if: steps.cache-solana-install.outputs.cache-hit != 'true' | ||
run: | ||
sh -c "$(curl -sSfL https://release.anza.xyz/${{ | ||
inputs.solana-version}}/install)" | ||
- name: Add Solana bin to Path | ||
shell: bash | ||
run: | | ||
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | ||
- name: Verify Solana install | ||
shell: bash | ||
run: | | ||
solana --version | ||
# Install Solana Cluster Feature Set Diff | ||
- name: Cache SCFSD Install | ||
id: cache-scfsd-cli | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/scfsd | ||
key: scfsd-cli-${{ runner.os }}-9f742d455586a3cae2a31b85d0bb1c8709c143ab | ||
- name: Cargo Install SCFSD | ||
shell: bash | ||
if: steps.cache-scfsd-cli.outputs.cache-hit != 'true' | ||
run: | ||
cargo install --git https://github.com/FrankC01/solana-gadgets --rev | ||
9f742d455586a3cae2a31b85d0bb1c8709c143ab scfsd | ||
- name: Verify SCFSD Install | ||
shell: bash | ||
run: | | ||
scfsd --version | ||
# Install Anchor | ||
- name: Setup Anchor Cache | ||
uses: actions/cache@v3 | ||
id: cache-anchor-cli | ||
if: inputs.anchor-version != '' | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
./target/ | ||
key: anchor-cli-${{ runner.os }}-${{ inputs.anchor-version }} | ||
- name: Install Anchor | ||
shell: bash | ||
if: | ||
inputs.anchor-version != '' && steps.cache-anchor-cli.outputs.cache-hit | ||
!= 'true' | ||
run: | ||
cargo install --git https://github.com/coral-xyz/anchor --tag | ||
"${{inputs.anchor-version }}" anchor-cli --locked | ||
- name: Verify Anchor install | ||
shell: bash | ||
if: inputs.anchor-version != '' | ||
run: anchor --version | ||
|
||
# Setup Keypair | ||
- name: Find or Create Keypair | ||
shell: bash | ||
run: | | ||
find ~/.config/solana/id.json || solana-keygen new -s --no-bip39-passphrase | ||
echo "DEFAULT_SOLANA_PUBLIC_KEY=$(solana-keygen pubkey ~/.config/solana/id.json)" >> $GITHUB_ENV | ||
# Setup Local Validator Config | ||
- name: Optional Quiet Flag | ||
shell: bash | ||
run: | ||
echo "SOLANA_QUIET_FLAG=$(${{ inputs.quiet }} && echo -q )" >> | ||
$GITHUB_ENV | ||
- name: Get Cluster Feature Set | ||
shell: bash | ||
run: | ||
echo "SOLANA_FEATURES=$(scfsd -c ${{ inputs.cluster }} -k -t )" >> | ||
$GITHUB_ENV | ||
|
||
# Run | ||
- name: Start Local Validator | ||
shell: bash | ||
run: | | ||
solana-test-validator ${{ env.SOLANA_QUIET_FLAG }} -r --bind-address 0.0.0.0 --rpc-port 8899 ${{ env.SOLANA_FEATURES }} ${{ inputs.args }} & | ||
for attempt in {1..30}; do sleep 1; if curl -sS http://localhost:8899 -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getBlockHeight"}'; then echo ready; break; fi; echo waiting...; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
#!/usr/bin/env bash | ||
# Code: https://github.com/anza-xyz/agave/blob/master/ci/channel-info.sh | ||
# Source: Agave project (https://github.com/anza-xyz/agave) | ||
# Copyright (c) 2023 Anza XYZ | ||
# License: Apache-2.0 license | ||
# | ||
# Computes the current branch names of the edge, beta and stable | ||
# channels, as well as the latest tagged release for beta and stable. | ||
# | ||
# stdout of this script may be eval-ed | ||
# | ||
|
||
here="$(dirname "$0")" | ||
|
||
# shellcheck source=scripts/semver.sh | ||
source "$here"/semver.sh | ||
|
||
remote=https://github.com/anza-xyz/agave.git | ||
|
||
# Fetch all vX.Y.Z tags | ||
# | ||
# NOTE: pre-release tags are explicitly ignored | ||
# | ||
# shellcheck disable=SC2207 | ||
tags=( \ | ||
$(git ls-remote --tags $remote \ | ||
| cut -c52- \ | ||
| grep '^v[[:digit:]][[:digit:]]*\.[[:digit:]][[:digit:]]*.[[:digit:]][[:digit:]]*$' \ | ||
| cut -c2- \ | ||
) \ | ||
) | ||
|
||
# Fetch all the vX.Y branches | ||
# | ||
# shellcheck disable=SC2207 | ||
heads=( \ | ||
$(git ls-remote --heads $remote \ | ||
| cut -c53- \ | ||
| grep '^v[[:digit:]][[:digit:]]*\.[[:digit:]][[:digit:]]*$' \ | ||
| cut -c2- \ | ||
) \ | ||
) | ||
|
||
# Figure the beta channel by looking for the largest vX.Y branch | ||
beta= | ||
for head in "${heads[@]}"; do | ||
if [[ -n $beta ]]; then | ||
if semverLT "$head.0" "$beta.0"; then | ||
continue | ||
fi | ||
fi | ||
beta=$head | ||
done | ||
|
||
# Figure the stable channel by looking for the second largest vX.Y branch | ||
stable= | ||
for head in "${heads[@]}"; do | ||
if [[ $head = "$beta" ]]; then | ||
continue | ||
fi | ||
if [[ -n $stable ]]; then | ||
if semverLT "$head.0" "$stable.0"; then | ||
continue | ||
fi | ||
fi | ||
stable=$head | ||
done | ||
|
||
for tag in "${tags[@]}"; do | ||
if [[ -n $beta && $tag = $beta* ]]; then | ||
if [[ -n $beta_tag ]]; then | ||
if semverLT "$tag" "$beta_tag"; then | ||
continue | ||
fi | ||
fi | ||
beta_tag=$tag | ||
fi | ||
|
||
if [[ -n $stable && $tag = $stable* ]]; then | ||
if [[ -n $stable_tag ]]; then | ||
if semverLT "$tag" "$stable_tag"; then | ||
continue | ||
fi | ||
fi | ||
stable_tag=$tag | ||
fi | ||
done | ||
|
||
EDGE_CHANNEL=master | ||
BETA_CHANNEL=${beta:+v$beta} | ||
STABLE_CHANNEL=${stable:+v$stable} | ||
BETA_CHANNEL_LATEST_TAG=${beta_tag:+v$beta_tag} | ||
STABLE_CHANNEL_LATEST_TAG=${stable_tag:+v$stable_tag} | ||
|
||
|
||
if [[ -n $CI_BASE_BRANCH ]]; then | ||
BRANCH="$CI_BASE_BRANCH" | ||
elif [[ -n $CI_BRANCH ]]; then | ||
BRANCH="$CI_BRANCH" | ||
fi | ||
|
||
if [[ -z "$CHANNEL" ]]; then | ||
if [[ $BRANCH = "$STABLE_CHANNEL" ]]; then | ||
CHANNEL=stable | ||
elif [[ $BRANCH = "$EDGE_CHANNEL" ]]; then | ||
CHANNEL=edge | ||
elif [[ $BRANCH = "$BETA_CHANNEL" ]]; then | ||
CHANNEL=beta | ||
fi | ||
fi | ||
|
||
if [[ $CHANNEL = beta ]]; then | ||
CHANNEL_LATEST_TAG="$BETA_CHANNEL_LATEST_TAG" | ||
elif [[ $CHANNEL = stable ]]; then | ||
CHANNEL_LATEST_TAG="$STABLE_CHANNEL_LATEST_TAG" | ||
fi | ||
|
||
echo "$BETA_CHANNEL_LATEST_TAG $STABLE_CHANNEL_LATEST_TAG" | ||
|
||
exit 0 |
Oops, something went wrong.