Compare commits
8 Commits
b9d6804c17
...
4026195be3
Author | SHA1 | Date | |
---|---|---|---|
|
4026195be3 | ||
70e63c74f1 | |||
901126d23f | |||
4f5de6ff38 | |||
aa2117e472 | |||
e6b747fb48 | |||
ed06cc05a6 | |||
aff309eaad |
@ -39,7 +39,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: "./laconicd/"
|
||||
repository: cerc-io/laconic2d # TODO: Update to laconicd after renaming repo
|
||||
repository: cerc-io/laconicd
|
||||
fetch-depth: 0
|
||||
ref: main
|
||||
|
||||
|
48
README.md
48
README.md
@ -56,6 +56,12 @@ laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe
|
||||
|
||||
In `config.yml` file assign the account private key to `userKey`.
|
||||
|
||||
Set a denom for further use:
|
||||
|
||||
```bash
|
||||
export DENOM=alnt
|
||||
```
|
||||
|
||||
## Gas and Fees
|
||||
|
||||
https://docs.evmos.org/users/basics/gas.html
|
||||
@ -68,7 +74,7 @@ The `gas` and `fees` can be set to some default values in the config, and can be
|
||||
Example:
|
||||
|
||||
```bash
|
||||
$ laconic registry bond create --type photon --quantity 1000000000 --gas 200000 --fees 200000photon
|
||||
$ laconic registry bond create --type $DENOM --quantity 100000000000 --gas 200000 --fees 200000$DENOM
|
||||
```
|
||||
|
||||
## Operations
|
||||
@ -121,7 +127,7 @@ $ laconic registry account get --address laconic15za32wly5exgcrt2zfr8php4ya49n5y
|
||||
"sequence": "37",
|
||||
"balance": [
|
||||
{
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "89998999999999991999799300"
|
||||
}
|
||||
]
|
||||
@ -132,7 +138,7 @@ $ laconic registry account get --address laconic15za32wly5exgcrt2zfr8php4ya49n5y
|
||||
Send tokens:
|
||||
|
||||
```bash
|
||||
$ laconic registry tokens send --address laconic15za32wly5exgcrt2zfr8php4ya49n5y7masu7k --type photon --quantity 1000000000
|
||||
$ laconic registry tokens send --address laconic15za32wly5exgcrt2zfr8php4ya49n5y7masu7k --type $DENOM --quantity 1000000000
|
||||
[
|
||||
{
|
||||
"address": "laconic1pmuxrcnuhhf8qdllzuf2ctj2tnwwcg6yswqnyd",
|
||||
@ -141,7 +147,7 @@ $ laconic registry tokens send --address laconic15za32wly5exgcrt2zfr8php4ya49n5y
|
||||
"sequence": "16",
|
||||
"balance": [
|
||||
{
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "99998999999999997973999700"
|
||||
}
|
||||
]
|
||||
@ -153,7 +159,7 @@ $ laconic registry tokens send --address laconic15za32wly5exgcrt2zfr8php4ya49n5y
|
||||
"sequence": "0",
|
||||
"balance": [
|
||||
{
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "1000000000"
|
||||
}
|
||||
]
|
||||
@ -177,7 +183,7 @@ record:
|
||||
Publish record (see below for commands to create/query bonds):
|
||||
|
||||
```bash
|
||||
$ laconic registry record publish --filename watcher.yml --bond-id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 --gas 250000
|
||||
$ laconic registry record publish --filename watcher.yml --bond-id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 --gas 250000 --fees 250000$DENOM
|
||||
|
||||
{ id: 'bafyreic3auqajvgszh3vfjsouew2rsctswukc346dmlf273ln4g6iyyhba' }
|
||||
```
|
||||
@ -255,15 +261,15 @@ $ laconic registry authority whois laconic
|
||||
"commitsEndTime": "2022-04-26T11:44:45.679728594",
|
||||
"revealsEndTime": "2022-04-26T11:45:45.679728594",
|
||||
"commitFee": {
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "1000000"
|
||||
},
|
||||
"revealFee": {
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "1000000"
|
||||
},
|
||||
"minimumBid": {
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "5000000"
|
||||
},
|
||||
"winnerAddress": "",
|
||||
@ -294,15 +300,15 @@ $ laconic registry auction get 0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2
|
||||
"commitsEndTime": "2022-04-26T11:44:45.679728594",
|
||||
"revealsEndTime": "2022-04-26T11:45:45.679728594",
|
||||
"commitFee": {
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "1000000"
|
||||
},
|
||||
"revealFee": {
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "1000000"
|
||||
},
|
||||
"minimumBid": {
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "5000000"
|
||||
},
|
||||
"winnerAddress": "",
|
||||
@ -322,7 +328,7 @@ $ laconic registry auction get 0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2
|
||||
Commit an auction bid:
|
||||
|
||||
```bash
|
||||
$ laconic registry auction bid commit 0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2468d5d63abacd48 25000000 photon
|
||||
$ laconic registry auction bid commit 0294fb2e3659c347b53a6faf4bef041fd934f0f3ab13df6d2468d5d63abacd48 25000000 $DENOM
|
||||
|
||||
Reveal file: ./out/bafyreiay2rccax64yn4ljhvzvm3jkbebvzheyucuma5jlbpzpzd5i5gjuy.json
|
||||
```
|
||||
@ -426,7 +432,7 @@ $ laconic registry name resolve lrn://laconic/watcher/erc20
|
||||
Create bond:
|
||||
|
||||
```bash
|
||||
$ laconic registry bond create --type photon --quantity 1000
|
||||
$ laconic registry bond create --type $DENOM --quantity 1000
|
||||
```
|
||||
|
||||
List bonds:
|
||||
@ -439,7 +445,7 @@ $ laconic registry bond list
|
||||
"owner": "laconic15za32wly5exgcrt2zfr8php4ya49n5y7masu7k",
|
||||
"balance": [
|
||||
{
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "698000000"
|
||||
}
|
||||
]
|
||||
@ -449,7 +455,7 @@ $ laconic registry bond list
|
||||
"owner": "laconic15za32wly5exgcrt2zfr8php4ya49n5y7masu7k",
|
||||
"balance": [
|
||||
{
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "1000"
|
||||
}
|
||||
]
|
||||
@ -467,7 +473,7 @@ $ laconic registry bond get --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa1953
|
||||
"owner": "laconic15za32wly5exgcrt2zfr8php4ya49n5y7masu7k",
|
||||
"balance": [
|
||||
{
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "691000000"
|
||||
}
|
||||
]
|
||||
@ -485,7 +491,7 @@ $ laconic registry bond list --owner laconic15za32wly5exgcrt2zfr8php4ya49n5y7mas
|
||||
"owner": "laconic15za32wly5exgcrt2zfr8php4ya49n5y7masu7k",
|
||||
"balance": [
|
||||
{
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "684000000"
|
||||
}
|
||||
]
|
||||
@ -495,7 +501,7 @@ $ laconic registry bond list --owner laconic15za32wly5exgcrt2zfr8php4ya49n5y7mas
|
||||
"owner": "laconic15za32wly5exgcrt2zfr8php4ya49n5y7masu7k",
|
||||
"balance": [
|
||||
{
|
||||
"type": "photon",
|
||||
"type": "alnt",
|
||||
"quantity": "1000"
|
||||
}
|
||||
]
|
||||
@ -506,13 +512,13 @@ $ laconic registry bond list --owner laconic15za32wly5exgcrt2zfr8php4ya49n5y7mas
|
||||
Refill bond:
|
||||
|
||||
```bash
|
||||
$ laconic registry bond refill --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 --type photon --quantity 1000
|
||||
$ laconic registry bond refill --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 --type $DENOM --quantity 1000
|
||||
```
|
||||
|
||||
Withdraw funds from bond:
|
||||
|
||||
```bash
|
||||
$ laconic registry bond withdraw --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 --type photon --quantity 500
|
||||
$ laconic registry bond withdraw --id 58508984500aa2ed18e059fa8203b40fbc9828e3bfa195361335c4e4524c4785 --type $DENOM --quantity 500
|
||||
```
|
||||
|
||||
Cancel bond:
|
||||
|
@ -6,4 +6,4 @@ services:
|
||||
bondId:
|
||||
chainId: laconic_9000-1
|
||||
gas: 200000
|
||||
fees: 200000photon
|
||||
fees: 200000alnt
|
||||
|
@ -33,8 +33,11 @@
|
||||
# Set the output as 'userKey' in config.yml
|
||||
# userKey: <ALICE_PRIVATE_KEY>
|
||||
|
||||
# Set a denom
|
||||
export DENOM=alnt
|
||||
|
||||
# Create a bond
|
||||
laconic --config config.yml registry bond create --type photon --quantity 100000000000
|
||||
laconic --config config.yml registry bond create --type $DENOM --quantity 100000000000
|
||||
|
||||
# Get the bond id
|
||||
laconic --config config.yml registry bond list | jq -r '.[].id'
|
||||
@ -57,12 +60,12 @@
|
||||
|
||||
### Example
|
||||
|
||||
* Query for `ajna-watcher` deployment(s):
|
||||
* Query for `azimuth-watcher` deployment(s):
|
||||
|
||||
* Find the `WatcherRecord` for `ajna-watcher`:
|
||||
* Find the `WatcherRecord` for `azimuth-watcher`:
|
||||
|
||||
```bash
|
||||
WATCHER_RECORD_ID=$(laconic registry record list --all --type WatcherRecord --name ajna-watcher | jq -r '.[].id')
|
||||
WATCHER_RECORD_ID=$(laconic registry record list --all --type WatcherRecord --name azimuth-watcher | jq -r '.[].id')
|
||||
```
|
||||
|
||||
* Find corresponding deployment(s):
|
||||
@ -74,7 +77,7 @@
|
||||
laconic registry record list --all --type WatcherDeploymentRecord watcher $WATCHER_RECORD_ID | jq -r '.[].attributes.url'
|
||||
|
||||
# Expected output:
|
||||
https://ajna-watcher-endpoint.example.com
|
||||
https://azimuth-watcher-endpoint.example.com
|
||||
```
|
||||
|
||||
* Query for `sushiswap-v3-subgraph` deployment(s):
|
||||
|
@ -1,17 +1,27 @@
|
||||
import yargs from 'yargs';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import yaml from 'js-yaml';
|
||||
import assert from 'assert';
|
||||
import { hideBin } from 'yargs/helpers';
|
||||
|
||||
import { StdFee } from '@cosmjs/stargate';
|
||||
import { Registry } from '@cerc-io/registry-sdk';
|
||||
|
||||
import { getConfig, getGasAndFees, getConnectionInfo, txOutput } from '../../src/util';
|
||||
|
||||
enum RecordType {
|
||||
RepositoryRecord = 'RepositoryRecord',
|
||||
ServiceRecord = 'ServiceRecord',
|
||||
StackRecord = 'StackRecord',
|
||||
SubgraphRecord = 'SubgraphRecord',
|
||||
WatcherRecord = 'WatcherRecord',
|
||||
}
|
||||
|
||||
const recordTypeToRecordField = new Map<string, string>([
|
||||
['WatcherRecord', 'watcher'],
|
||||
['SubgraphRecord', 'subgraph'],
|
||||
['ServiceRecord', 'service']
|
||||
[RecordType.WatcherRecord, 'watcher'],
|
||||
[RecordType.SubgraphRecord, 'subgraph'],
|
||||
[RecordType.ServiceRecord, 'service']
|
||||
]);
|
||||
|
||||
let registry: Registry;
|
||||
@ -45,10 +55,8 @@ async function main () {
|
||||
async function processDir (directoryPath: string): Promise<void> {
|
||||
const files = fs.readdirSync(directoryPath);
|
||||
|
||||
// Check if any JSON record file exists in the directory
|
||||
if (files.some(file => file.endsWith('.json'))) {
|
||||
await publishRecordsFromDir(directoryPath);
|
||||
|
||||
const dirHasRecords = await publishRecordsFromDir(directoryPath);
|
||||
if (dirHasRecords) {
|
||||
// Skip further recursion in the current dir
|
||||
return;
|
||||
}
|
||||
@ -64,24 +72,28 @@ async function processDir (directoryPath: string): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
async function publishRecordsFromDir (recordsDir: string): Promise<void> {
|
||||
async function publishRecordsFromDir (recordsDir: string): Promise<boolean> {
|
||||
// List record files
|
||||
const files = fs.readdirSync(recordsDir);
|
||||
const jsonFiles = files.filter(file => path.extname(file).toLowerCase() === '.json');
|
||||
const recordFiles = files.filter(file => ['.json', '.yaml', '.yml'].includes(path.extname(file).toLowerCase()));
|
||||
|
||||
if (recordFiles.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Read record from each JSON file
|
||||
console.log('**************************************');
|
||||
console.log(`Publishing records from ${recordsDir}`);
|
||||
|
||||
let recordType;
|
||||
for (let i = 0; i < jsonFiles.length; i++) {
|
||||
const file = jsonFiles[i];
|
||||
for (let i = 0; i < recordFiles.length; i++) {
|
||||
const file = recordFiles[i];
|
||||
|
||||
const filePath = path.resolve(recordsDir, file);
|
||||
const record = readRecord(filePath);
|
||||
const record = await readRecord(filePath);
|
||||
|
||||
// Publish record
|
||||
const result = await registry.setRecord({ privateKey: userKey, record, bondId }, userKey, fee);
|
||||
const result = await publishRecord(userKey, bondId, fee, record);
|
||||
|
||||
console.log(`Published record ${file}`);
|
||||
txOutput(result, JSON.stringify(result, undefined, 2), '', false);
|
||||
@ -91,8 +103,8 @@ async function publishRecordsFromDir (recordsDir: string): Promise<void> {
|
||||
|
||||
// Check if deployment record files exist
|
||||
const deploymentRecordsDir = path.resolve(recordsDir, 'deployments');
|
||||
if (!fs.statSync(deploymentRecordsDir).isDirectory()) {
|
||||
return;
|
||||
if (!fs.existsSync(deploymentRecordsDir) || !fs.statSync(deploymentRecordsDir).isDirectory()) {
|
||||
return true;
|
||||
}
|
||||
console.log('--------------------------------------');
|
||||
console.log(`Publishing deployment records from ${deploymentRecordsDir}`);
|
||||
@ -105,7 +117,7 @@ async function publishRecordsFromDir (recordsDir: string): Promise<void> {
|
||||
const file = deploymentJsonFiles[i];
|
||||
|
||||
const filePath = path.resolve(deploymentRecordsDir, file);
|
||||
const deploymentRecord = readRecord(filePath);
|
||||
const deploymentRecord = await readRecord(filePath);
|
||||
|
||||
// Find record using name and given type
|
||||
const recordName = deploymentRecord.name;
|
||||
@ -128,13 +140,30 @@ async function publishRecordsFromDir (recordsDir: string): Promise<void> {
|
||||
console.log(`Published record ${file}`);
|
||||
txOutput(deploymentResult, JSON.stringify(deploymentResult, undefined, 2), '', false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function readRecord (filePath: string): any {
|
||||
async function readRecord (filePath: string): Promise<any> {
|
||||
let record;
|
||||
try {
|
||||
const fileExt = path.extname(filePath).toLowerCase();
|
||||
const data = fs.readFileSync(filePath, 'utf8');
|
||||
record = JSON.parse(data);
|
||||
|
||||
if (fileExt === '.json') {
|
||||
// JSON file
|
||||
record = JSON.parse(data);
|
||||
} else {
|
||||
// YAML file
|
||||
({ record } = await yaml.load(data) as any);
|
||||
|
||||
// Convert sub-objects (other than arrays) to a JSON automatically.
|
||||
for (const [k, v] of Object.entries(record)) {
|
||||
if (v && typeof v === 'object' && !Array.isArray(v)) {
|
||||
record[k] = JSON.stringify(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`Error reading file ${filePath}:`, err);
|
||||
}
|
||||
@ -142,6 +171,26 @@ function readRecord (filePath: string): any {
|
||||
return record;
|
||||
}
|
||||
|
||||
async function publishRecord (userKey: string, bondId: string, fee: StdFee, record: any): Promise<any> {
|
||||
// Replace repository URL with record id (if type is one of RecordType)
|
||||
if (record.repository && Object.values(RecordType).includes(record.type)) {
|
||||
const repoUrl = record.repository;
|
||||
|
||||
const queryResult = await registry.queryRecords({ type: RecordType.RepositoryRecord, url: repoUrl }, true);
|
||||
if (queryResult.length === 0) {
|
||||
throw new Error(`Record not found, type: ${RecordType.RepositoryRecord}, url: ${repoUrl}`);
|
||||
}
|
||||
|
||||
// Assume the first query result
|
||||
const repoRecordId = queryResult[0].id;
|
||||
|
||||
// Replace repository URL with the repo record id
|
||||
record.repository = repoRecordId;
|
||||
}
|
||||
|
||||
return registry.setRecord({ privateKey: userKey, record, bondId }, userKey, fee);
|
||||
}
|
||||
|
||||
function getArgs (): any {
|
||||
return yargs(hideBin(process.argv)).parserConfiguration({
|
||||
'parse-numbers': false
|
||||
|
@ -2,7 +2,7 @@ services:
|
||||
laconicd:
|
||||
restart: unless-stopped
|
||||
image: cerc/laconicd:local
|
||||
command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
|
||||
command: ["bash", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
|
||||
environment:
|
||||
- TEST_AUCTION_ENABLED
|
||||
- TEST_REGISTRY_EXPIRY
|
||||
@ -10,7 +10,7 @@ services:
|
||||
volumes:
|
||||
- ./laconicd/scripts/init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-v", "http://127.0.0.1:6060"]
|
||||
test: ["CMD", "curl", "-v", "http://127.0.0.1", "6060"]
|
||||
interval: 1s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cerc-io/laconic-registry-cli",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.2",
|
||||
"main": "index.js",
|
||||
"repository": "git@github.com:cerc-io/laconic-registry-cli.git",
|
||||
"author": "",
|
||||
@ -29,7 +29,7 @@
|
||||
"typescript": "^4.6.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cerc-io/registry-sdk": "^0.2.1",
|
||||
"@cerc-io/registry-sdk": "^0.2.5",
|
||||
"fs-extra": "^10.1.0",
|
||||
"js-yaml": "^3.14.1",
|
||||
"lodash": "^4.17.21",
|
||||
|
@ -52,7 +52,7 @@ describe('Test laconic CLI commands', () => {
|
||||
const testAccount = process.env.TEST_ACCOUNT;
|
||||
assert(testAccount, 'TEST_ACCOUNT not set in env');
|
||||
const testAccount2 = 'laconic1pmuxrcnuhhf8qdllzuf2ctj2tnwwcg6yswqnyd';
|
||||
const initialAccountBalance = Number('100000000000000000000000000');
|
||||
const initialAccountBalance = Number('1000000000000000000000000000000');
|
||||
|
||||
const testAuthorityName = 'laconic';
|
||||
const testRecordFilePath = 'test/data/watcher-record.yml';
|
||||
@ -67,12 +67,12 @@ describe('Test laconic CLI commands', () => {
|
||||
expect(outputObj).toHaveProperty('node');
|
||||
expect(outputObj).toHaveProperty('node.network', CHAIN_ID);
|
||||
expect(outputObj).toHaveProperty('sync');
|
||||
expect(Number(outputObj.sync.latest_block_height)).toBeGreaterThan(0);
|
||||
expect(Number(outputObj.sync.latestBlockHeight)).toBeGreaterThan(0);
|
||||
expect(outputObj).toHaveProperty('validator');
|
||||
expect(outputObj).toHaveProperty('validators');
|
||||
expect(outputObj).toHaveProperty('num_peers');
|
||||
expect(outputObj).toHaveProperty('numPeers');
|
||||
expect(outputObj).toHaveProperty('peers');
|
||||
expect(outputObj).toHaveProperty('disk_usage');
|
||||
expect(outputObj).toHaveProperty('diskUsage');
|
||||
});
|
||||
|
||||
describe('Bond operations', () => {
|
||||
@ -224,12 +224,13 @@ describe('Test laconic CLI commands', () => {
|
||||
|
||||
describe('Record operations', () => {
|
||||
const gas = 250000;
|
||||
const fees = `250000${TOKEN_TYPE}`;
|
||||
const bondBalance = 1000000000;
|
||||
|
||||
test('laconic registry record publish --filename <record_file> --bond-id <bond_id> --gas <gas>', async () => {
|
||||
test('laconic registry record publish --filename <record_file> --bond-id <bond_id> --gas <gas> --fees <fees>', async () => {
|
||||
// Create a new bond to be associated with the record
|
||||
({ bondId: testRecordBondId } = createBond(bondBalance));
|
||||
const result = spawnSync('laconic', ['registry', 'record', 'publish', '--filename', testRecordFilePath, '--bond-id', testRecordBondId, '--gas', gas.toString()]);
|
||||
const result = spawnSync('laconic', ['registry', 'record', 'publish', '--filename', testRecordFilePath, '--bond-id', testRecordBondId, '--gas', gas.toString(), '--fees', fees]);
|
||||
const outputObj = checkResultAndRetrieveOutput(result);
|
||||
|
||||
// Expect output object to resultant bond id
|
||||
@ -397,7 +398,7 @@ describe('Test laconic CLI commands', () => {
|
||||
chainId: CHAIN_ID,
|
||||
auctionId: testAuctionId,
|
||||
bidderAddress: testAccount,
|
||||
bidAmount: `${bidAmount}photon`
|
||||
bidAmount: `${bidAmount}alnt`
|
||||
});
|
||||
}, (AUCTION_COMMIT_DURATION + 5) * 1000);
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import yaml from 'js-yaml';
|
||||
import { SpawnSyncReturns, spawnSync } from 'child_process';
|
||||
|
||||
export const CHAIN_ID = 'laconic_9000-1';
|
||||
export const TOKEN_TYPE = 'photon';
|
||||
export const TOKEN_TYPE = 'alnt';
|
||||
|
||||
export const AUCTION_FEES = {
|
||||
commit: 1000000,
|
||||
|
@ -1,5 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
# Wait for the laconid endpoint to come up
|
||||
docker compose exec laconicd sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api"
|
||||
|
||||
# Get the key from laconicd
|
||||
laconicd_key=$(yes | docker compose exec laconicd laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe)
|
||||
|
||||
@ -22,13 +28,10 @@ services:
|
||||
bondId:
|
||||
chainId: $cosmos_chain_id
|
||||
gas: 200000
|
||||
fees: 200000photon
|
||||
fees: 200000alnt
|
||||
EOL
|
||||
)
|
||||
echo "$config" > "$config_file"
|
||||
|
||||
# Wait for the laconid endpoint to come up
|
||||
docker compose exec laconicd sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api"
|
||||
|
||||
# Run tests
|
||||
TEST_ACCOUNT=$laconicd_account_address yarn test
|
||||
|
@ -302,10 +302,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@cerc-io/registry-sdk@^0.2.1":
|
||||
version "0.2.1"
|
||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fregistry-sdk/-/0.2.1/registry-sdk-0.2.1.tgz#c25cbfc89e469197b18e960baa4204e9e5c5511c"
|
||||
integrity sha512-rshIFOaYVyKJu4MU0OATN0JLYrjue9xvQ4Eqnd2z03lS8WMh0gt1eJHzp8A8sxs1IP/jpb6mWXhmu0oQujO2Sg==
|
||||
"@cerc-io/registry-sdk@^0.2.5":
|
||||
version "0.2.5"
|
||||
resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fregistry-sdk/-/0.2.5/registry-sdk-0.2.5.tgz#9ca19fecb2923520dd6a19946c309ecb2ec780a2"
|
||||
integrity sha512-/KXAYf9gStaX/rRBMCEeDCexEIpTOFHeHzMK9B3xfCT+SyYZE9WC9GpX299LzBYJKKPsb0/JvnDfip9S1igJtA==
|
||||
dependencies:
|
||||
"@cosmjs/amino" "^0.28.1"
|
||||
"@cosmjs/crypto" "^0.28.1"
|
||||
|
Loading…
Reference in New Issue
Block a user