0.2.1 • Published 2 years ago

optimized-order-obtain v0.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Optimized Order Obtain

import { encodeOrder, Order } from 'optimized-order-obtain'

const response = await fetch(`https://endpoint.com/contract_address`, {
  headers: { 'x-api-key': 'your api key' },
})

const json = (await response.json()) as { orders: Order[] }

const order = json.orders[0]

const { value, gasLimit } = order

const from = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'

const { to, data } = encodeOrder(order.type, order.args, from)

const transaction = { from, to, value, data, gasLimit }
0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago