aleeusgr / potential-robot

minimal dApp testing suite
MIT License
3 stars 2 forks source link

refactor Datum #129

Closed aleeusgr closed 6 months ago

aleeusgr commented 1 year ago

This is how I do it for now:

const datum = new ConstrData(0, [
  new ByteArrayData(organizer.pubKeyHash.bytes),
  new ByteArrayData(attendee.pubKeyHash.bytes),
  new IntData(BigInt(Math.floor(releaseDate.getTime() / 1000))),
  new IntData(BigInt(Math.floor(cancelDeadline.getTime() / 1000))),
  new IntData(BigInt(Math.floor(createdAt.getTime() / 1000))),
])
aleeusgr commented 1 year ago

https://github.com/lley154/atomic-swap-open-protocol/blob/main/pages/index.tsx