diff --git a/packages/agoric-cli/test/agops-oracle-smoketest.sh b/packages/agoric-cli/test/agops-oracle-smoketest.sh index e009a33f521c..94166a639941 100644 --- a/packages/agoric-cli/test/agops-oracle-smoketest.sh +++ b/packages/agoric-cli/test/agops-oracle-smoketest.sh @@ -64,9 +64,9 @@ agoric wallet send --from "$WALLET2" --offer "$PROPOSAL_OFFER" # second round, first oracle PROPOSAL_OFFER=$(mktemp -t agops.XXX) -bin/agops oracle pushPriceRound --price 1.02 --roundId 2 --oracleAdminAcceptOfferId "$ORACLE_OFFER_ID" >|"$PROPOSAL_OFFER" +bin/agops oracle pushPriceRound --price 11.02 --roundId 2 --oracleAdminAcceptOfferId "$ORACLE_OFFER_ID" >|"$PROPOSAL_OFFER" agoric wallet send --from "$WALLET" --offer "$PROPOSAL_OFFER" # second round, second oracle PROPOSAL_OFFER=$(mktemp -t agops.XXX) -bin/agops oracle pushPriceRound --price 2.01 --roundId 2 --oracleAdminAcceptOfferId "$ORACLE2_OFFER_ID" >|"$PROPOSAL_OFFER" +bin/agops oracle pushPriceRound --price 12.02 --roundId 2 --oracleAdminAcceptOfferId "$ORACLE2_OFFER_ID" >|"$PROPOSAL_OFFER" agoric wallet send --from "$WALLET2" --offer "$PROPOSAL_OFFER" diff --git a/packages/zoe/src/contracts/priceAggregatorChainlink.js b/packages/zoe/src/contracts/priceAggregatorChainlink.js index 6fa3f9cf9732..403f1c8219bb 100644 --- a/packages/zoe/src/contracts/priceAggregatorChainlink.js +++ b/packages/zoe/src/contracts/priceAggregatorChainlink.js @@ -1,3 +1,7 @@ +/** @file + * Adaptation of Chainlink algorithm to the Agoric platform. + * Modeled on https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.6/FluxAggregator.sol (version?) + */ import { AmountMath, AssetKind, makeIssuerKit } from '@agoric/ertp'; import { E } from '@endo/eventual-send'; import { Far } from '@endo/marshal'; @@ -27,6 +31,7 @@ import { export { INVITATION_MAKERS_DESC }; +// FIXME is MAX_SAFE_INTEGER sufficient? why encoded as string? /** * @typedef {{ roundId: number | undefined, data: string }} PriceRound * `data` is a string encoded integer (Number.MAX_SAFE_INTEGER)