mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-08 22:28:12 -05:00
contrib: Remove token_lists JSON files.
This commit is contained in:
25
Makefile
25
Makefile
@@ -32,7 +32,6 @@ BINDEPS = \
|
|||||||
$(shell find bin/*/src -type f) \
|
$(shell find bin/*/src -type f) \
|
||||||
$(shell find bin -type f -name '*.toml') \
|
$(shell find bin -type f -name '*.toml') \
|
||||||
$(shell find src -type f) \
|
$(shell find src -type f) \
|
||||||
$(shell find contrib/token -type f)
|
|
||||||
|
|
||||||
all: $(BINS)
|
all: $(BINS)
|
||||||
|
|
||||||
@@ -50,33 +49,30 @@ contracts: zkas
|
|||||||
$(MAKE) -C src/contract/consensus
|
$(MAKE) -C src/contract/consensus
|
||||||
$(MAKE) -C src/contract/deployooor
|
$(MAKE) -C src/contract/deployooor
|
||||||
|
|
||||||
token_lists:
|
$(BINS): contracts $(PROOFS_BIN) $(BINDEPS)
|
||||||
$(MAKE) -C contrib/token all
|
|
||||||
|
|
||||||
$(BINS): token_lists contracts $(PROOFS_BIN) $(BINDEPS)
|
|
||||||
$(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) \
|
$(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) \
|
||||||
--all-features --release --package $@
|
--all-features --release --package $@
|
||||||
cp -f target/$(RUST_TARGET)/release/$@ $@
|
cp -f target/$(RUST_TARGET)/release/$@ $@
|
||||||
|
|
||||||
check: token_lists contracts $(PROOFS_BIN)
|
check: contracts $(PROOFS_BIN)
|
||||||
$(CARGO) hack check --release --feature-powerset --all
|
$(CARGO) hack check --release --feature-powerset --all
|
||||||
|
|
||||||
fix: token_lists contracts $(PROOFS_BIN)
|
fix: contracts $(PROOFS_BIN)
|
||||||
$(CARGO) clippy --release --all-features --fix --allow-dirty --all
|
$(CARGO) clippy --release --all-features --fix --allow-dirty --all
|
||||||
|
|
||||||
clippy: token_lists contracts $(PROOFS_BIN)
|
clippy: contracts $(PROOFS_BIN)
|
||||||
$(CARGO) clippy --release --all-features --all
|
$(CARGO) clippy --release --all-features --all
|
||||||
|
|
||||||
rustdoc: token_lists contracts $(PROOFS_BIN)
|
rustdoc: contracts $(PROOFS_BIN)
|
||||||
$(CARGO) doc --release --all-features --workspace --document-private-items
|
$(CARGO) doc --release --all-features --workspace --document-private-items
|
||||||
|
|
||||||
test: token_lists $(PROOFS_BIN) contracts
|
test: $(PROOFS_BIN) contracts
|
||||||
$(CARGO) test --release --all-features --all
|
$(CARGO) test --release --all-features --all
|
||||||
|
|
||||||
test-no-run: token_lists $(PROOFS_BIN) contracts
|
test-no-run: $(PROOFS_BIN) contracts
|
||||||
$(CARGO) test --release --all-features --all --no-run
|
$(CARGO) test --release --all-features --all --no-run
|
||||||
|
|
||||||
coverage: token_lists contracts $(PROOFS_BIN)
|
coverage: contracts $(PROOFS_BIN)
|
||||||
$(CARGO) llvm-cov --release --all-features --workspace --html
|
$(CARGO) llvm-cov --release --all-features --workspace --html
|
||||||
|
|
||||||
cleanbin:
|
cleanbin:
|
||||||
@@ -104,6 +100,5 @@ uninstall:
|
|||||||
rm -f $(DESTDIR)$(PREFIX)/bin/$$i; \
|
rm -f $(DESTDIR)$(PREFIX)/bin/$$i; \
|
||||||
done;
|
done;
|
||||||
|
|
||||||
.PHONY: \
|
.PHONY: all check fix clippy test test-no-run cleanbin clean \
|
||||||
all contracts token_lists check fix clippy rustdoc test test-no-run \
|
install uninstall contracts coverage
|
||||||
cleanbin clean install uninstall coverage
|
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ The following dependencies are also required:
|
|||||||
|----------------|------------------|
|
|----------------|------------------|
|
||||||
| git | git |
|
| git | git |
|
||||||
| make | make |
|
| make | make |
|
||||||
| jq | jq |
|
|
||||||
| gcc | gcc |
|
| gcc | gcc |
|
||||||
| pkg-config | pkg-config |
|
| pkg-config | pkg-config |
|
||||||
| alsa-lib | libasound2-dev |
|
| alsa-lib | libasound2-dev |
|
||||||
@@ -55,7 +54,7 @@ following to install the required dependencies:
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# apt-get update
|
# apt-get update
|
||||||
# apt-get install -y git make jq gcc pkg-config libasound2-dev
|
# apt-get install -y git make gcc pkg-config libasound2-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, users can try using the automated script under `contrib`
|
Alternatively, users can try using the automated script under `contrib`
|
||||||
|
|||||||
@@ -15,59 +15,59 @@ setup_mac() {
|
|||||||
bash -c "$(curl -fL "${brew_sh}")" || return 1
|
bash -c "$(curl -fL "${brew_sh}")" || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in cmake gcc jq pkgconf llvm@13; do
|
for i in cmake gcc pkgconf llvm@13; do
|
||||||
echo "Installing $i with brew..." >&2
|
echo "Installing $i with brew..." >&2
|
||||||
brew install "$i" || return 1
|
brew install "$i" || return 1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_apt() {
|
setup_apt() {
|
||||||
apt_deps="git make jq gcc pkg-config libasound2-dev"
|
apt_deps="git make gcc pkg-config libasound2-dev"
|
||||||
$1 install $apt_deps || return 1
|
$1 install $apt_deps || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_pacman() {
|
setup_pacman() {
|
||||||
pacman_deps="git make jq gcc pkgconf alsa-lib"
|
pacman_deps="git make gcc pkgconf alsa-lib"
|
||||||
$1 -Sy $pacman_deps || return 1
|
$1 -Sy $pacman_deps || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_xbps() {
|
setup_xbps() {
|
||||||
xbps_deps="git make jq gcc pkg-config alsa-lib-devel"
|
xbps_deps="git make gcc pkg-config alsa-lib-devel"
|
||||||
$1 -S $xbps_deps || return 1
|
$1 -S $xbps_deps || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_dnf() {
|
setup_dnf() {
|
||||||
dnf_deps="git make jq gcc pkg-config findutils lato-fonts"
|
dnf_deps="git make gcc pkg-config findutils lato-fonts"
|
||||||
$1 install -y $dnf_deps || return 1
|
$1 install -y $dnf_deps || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_apk() {
|
setup_apk() {
|
||||||
apk_deps="git make jq gcc musl-dev pkgconfig alsa-lib-dev"
|
apk_deps="git make gcc musl-dev pkgconfig alsa-lib-dev"
|
||||||
$1 add $apk_deps || return 1
|
$1 add $apk_deps || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_zypper() {
|
setup_zypper() {
|
||||||
zypper_deps="git make jq gcc pkg-config findutils"
|
zypper_deps="git make gcc pkg-config findutils"
|
||||||
$1 install -y $zypper_deps || return 1
|
$1 install -y $zypper_deps || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_emerge() {
|
setup_emerge() {
|
||||||
emerge_deps="dev-vcs/git app-misc/jq media-libs/alsa-lib"
|
emerge_deps="dev-vcs/git media-libs/alsa-lib"
|
||||||
$1 $emerge_deps || return 1
|
$1 $emerge_deps || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_pkg() {
|
setup_pkg() {
|
||||||
pkg_deps="git bash jq gcc findutils cantarell-fonts gmake devel/automake"
|
pkg_deps="git bash gcc findutils cantarell-fonts gmake devel/automake"
|
||||||
$1 install -y $pkg_deps || return 1
|
$1 install -y $pkg_deps || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_pkg_add() {
|
setup_pkg_add() {
|
||||||
pkg_add_deps="git bash jq gcc-11.2.0p6 findutils cantarell-fonts gmake automake-1.15.1"
|
pkg_add_deps="git bash gcc-11.2.0p6 findutils cantarell-fonts gmake automake-1.15.1"
|
||||||
$1 -I $pkg_add_deps || return 1
|
$1 -I $pkg_add_deps || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_pkgin() {
|
setup_pkgin() {
|
||||||
pkgin_deps="git bash jq gcc12 findutils cantarell-fonts pkgconf gmake automake"
|
pkgin_deps="git bash gcc12 findutils cantarell-fonts pkgconf gmake automake"
|
||||||
$1 -y install $pkgin_deps || return 1
|
$1 -y install $pkgin_deps || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1
contrib/token/.gitignore
vendored
1
contrib/token/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
*.min.json
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
.POSIX:
|
|
||||||
|
|
||||||
DLTOOL = wget -nv --show-progress -O-
|
|
||||||
|
|
||||||
LISTS = \
|
|
||||||
darkfi_token_list \
|
|
||||||
bitcoin_token_list \
|
|
||||||
erc20_token_list \
|
|
||||||
solana_token_list \
|
|
||||||
monero_token_list
|
|
||||||
|
|
||||||
LISTS_JSON = $(LISTS:=.json)
|
|
||||||
LISTS_MIN = $(LISTS:=.min.json)
|
|
||||||
|
|
||||||
ERC20 = https://tokens.coingecko.com/uniswap/all.json
|
|
||||||
SOL = https://github.com/solana-labs/token-list/raw/main/src/tokens/solana.tokenlist.json
|
|
||||||
|
|
||||||
all: $(LISTS_MIN)
|
|
||||||
|
|
||||||
.json.min.json:
|
|
||||||
jq -r -c '.' < $< > $@
|
|
||||||
|
|
||||||
darkfi_token_list.json:
|
|
||||||
git checkout -- $@
|
|
||||||
|
|
||||||
bitcoin_token_list.json:
|
|
||||||
git checkout -- $@
|
|
||||||
|
|
||||||
monero_token_list.json:
|
|
||||||
git checkout -- $@
|
|
||||||
|
|
||||||
erc20_token_list.json:
|
|
||||||
$(DLTOOL) $(ERC20) | jq -r > $@
|
|
||||||
|
|
||||||
solana_token_list.json:
|
|
||||||
$(DLTOOL) $(SOL) | sed \
|
|
||||||
-e 's@"symbol": "BTC"@"symbol": "SBTC"@' \
|
|
||||||
-e 's@"symbol": "ETH"@"symbol": "SETH"@' \
|
|
||||||
| jq -r > $@
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(LISTS_JSON) $(LISTS_MIN)
|
|
||||||
|
|
||||||
.SUFFIXES: .json .min.json
|
|
||||||
.PHONY: all
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Bitcoin Token List",
|
|
||||||
"tokens": [
|
|
||||||
{
|
|
||||||
"chainId": 1,
|
|
||||||
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
|
|
||||||
"symbol": "BTC",
|
|
||||||
"name": "Bitcoin",
|
|
||||||
"decimals": 8
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "DarkFi Token List",
|
|
||||||
"tokens": [
|
|
||||||
{
|
|
||||||
"chainId": 1,
|
|
||||||
"address": "A7f1RKsCUUHrSXA7a9ogmwg8p3bs6F47ggsW826HD4yd",
|
|
||||||
"symbol": "DRK",
|
|
||||||
"name": "Dark",
|
|
||||||
"decimals": 8
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Monero Token List",
|
|
||||||
"tokens": [
|
|
||||||
{
|
|
||||||
"chainId": 1,
|
|
||||||
"address": "888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H",
|
|
||||||
"symbol": "XMR",
|
|
||||||
"name": "Monero",
|
|
||||||
"decimals": 12
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user