-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(acceptance): support long living bids, improve robustness again…
…st time related complexities fix: apply change requests from PR review, resolve rebase conflicts, style fixes * change `performAction.js` name to `submitBid.js` * remove `Math.round` from `scale6` * update indexing of bids and other constants in `config` object to improve readability (`auction.test.js`) * move helper functions in `auction.test.js` to `test-lib/auction-lib.js` * move `lib/vaults.mts` to `test-lib/vaults.mts` and remove empty `lib` directory * let it be known `sync-tools.js` is a stand-in code for #10171 Refs: Agoric/BytePitchPartnerEng#8 fix: style fixes fix(acceptance-auction): lint fixes
- Loading branch information
1 parent
dedf1f3
commit 5bbdde8
Showing
9 changed files
with
645 additions
and
177 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env node | ||
|
||
import { | ||
GOV1ADDR, | ||
CHAINID, | ||
agd, | ||
agopsInter, | ||
addUser, | ||
waitForBlock, | ||
provisionSmartWallet, | ||
ATOM_DENOM, | ||
} from '@agoric/synthetic-chain'; | ||
|
||
export const bankSend = (from, addr, wanted) => { | ||
const chain = ['--chain-id', CHAINID]; | ||
const fromArg = ['--from', from]; | ||
const testKeyring = ['--keyring-backend', 'test']; | ||
const noise = [...fromArg, ...chain, ...testKeyring, '--yes']; | ||
|
||
return agd.tx('bank', 'send', from, addr, wanted, ...noise); | ||
}; | ||
|
||
const bidder = await addUser('long-living-bidder'); | ||
console.log('BIDDDER', bidder); | ||
await bankSend(GOV1ADDR, bidder, `80000000uist`); | ||
console.log('IST sent'); | ||
await provisionSmartWallet(bidder, `20000000ubld,100000000${ATOM_DENOM}`); | ||
console.log('Provision sent'); | ||
await waitForBlock(3); | ||
console.log('Wait For Block done. Sending bid offer'); | ||
agopsInter( | ||
'bid', | ||
'by-price', | ||
`--price 49.0`, | ||
`--give 80IST`, | ||
'--from', | ||
bidder, | ||
'--keyring-backend test', | ||
`--offer-id long-living-bid-for-acceptance`, | ||
); |
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ node ./addGov4 | |
|
||
./verifyPushedPrice.js 'ATOM' 12.01 | ||
./verifyPushedPrice.js 'stATOM' 12.01 | ||
./submitBid.js |
Oops, something went wrong.