Skip to content

Commit

Permalink
refactor: import synthetic-chain lib
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Dec 13, 2023
1 parent 2421261 commit ccd317a
Show file tree
Hide file tree
Showing 54 changed files with 1,901 additions and 2,618 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ web_modules/

# Output of 'npm pack'
*.tgz
!agoric-synthetic-chain-*.tgz

# Yarn Integrity file
.yarn-integrity
Expand Down
6 changes: 3 additions & 3 deletions proposals/34:upgrade-10/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ import {
agops,
agopsLocation,
executeCommand,
} from '../../upgrade-test-scripts/lib/cliHelper.js';
} from '@agoric/synthetic-chain/src/lib/cliHelper.js';
import {
HOME,
ATOM_DENOM,
GOV1ADDR,
GOV2ADDR,
GOV3ADDR,
} from '../../upgrade-test-scripts/lib/constants.js';
} from '@agoric/synthetic-chain/src/lib/constants.js';
import {
waitForBlock,
executeOffer,
getUser,
provisionSmartWallet,
} from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js';
} from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js';

const govAccounts = [GOV1ADDR, GOV2ADDR, GOV3ADDR];

Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions proposals/34:upgrade-10/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"type": "module",
"license": "Apache-2.0",
"dependencies": {
"@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz",
"ava": "^5.3.1",
"better-sqlite3": "^8.5.1",
"execa": "^7.2.0"
Expand Down
8 changes: 4 additions & 4 deletions proposals/34:upgrade-10/performActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ import {
agd,
agoric,
agops,
} from '../../upgrade-test-scripts/lib/cliHelper.js';
} from '@agoric/synthetic-chain/src/lib/cliHelper.js';
import {
GOV1ADDR,
GOV2ADDR,
} from '../../upgrade-test-scripts/lib/constants.js';
} from '@agoric/synthetic-chain/src/lib/constants.js';
import {
getUser,
newOfferId,
waitForBlock,
} from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js';
} from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js';
import { submitDeliverInbound } from './upgradeHelpers.js';
import {
openVault,
adjustVault,
closeVault,
} from '../../upgrade-test-scripts/lib/econHelpers.js';
} from '@agoric/synthetic-chain/src/lib/econHelpers.js';

const START_FREQUENCY = 600; // StartFrequency: 600s (auction runs every 10m)
const CLOCK_STEP = 20; // ClockStep: 20s (ensures auction completes in time)
Expand Down
6 changes: 3 additions & 3 deletions proposals/34:upgrade-10/post.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import test from 'ava';

import { agd, agoric } from '../../upgrade-test-scripts/lib/cliHelper.js';
import { agd, agoric } from '@agoric/synthetic-chain/src/lib/cliHelper.js';
import {
GOV1ADDR,
GOV2ADDR,
GOV3ADDR,
USER1ADDR,
} from '../../upgrade-test-scripts/lib/constants.js';
import { calculateWalletState } from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js';
} from '@agoric/synthetic-chain/src/lib/constants.js';
import { calculateWalletState } from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js';

test('DeliverInbound from un-provisioned account is discarded', async t => {
const result = await agd.query('swingset', 'mailbox', USER1ADDR);
Expand Down
8 changes: 4 additions & 4 deletions proposals/34:upgrade-10/pre.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ import {
agd,
agoric,
agops,
} from '../../upgrade-test-scripts/lib/cliHelper.js';
} from '@agoric/synthetic-chain/src/lib/cliHelper.js';

import {
GOV1ADDR,
GOV2ADDR,
GOV3ADDR,
PSM_PAIR,
} from '../../upgrade-test-scripts/lib/constants.js';
import { openVault } from '../../upgrade-test-scripts/lib/econHelpers.js';
} from '@agoric/synthetic-chain/src/lib/constants.js';
import { openVault } from '@agoric/synthetic-chain/src/lib/econHelpers.js';
import {
getUser,
waitForBlock,
} from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js';
} from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js';

test.before(async () => {
console.log('Wait for upgrade to settle');
Expand Down
6 changes: 3 additions & 3 deletions proposals/34:upgrade-10/upgradeHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {
VALIDATORADDR,
USER1ADDR,
CHAINID,
} from '../../upgrade-test-scripts/lib/constants.js';
} from '@agoric/synthetic-chain/src/lib/constants.js';

import { agd } from '../../upgrade-test-scripts/lib/cliHelper.js';
import { getUser } from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js';
import { agd } from '@agoric/synthetic-chain/src/lib/cliHelper.js';
import { getUser } from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js';

export const printKeys = async () => {
console.log('========== GOVERNANCE KEYS ==========');
Expand Down
Loading

0 comments on commit ccd317a

Please sign in to comment.