forked from cerc-io/laconic-faucet
Add support for token denom $Z #2
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
dist
|
||||
db
|
||||
1
.npmrc
Normal file
1
.npmrc
Normal file
@ -0,0 +1 @@
|
||||
@laconic-network:registry=https://git.vdb.to/api/packages/LaconicNetwork/npm/
|
||||
@ -23,6 +23,7 @@
|
||||
"@cosmjs/encoding": "^0.33.1",
|
||||
"@cosmjs/proto-signing": "^0.33.1",
|
||||
"@cosmjs/stargate": "^0.33.1",
|
||||
"@laconic-network/cosmjs-util": "^0.1.0",
|
||||
"@keyv/sqlite": "^3.6.7",
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.19.2",
|
||||
|
||||
@ -6,11 +6,13 @@ import toml from 'toml';
|
||||
import cors from 'cors';
|
||||
|
||||
import { DirectSecp256k1Wallet } from '@cosmjs/proto-signing';
|
||||
import { GasPrice, SigningStargateClient } from '@cosmjs/stargate';
|
||||
import { SigningStargateClient } from '@cosmjs/stargate';
|
||||
import { Comet38Client } from '@cosmjs/tendermint-rpc';
|
||||
import { fromBech32 } from '@cosmjs/encoding';
|
||||
import KeyvSqlite from '@keyv/sqlite';
|
||||
|
||||
import { parseCustomGasPrice } from '@laconic-network/cosmjs-util';
|
||||
|
||||
const CONFIG_PATH = 'environments/local.toml';
|
||||
const FAUCET_DATA_FILE = 'faucet_data.sqlite';
|
||||
const FAUCET_DATA_TTL = 86400000; // 24 hrs
|
||||
@ -123,7 +125,7 @@ async function sendTokens (config: Config, recipientAddress: string, amount: str
|
||||
const client = await SigningStargateClient.createWithSigner(
|
||||
cometClient,
|
||||
wallet,
|
||||
{ gasPrice: GasPrice.fromString(`${config.upstream.gasPrice}${config.upstream.denom}`) }
|
||||
{ gasPrice: parseCustomGasPrice(`${config.upstream.gasPrice}${config.upstream.denom}`) }
|
||||
);
|
||||
|
||||
const result = await client.sendTokens(
|
||||
|
||||
@ -201,6 +201,14 @@
|
||||
dependencies:
|
||||
sqlite3 "^5.1.7"
|
||||
|
||||
"@laconic-network/cosmjs-util@^0.1.0":
|
||||
version "0.1.0"
|
||||
resolved "https://git.vdb.to/api/packages/LaconicNetwork/npm/%40laconic-network%2Fcosmjs-util/-/0.1.0/cosmjs-util-0.1.0.tgz#899af1de6101834e42c68aa684a00f51f7b913ed"
|
||||
integrity sha512-18Gez/2FwDkLf/de1x6httgtwrj+9jldc7V6Or0KGGtboQgKPUC6G5RebowpeWR/d9GVORV3ha8H2PpCtH4XMQ==
|
||||
dependencies:
|
||||
"@cosmjs/math" "^0.33.1"
|
||||
"@cosmjs/stargate" "^0.33.1"
|
||||
|
||||
"@noble/hashes@^1":
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user