Skip to content

Commit

Permalink
chore: deprecate blockTimestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Feb 25, 2025
1 parent fee1402 commit 31dac9e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fast-usdc/src/cli/operator-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ export const addOperatorCommands = (
.requiredOption('--recipientAddress <string>', 'bech32 address', String)
.requiredOption('--blockHash <0xhex>', 'hex hash', parseHex)
.requiredOption('--blockNumber <number>', 'number', parseNat)
.requiredOption('--blockTimestamp <number>', 'number', parseNat)
.requiredOption('--chainId <string>', 'chain id', Number)
.requiredOption('--amount <number>', 'number', parseNat)
.requiredOption('--forwardingAddress <string>', 'bech32 address', String)
.requiredOption('--sender <string>', 'Ethereum address initiating', String)
.requiredOption('--txHash <0xhexo>', 'hex hash', parseHex)
.option('--blockTimestamp <number>', 'number', parseNat, 0n)
.option('--offerId <string>', 'Offer id', String, `operatorAttest-${now()}`)
.action(async opts => {
const {
Expand Down
2 changes: 2 additions & 0 deletions packages/fast-usdc/src/exos/status-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ export const prepareStatusManager = (
*
* @type {MapStore<EvmHash, NatValue>}
*/
// TODO make prunable https://github.com/Agoric/agoric-sdk/issues/11050
// NB: the blockTimestamp coming in from OCW is not reliable as yet.
const seenTxs = zone.mapStore('SeenTxs', {
keyShape: M.string(),
valueShape: M.nat(),
Expand Down
1 change: 1 addition & 0 deletions packages/fast-usdc/src/type-guards.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export const CctpTxEvidenceShape = {
},
blockHash: EvmHashShape,
blockNumber: M.nat(),
/** @deprecated Currently not relied upon. May be removed or made real again in the future. */
blockTimestamp: M.nat(),
chainId: M.number(),
tx: {
Expand Down
2 changes: 2 additions & 0 deletions packages/fast-usdc/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export interface CctpTxEvidence {
/** height of blockHash on the source chain */
blockNumber: bigint;
/**
* @deprecated Currently not relied upon. May be removed or made real again in the future.
*
* Seconds since Unix epoch. Not all CCTP source chains update time the same
* way but they all use Unix epoch and thus are approximately equal. (Within
* minutes apart.)
Expand Down

0 comments on commit 31dac9e

Please sign in to comment.