Compare commits

..
Author SHA1 Message Date
Michael Shaw 3cb01bca63 always create new bond with provisionBondId helper call 2023-02-20 08:41:12 -05:00
Michael Shaw 84fed44808 debugging statements for provisionBondId 2023-02-17 12:06:58 -05:00
Michael 2870a7543a version bump to 0.1.6 (#31) 2023-02-15 10:23:49 -05:00
Michael 77af2e5e22 Auction nameservice tests (#28)
* truncated testing until questions of intent answered

* nameservice passes local tests

* first pass running tests from sdk side

* lint cleanup

* move into dir rather than args

* double bond in naming test

* first pass building test container on sdk side... only basic tests this iteration

* missing jest

* docker compose exec got dropped

* start both containers, not just laconicd

* script cleanup in action

* working directory

* diagnostic

* diagnostic

* run against dev branch of laconicd

* run auction and nameservice-expiry tests

* switch to main branch
2023-02-10 14:44:23 -05:00
Michael 663ebbf8e0 Merge pull request #30 from cerc-io/readme_quick
quick README update to reflect reality
2023-02-06 12:48:21 -05:00
Michael Shaw c6a37ac419 quick README update to reflect reality 2023-02-06 12:47:29 -05:00
3 changed files with 14 additions and 9 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ Follow these steps to run the tests:
- In laconicd repo run:
```bash
TEST_NAMESERVICE_EXPIRY=true ./init.sh
TEST_REGISTRY_EXPIRY=true ./init.sh
```
- Export the private key and change it in `.env` file again using:
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/laconic-sdk",
"version": "0.1.5",
"version": "0.1.6",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": "git@github.com:cerc-io/laconic-sdk.git",
+12 -7
View File
@@ -24,13 +24,18 @@ export const getBaseConfig = async (path: string) => {
* Provision a bond for record registration.
*/
export const provisionBondId = async (registry: Registry, privateKey: string, fee: Fee) => {
let bonds = await registry.queryBonds();
if (!bonds.length) {
await registry.createBond({ denom: 'aphoton', amount: '1000000000' }, privateKey, fee);
bonds = await registry.queryBonds();
}
return bonds[0].id;
// let bonds = await registry.queryBonds();
// console.log("found bonds: " + bonds.length)
// if (!bonds.length) {
// await registry.createBond({ denom: 'aphoton', amount: '1000000000' }, privateKey, fee);
// bonds = await registry.queryBonds();
// console.log("created bond and got back: " + bonds.length)
// }
let bondId: string;
bondId = await registry.getNextBondId(privateKey);
await registry.createBond({ denom: 'aphoton', amount: '1000000000' }, privateKey, fee);
return bondId
//return bonds[0].id;
};
export const getConfig = () => {