Add Polygon (#872)
This commit is contained in:
parent
c30d2f79fe
commit
9f0286cef4
@ -44,6 +44,7 @@ import (
|
||||
"github.com/trezor/blockbook/bchain/coins/omotenashicoin"
|
||||
"github.com/trezor/blockbook/bchain/coins/pivx"
|
||||
"github.com/trezor/blockbook/bchain/coins/polis"
|
||||
"github.com/trezor/blockbook/bchain/coins/polygon"
|
||||
"github.com/trezor/blockbook/bchain/coins/qtum"
|
||||
"github.com/trezor/blockbook/bchain/coins/ravencoin"
|
||||
"github.com/trezor/blockbook/bchain/coins/ritocoin"
|
||||
@ -137,6 +138,8 @@ func init() {
|
||||
BlockChainFactories["Avalanche Archive"] = avalanche.NewAvalancheRPC
|
||||
BlockChainFactories["BNB Smart Chain"] = bsc.NewBNBSmartChainRPC
|
||||
BlockChainFactories["BNB Smart Chain Archive"] = bsc.NewBNBSmartChainRPC
|
||||
BlockChainFactories["Polygon"] = polygon.NewPolygonRPC
|
||||
BlockChainFactories["Polygon Archive"] = polygon.NewPolygonRPC
|
||||
}
|
||||
|
||||
// GetCoinNameFromConfig gets coin name and coin shortcut from config file
|
||||
|
||||
83
bchain/coins/polygon/polygonrpc.go
Normal file
83
bchain/coins/polygon/polygonrpc.go
Normal file
@ -0,0 +1,83 @@
|
||||
package polygon
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/ethereum/go-ethereum/ethclient"
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
"github.com/golang/glog"
|
||||
"github.com/juju/errors"
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
"github.com/trezor/blockbook/bchain/coins/eth"
|
||||
)
|
||||
|
||||
const (
|
||||
// MainNet is production network
|
||||
MainNet eth.Network = 137
|
||||
)
|
||||
|
||||
// PolygonRPC is an interface to JSON-RPC polygon service.
|
||||
type PolygonRPC struct {
|
||||
*eth.EthereumRPC
|
||||
}
|
||||
|
||||
// NewPolygonRPC returns new PolygonRPC instance.
|
||||
func NewPolygonRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error) {
|
||||
c, err := eth.NewEthereumRPC(config, pushHandler)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
s := &PolygonRPC{
|
||||
EthereumRPC: c.(*eth.EthereumRPC),
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// Initialize polygon rpc interface
|
||||
func (b *PolygonRPC) Initialize() error {
|
||||
b.OpenRPC = func(url string) (bchain.EVMRPCClient, bchain.EVMClient, error) {
|
||||
r, err := rpc.Dial(url)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
rc := ð.EthereumRPCClient{Client: r}
|
||||
ec := ð.EthereumClient{Client: ethclient.NewClient(r)}
|
||||
return rc, ec, nil
|
||||
}
|
||||
|
||||
rc, ec, err := b.OpenRPC(b.ChainConfig.RPCURL)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// set chain specific
|
||||
b.Client = ec
|
||||
b.RPC = rc
|
||||
b.MainNetChainID = MainNet
|
||||
b.NewBlock = eth.NewEthereumNewBlock()
|
||||
b.NewTx = eth.NewEthereumNewTx()
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), b.Timeout)
|
||||
defer cancel()
|
||||
|
||||
id, err := b.Client.NetworkID(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// parameters for getInfo request
|
||||
switch eth.Network(id.Uint64()) {
|
||||
case MainNet:
|
||||
b.Testnet = false
|
||||
b.Network = "livenet"
|
||||
default:
|
||||
return errors.Errorf("Unknown network id %v", id)
|
||||
}
|
||||
|
||||
glog.Info("rpc: block chain ", b.Network)
|
||||
|
||||
return nil
|
||||
}
|
||||
37
build/templates/backend/scripts/polygon_archive_bor.sh
Normal file
37
build/templates/backend/scripts/polygon_archive_bor.sh
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
{{define "main" -}}
|
||||
|
||||
set -e
|
||||
|
||||
INSTALL_DIR={{.Env.BackendInstallPath}}/{{.Coin.Alias}}
|
||||
DATA_DIR={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend
|
||||
|
||||
BOR_BIN=$INSTALL_DIR/bor
|
||||
|
||||
# --bor.heimdall = backend-polygon-heimdall-archive ports.backend_http
|
||||
$BOR_BIN server \
|
||||
--chain $INSTALL_DIR/genesis.json \
|
||||
--syncmode full \
|
||||
--datadir $DATA_DIR \
|
||||
--bor.heimdall http://127.0.0.1:8173 \
|
||||
--bootnodes enode://0cb82b395094ee4a2915e9714894627de9ed8498fb881cec6db7c65e8b9a5bd7f2f25cc84e71e89d0947e51c76e85d0847de848c7782b13c0255247a6758178c@44.232.55.71:30303,enode://88116f4295f5a31538ae409e4d44ad40d22e44ee9342869e7d68bdec55b0f83c1530355ce8b41fbec0928a7d75a5745d528450d30aec92066ab6ba1ee351d710@159.203.9.164:30303 \
|
||||
--port {{.Ports.BackendP2P}} \
|
||||
--http \
|
||||
--http.addr 127.0.0.1 \
|
||||
--http.port {{.Ports.BackendHttp}} \
|
||||
--http.api eth,net,web3,debug,txpool,bor \
|
||||
--http.vhosts '*' \
|
||||
--http.corsdomain '*' \
|
||||
--ws \
|
||||
--ws.addr 127.0.0.1 \
|
||||
--ws.port {{.Ports.BackendRPC}} \
|
||||
--ws.api eth,net,web3,debug,txpool,bor \
|
||||
--ws.origins '*' \
|
||||
--gcmode archive \
|
||||
--txlookuplimit 0 \
|
||||
--cache 4096 \
|
||||
--ipcdisable \
|
||||
--nat none
|
||||
|
||||
{{end}}
|
||||
35
build/templates/backend/scripts/polygon_archive_heimdall.sh
Normal file
35
build/templates/backend/scripts/polygon_archive_heimdall.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
{{define "main" -}}
|
||||
|
||||
set -e
|
||||
|
||||
INSTALL_DIR={{.Env.BackendInstallPath}}/{{.Coin.Alias}}
|
||||
DATA_DIR={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend
|
||||
|
||||
HEIMDALL_BIN=$INSTALL_DIR/heimdalld
|
||||
HOME_DIR=$DATA_DIR/heimdalld
|
||||
CONFIG_DIR=$HOME_DIR/config
|
||||
|
||||
if [ ! -d "$CONFIG_DIR" ]; then
|
||||
# init chain
|
||||
$HEIMDALL_BIN init --home $HOME_DIR
|
||||
|
||||
# overwrite genesis file
|
||||
cp $INSTALL_DIR/genesis.json $CONFIG_DIR/genesis.json
|
||||
fi
|
||||
|
||||
# --bor_rpc_url: backend-polygon-bor-archive ports.backend_http
|
||||
# --eth_rpc_url: backend-ethereum-archive ports.backend_http
|
||||
$HEIMDALL_BIN start \
|
||||
--home $HOME_DIR \
|
||||
--rpc.laddr tcp://127.0.0.1:{{.Ports.BackendRPC}} \
|
||||
--p2p.laddr tcp://0.0.0.0:{{.Ports.BackendP2P}} \
|
||||
--laddr tcp://127.0.0.1:{{.Ports.BackendHttp}} \
|
||||
--p2p.seeds "2a53a15ffc70ad41b6876ecbe05c50a66af01e20@3.211.248.31:26656,6f829065789e5b156cbbf076f9d133b4d7725847@3.212.183.151:26656,7285a532bad665f051c0aadc31054e2e61ca2b3d@3.93.224.197:26656,0b431127d21c8970f1c353ab212be4f1ba86c3bf@184.73.124.158:26656,f4f605d60b8ffaaf15240564e58a81103510631c@159.203.9.164:26656,31b79cf4a628a4619e8e9ae95b72e4354c5a5d90@44.232.55.71:26656,a385dd467d11c4cdb0be8b51d7bfb0990f49abc3@35.199.4.13:26656,daad548c0a163faae1d8d58425f97207acf923fd@35.230.116.151:26656,81c76e82fcc3dc9a0a1554a3edaa09a632795ea8@35.221.13.28:26656" \
|
||||
--node tcp://127.0.0.1:{{.Ports.BackendRPC}} \
|
||||
--bor_rpc_url http://127.0.0.1:8172 \
|
||||
--eth_rpc_url http://127.0.0.1:8116 \
|
||||
--rest-server
|
||||
|
||||
{{end}}
|
||||
36
build/templates/backend/scripts/polygon_bor.sh
Normal file
36
build/templates/backend/scripts/polygon_bor.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
{{define "main" -}}
|
||||
|
||||
set -e
|
||||
|
||||
INSTALL_DIR={{.Env.BackendInstallPath}}/{{.Coin.Alias}}
|
||||
DATA_DIR={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend
|
||||
|
||||
BOR_BIN=$INSTALL_DIR/bor
|
||||
|
||||
# --bor.heimdall = backend-polygon-heimdall ports.backend_http
|
||||
$BOR_BIN server \
|
||||
--chain $INSTALL_DIR/genesis.json \
|
||||
--syncmode full \
|
||||
--datadir $DATA_DIR \
|
||||
--bor.heimdall http://127.0.0.1:8171 \
|
||||
--bootnodes enode://0cb82b395094ee4a2915e9714894627de9ed8498fb881cec6db7c65e8b9a5bd7f2f25cc84e71e89d0947e51c76e85d0847de848c7782b13c0255247a6758178c@44.232.55.71:30303,enode://88116f4295f5a31538ae409e4d44ad40d22e44ee9342869e7d68bdec55b0f83c1530355ce8b41fbec0928a7d75a5745d528450d30aec92066ab6ba1ee351d710@159.203.9.164:30303 \
|
||||
--port {{.Ports.BackendP2P}} \
|
||||
--http \
|
||||
--http.addr 127.0.0.1 \
|
||||
--http.port {{.Ports.BackendHttp}} \
|
||||
--http.api eth,net,web3,debug,txpool,bor \
|
||||
--http.vhosts '*' \
|
||||
--http.corsdomain '*' \
|
||||
--ws \
|
||||
--ws.addr 127.0.0.1 \
|
||||
--ws.port {{.Ports.BackendRPC}} \
|
||||
--ws.api eth,net,web3,debug,txpool,bor \
|
||||
--ws.origins '*' \
|
||||
--txlookuplimit 0 \
|
||||
--cache 4096 \
|
||||
--ipcdisable \
|
||||
--nat none
|
||||
|
||||
{{end}}
|
||||
35
build/templates/backend/scripts/polygon_heimdall.sh
Normal file
35
build/templates/backend/scripts/polygon_heimdall.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
{{define "main" -}}
|
||||
|
||||
set -e
|
||||
|
||||
INSTALL_DIR={{.Env.BackendInstallPath}}/{{.Coin.Alias}}
|
||||
DATA_DIR={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend
|
||||
|
||||
HEIMDALL_BIN=$INSTALL_DIR/heimdalld
|
||||
HOME_DIR=$DATA_DIR/heimdalld
|
||||
CONFIG_DIR=$HOME_DIR/config
|
||||
|
||||
if [ ! -d "$CONFIG_DIR" ]; then
|
||||
# init chain
|
||||
$HEIMDALL_BIN init --home $HOME_DIR
|
||||
|
||||
# overwrite genesis file
|
||||
cp $INSTALL_DIR/genesis.json $CONFIG_DIR/genesis.json
|
||||
fi
|
||||
|
||||
# --bor_rpc_url: backend-polygon-bor ports.backend_http
|
||||
# --eth_rpc_url: backend-ethereum ports.backend_http
|
||||
$HEIMDALL_BIN start \
|
||||
--home $HOME_DIR \
|
||||
--rpc.laddr tcp://127.0.0.1:{{.Ports.BackendRPC}} \
|
||||
--p2p.laddr tcp://0.0.0.0:{{.Ports.BackendP2P}} \
|
||||
--laddr tcp://127.0.0.1:{{.Ports.BackendHttp}} \
|
||||
--p2p.seeds "2a53a15ffc70ad41b6876ecbe05c50a66af01e20@3.211.248.31:26656,6f829065789e5b156cbbf076f9d133b4d7725847@3.212.183.151:26656,7285a532bad665f051c0aadc31054e2e61ca2b3d@3.93.224.197:26656,0b431127d21c8970f1c353ab212be4f1ba86c3bf@184.73.124.158:26656,f4f605d60b8ffaaf15240564e58a81103510631c@159.203.9.164:26656,31b79cf4a628a4619e8e9ae95b72e4354c5a5d90@44.232.55.71:26656,a385dd467d11c4cdb0be8b51d7bfb0990f49abc3@35.199.4.13:26656,daad548c0a163faae1d8d58425f97207acf923fd@35.230.116.151:26656,81c76e82fcc3dc9a0a1554a3edaa09a632795ea8@35.221.13.28:26656" \
|
||||
--node tcp://127.0.0.1:{{.Ports.BackendRPC}} \
|
||||
--bor_rpc_url http://127.0.0.1:8170 \
|
||||
--eth_rpc_url http://127.0.0.1:8136 \
|
||||
--rest-server
|
||||
|
||||
{{end}}
|
||||
65
configs/coins/polygon.json
Normal file
65
configs/coins/polygon.json
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"coin": {
|
||||
"name": "Polygon",
|
||||
"shortcut": "MATIC",
|
||||
"label": "Polygon",
|
||||
"alias": "polygon_bor"
|
||||
},
|
||||
"ports": {
|
||||
"backend_rpc": 8070,
|
||||
"backend_p2p": 38370,
|
||||
"backend_http": 8170,
|
||||
"blockbook_internal": 9070,
|
||||
"blockbook_public": 9170
|
||||
},
|
||||
"ipc": {
|
||||
"rpc_url_template": "ws://127.0.0.1:{{.Ports.BackendRPC}}",
|
||||
"rpc_timeout": 25
|
||||
},
|
||||
"backend": {
|
||||
"package_name": "backend-polygon-bor",
|
||||
"package_revision": "satoshilabs-1",
|
||||
"system_user": "polygon",
|
||||
"version": "0.3.9",
|
||||
"binary_url": "https://github.com/maticnetwork/bor/archive/refs/tags/v0.3.9.tar.gz",
|
||||
"verification_type": "sha256",
|
||||
"verification_source": "54da737571d297311f59ac483ce1428e519345dabb22c8c1563ede0834cd368f",
|
||||
"extract_command": "mkdir backend/source && tar -C backend/source --strip 1 -xf v0.3.9.tar.gz && cd backend/source && make bor && mv build/bin/bor ../ && rm -rf ../source && echo",
|
||||
"exclude_files": [],
|
||||
"exec_command_template": "/bin/sh -c '{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/polygon_bor_exec.sh 2>> {{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log'",
|
||||
"exec_script": "polygon_bor.sh",
|
||||
"logrotate_files_template": "{{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log",
|
||||
"postinst_script_template": "wget https://raw.githubusercontent.com/maticnetwork/bor/v0.3.9/builder/files/genesis-mainnet-v1.json -O {{.Env.BackendInstallPath}}/{{.Coin.Alias}}/genesis.json",
|
||||
"service_type": "simple",
|
||||
"service_additional_params_template": "",
|
||||
"protect_memory": true,
|
||||
"mainnet": true,
|
||||
"server_config_file": "",
|
||||
"client_config_file": ""
|
||||
},
|
||||
"blockbook": {
|
||||
"package_name": "blockbook-polygon",
|
||||
"system_user": "blockbook-polygon",
|
||||
"internal_binding_template": ":{{.Ports.BlockbookInternal}}",
|
||||
"public_binding_template": ":{{.Ports.BlockbookPublic}}",
|
||||
"explorer_url": "",
|
||||
"additional_params": "",
|
||||
"block_chain": {
|
||||
"parse": true,
|
||||
"mempool_workers": 8,
|
||||
"mempool_sub_workers": 2,
|
||||
"block_addresses_to_keep": 300,
|
||||
"additional_params": {
|
||||
"mempoolTxTimeoutHours": 48,
|
||||
"queryBackendOnMempoolResync": false,
|
||||
"fiat_rates": "coingecko",
|
||||
"fiat_rates_vs_currencies": "AED,ARS,AUD,BDT,BHD,BMD,BRL,CAD,CHF,CLP,CNY,CZK,DKK,EUR,GBP,HKD,HUF,IDR,ILS,INR,JPY,KRW,KWD,LKR,MMK,MXN,MYR,NGN,NOK,NZD,PHP,PKR,PLN,RUB,SAR,SEK,SGD,THB,TRY,TWD,UAH,USD,VEF,VND,ZAR,BTC,ETH",
|
||||
"fiat_rates_params": "{\"url\": \"https://api.coingecko.com/api/v3\", \"coin\": \"matic-network\",\"platformIdentifier\": \"polygon-pos\",\"platformVsCurrency\": \"usd\",\"periodSeconds\": 900}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"package_maintainer": "IT",
|
||||
"package_maintainer_email": "it@satoshilabs.com"
|
||||
}
|
||||
}
|
||||
68
configs/coins/polygon_archive.json
Normal file
68
configs/coins/polygon_archive.json
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
"coin": {
|
||||
"name": "Polygon Archive",
|
||||
"shortcut": "MATIC",
|
||||
"label": "Polygon",
|
||||
"alias": "polygon_archive_bor"
|
||||
},
|
||||
"ports": {
|
||||
"backend_rpc": 8072,
|
||||
"backend_p2p": 38372,
|
||||
"backend_http": 8172,
|
||||
"blockbook_internal": 9072,
|
||||
"blockbook_public": 9172
|
||||
},
|
||||
"ipc": {
|
||||
"rpc_url_template": "ws://127.0.0.1:{{.Ports.BackendRPC}}",
|
||||
"rpc_timeout": 25
|
||||
},
|
||||
"backend": {
|
||||
"package_name": "backend-polygon-archive-bor",
|
||||
"package_revision": "satoshilabs-1",
|
||||
"system_user": "polygon",
|
||||
"version": "0.3.9",
|
||||
"binary_url": "https://github.com/maticnetwork/bor/archive/refs/tags/v0.3.9.tar.gz",
|
||||
"verification_type": "sha256",
|
||||
"verification_source": "54da737571d297311f59ac483ce1428e519345dabb22c8c1563ede0834cd368f",
|
||||
"extract_command": "mkdir backend/source && tar -C backend/source --strip 1 -xf v0.3.9.tar.gz && cd backend/source && make bor && mv build/bin/bor ../ && rm -rf ../source && echo",
|
||||
"exclude_files": [],
|
||||
"exec_command_template": "/bin/sh -c '{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/polygon_archive_bor_exec.sh 2>> {{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log'",
|
||||
"exec_script": "polygon_archive_bor.sh",
|
||||
"logrotate_files_template": "{{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log",
|
||||
"postinst_script_template": "wget https://raw.githubusercontent.com/maticnetwork/bor/v0.3.9/builder/files/genesis-mainnet-v1.json -O {{.Env.BackendInstallPath}}/{{.Coin.Alias}}/genesis.json",
|
||||
"service_type": "simple",
|
||||
"service_additional_params_template": "",
|
||||
"protect_memory": true,
|
||||
"mainnet": true,
|
||||
"server_config_file": "",
|
||||
"client_config_file": ""
|
||||
},
|
||||
"blockbook": {
|
||||
"package_name": "blockbook-polygon-archive",
|
||||
"system_user": "blockbook-polygon",
|
||||
"internal_binding_template": ":{{.Ports.BlockbookInternal}}",
|
||||
"public_binding_template": ":{{.Ports.BlockbookPublic}}",
|
||||
"explorer_url": "",
|
||||
"additional_params": "-workers=16",
|
||||
"block_chain": {
|
||||
"parse": true,
|
||||
"mempool_workers": 8,
|
||||
"mempool_sub_workers": 2,
|
||||
"block_addresses_to_keep": 600,
|
||||
"additional_params": {
|
||||
"address_aliases": true,
|
||||
"mempoolTxTimeoutHours": 48,
|
||||
"processInternalTransactions": true,
|
||||
"queryBackendOnMempoolResync": false,
|
||||
"fiat_rates": "coingecko",
|
||||
"fiat_rates_vs_currencies": "AED,ARS,AUD,BDT,BHD,BMD,BRL,CAD,CHF,CLP,CNY,CZK,DKK,EUR,GBP,HKD,HUF,IDR,ILS,INR,JPY,KRW,KWD,LKR,MMK,MXN,MYR,NGN,NOK,NZD,PHP,PKR,PLN,RUB,SAR,SEK,SGD,THB,TRY,TWD,UAH,USD,VEF,VND,ZAR,BTC,ETH",
|
||||
"fiat_rates_params": "{\"url\": \"https://api.coingecko.com/api/v3\", \"coin\": \"matic-network\",\"platformIdentifier\": \"polygon-pos\",\"platformVsCurrency\": \"usd\",\"periodSeconds\": 900}",
|
||||
"fourByteSignatures": "https://www.4byte.directory/api/v1/signatures/"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"package_maintainer": "IT",
|
||||
"package_maintainer_email": "it@satoshilabs.com"
|
||||
}
|
||||
}
|
||||
40
configs/coins/polygon_heimdall.json
Normal file
40
configs/coins/polygon_heimdall.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"coin": {
|
||||
"name": "Polygon Heimdall",
|
||||
"shortcut": "MATIC",
|
||||
"label": "Polygon",
|
||||
"alias": "polygon_heimdall"
|
||||
},
|
||||
"ports": {
|
||||
"backend_rpc": 8071,
|
||||
"backend_p2p": 38371,
|
||||
"backend_http": 8171,
|
||||
"blockbook_internal": 9071,
|
||||
"blockbook_public": 9171
|
||||
},
|
||||
"backend": {
|
||||
"package_name": "backend-polygon-heimdall",
|
||||
"package_revision": "satoshilabs-1",
|
||||
"system_user": "polygon",
|
||||
"version": "0.3.4",
|
||||
"binary_url": "https://github.com/maticnetwork/heimdall/archive/refs/tags/v0.3.4.tar.gz",
|
||||
"verification_type": "sha256",
|
||||
"verification_source": "6d75bf685ce6714472afcc2ec8ecae5b53aa3aae513ffca9d1b2d26ae5892872",
|
||||
"extract_command": "mkdir backend/source && tar -C backend/source --strip 1 -xf v0.3.4.tar.gz && cd backend/source && make build && mv build/heimdalld ../ && rm -rf ../source && echo",
|
||||
"exclude_files": [],
|
||||
"exec_command_template": "/bin/sh -c '{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/polygon_heimdall_exec.sh 2>&1 >> {{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log'",
|
||||
"exec_script": "polygon_heimdall.sh",
|
||||
"logrotate_files_template": "{{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log",
|
||||
"postinst_script_template": "wget https://raw.githubusercontent.com/maticnetwork/heimdall/v0.3.4/builder/files/genesis-mainnet-v1.json -O {{.Env.BackendInstallPath}}/{{.Coin.Alias}}/genesis.json",
|
||||
"service_type": "simple",
|
||||
"service_additional_params_template": "",
|
||||
"protect_memory": true,
|
||||
"mainnet": true,
|
||||
"server_config_file": "",
|
||||
"client_config_file": ""
|
||||
},
|
||||
"meta": {
|
||||
"package_maintainer": "IT",
|
||||
"package_maintainer_email": "it@satoshilabs.com"
|
||||
}
|
||||
}
|
||||
40
configs/coins/polygon_heimdall_archive.json
Normal file
40
configs/coins/polygon_heimdall_archive.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"coin": {
|
||||
"name": "Polygon Archive Heimdall",
|
||||
"shortcut": "MATIC",
|
||||
"label": "Polygon",
|
||||
"alias": "polygon_archive_heimdall"
|
||||
},
|
||||
"ports": {
|
||||
"backend_rpc": 8073,
|
||||
"backend_p2p": 38373,
|
||||
"backend_http": 8173,
|
||||
"blockbook_internal": 9073,
|
||||
"blockbook_public": 9173
|
||||
},
|
||||
"backend": {
|
||||
"package_name": "backend-polygon-archive-heimdall",
|
||||
"package_revision": "satoshilabs-1",
|
||||
"system_user": "polygon",
|
||||
"version": "0.3.4",
|
||||
"binary_url": "https://github.com/maticnetwork/heimdall/archive/refs/tags/v0.3.4.tar.gz",
|
||||
"verification_type": "sha256",
|
||||
"verification_source": "6d75bf685ce6714472afcc2ec8ecae5b53aa3aae513ffca9d1b2d26ae5892872",
|
||||
"extract_command": "mkdir backend/source && tar -C backend/source --strip 1 -xf v0.3.4.tar.gz && cd backend/source && make build && mv build/heimdalld ../ && rm -rf ../source && echo",
|
||||
"exclude_files": [],
|
||||
"exec_command_template": "/bin/sh -c '{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/polygon_archive_heimdall_exec.sh 2>&1 >> {{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log'",
|
||||
"exec_script": "polygon_archive_heimdall.sh",
|
||||
"logrotate_files_template": "{{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log",
|
||||
"postinst_script_template": "wget https://raw.githubusercontent.com/maticnetwork/heimdall/v0.3.4/builder/files/genesis-mainnet-v1.json -O {{.Env.BackendInstallPath}}/{{.Coin.Alias}}/genesis.json",
|
||||
"service_type": "simple",
|
||||
"service_additional_params_template": "",
|
||||
"protect_memory": true,
|
||||
"mainnet": true,
|
||||
"server_config_file": "",
|
||||
"client_config_file": ""
|
||||
},
|
||||
"meta": {
|
||||
"package_maintainer": "IT",
|
||||
"package_maintainer_email": "it@satoshilabs.com"
|
||||
}
|
||||
}
|
||||
@ -40,6 +40,10 @@
|
||||
| BNB Smart Chain Archive | 9165 | 9065 | 8065 | 38365 p2p, 8165 http |
|
||||
| Flo | 9166 | 9066 | 8066 | 38366 |
|
||||
| Polis | 9167 | 9067 | 8067 | 38367 |
|
||||
| Polygon | 9170 | 9070 | 8070 | 38370 p2p, 8170 http |
|
||||
| Polygon Heimdall | 9171 | 9071 | 8071 | 38371 p2p, 8171 http |
|
||||
| Polygon Archive | 9172 | 9072 | 8072 | 38372 p2p, 8172 http |
|
||||
| Polygon Archive Heimdall | 9173 | 9073 | 8073 | 38373 p2p, 8173 http |
|
||||
| Qtum | 9188 | 9088 | 8088 | 38388 |
|
||||
| Divi Project | 9189 | 9089 | 8089 | 38389 |
|
||||
| CPUchain | 9190 | 9090 | 8090 | 38390 |
|
||||
|
||||
Loading…
Reference in New Issue
Block a user