Skip to content

Commit

Permalink
feat: add upgrade-13
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman committed Dec 15, 2023
1 parent 1d43cd0 commit 51a9306
Show file tree
Hide file tree
Showing 5 changed files with 2,005 additions and 0 deletions.
1 change: 1 addition & 0 deletions proposals/65:upgrade-13/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
18 changes: 18 additions & 0 deletions proposals/65:upgrade-13/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"agoricProposal": {
"releaseNotes": "https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-13",
"sdkImageTag": "39",
"planName": "agoric-upgrade-13",
"type": "Software Upgrade Proposal"
},
"type": "module",
"license": "Apache-2.0",
"dependencies": {
"ava": "^5.3.1",
"execa": "^7.2.0"
},
"scripts": {
"agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops"
},
"packageManager": "[email protected]"
}
55 changes: 55 additions & 0 deletions proposals/65:upgrade-13/post.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import test from 'ava';

import { agd } from '../../upgrade-test-scripts/lib/cliHelper.js';
import {
ATOM_DENOM,
CHAINID,
GOV1ADDR,
} from '../../upgrade-test-scripts/lib/constants.js';
import {
mintIST,
getISTBalance,
openVault,
} from '../../upgrade-test-scripts/lib/econHelpers.js';
import {
waitForBlock,
addUser,
} from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js';

test.before(async t => {
await mintIST(GOV1ADDR, 12340000000, 10000, 2000);

await waitForBlock(2);
const userAddress = await addUser('user-auto');
await agd.tx(
'bank',
'send',
'gov1',
userAddress,
`1000000uist,2100000000${ATOM_DENOM}`,
'--from',
GOV1ADDR,
'--chain-id',
CHAINID,
'--keyring-backend',
'test',
'--yes',
);
t.context = { userAddress };
await waitForBlock(2);
});

test('Open Vaults with auto-provisioned wallet', async t => {
const { userAddress } = /** @type {{userAddress: string}} */ (t.context);
t.is(await getISTBalance(userAddress), 1);

const ATOMGiven = 2000;
const ISTWanted = 400;
await openVault(userAddress, ISTWanted, ATOMGiven);

await waitForBlock(2);

const newISTBalance = await getISTBalance(userAddress);
t.log('New IST Balance in user-auto account:', newISTBalance);
t.true(newISTBalance >= ISTWanted, 'Got the wanted IST');
});
4 changes: 4 additions & 0 deletions proposals/65:upgrade-13/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
source /usr/src/upgrade-test-scripts/env_setup.sh

yarn ava post.test.js
Loading

0 comments on commit 51a9306

Please sign in to comment.