-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
2,047 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "yarn@4.0.2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.