0.2.1 • Published 3 years ago

optimized-order-obtain v0.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 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

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago