redstone-finance / redstone-oracles-monorepo

Other
93 stars 48 forks source link

`createPayloadCell` needs to be used by developers, but is not exported by `@redstone-finance/ton-connector` #7

Closed 9oelM closed 1 month ago

9oelM commented 2 months ago

From the code below:

https://github.com/redstone-finance/redstone-oracles-monorepo/blob/281e41517a54ae0d9a9c0c30c39d0ccf15950d68/packages/ton-connector/test/tester/TonTester.ts#L16-L36

we know that createPayloadCell is being used to create a payload of type cell for the contract to consume, because cell is the type of the data that can be understood by process_payload, which is a function that is used to verify and deserialize the signed prices information on-chain:

https://github.com/redstone-finance/redstone-oracles-monorepo/blob/281e41517a54ae0d9a9c0c30c39d0ccf15950d68/packages/ton-connector/contracts/redstone/processor.fc#L12-L12

createPayloadCell is defined here: https://github.com/redstone-finance/redstone-oracles-monorepo/blob/281e41517a54ae0d9a9c0c30c39d0ccf15950d68/packages/ton-connector/src/create-payload-cell.ts#L11-L11

But is not being exported as a part of @redstone-finance/ton-connector. So I can easily get the payload in hex format using https://github.com/redstone-finance/redstone-oracles-monorepo/blob/281e41517a54ae0d9a9c0c30c39d0ccf15950d68/packages/sdk/scripts/payload-generator/, but I can't transform it into cell.

To resolve this issue, we just need to make sure export * from "./create-payload-cell"; is included in this file:

https://github.com/redstone-finance/redstone-oracles-monorepo/blob/281e41517a54ae0d9a9c0c30c39d0ccf15950d68/packages/ton-connector/src/index.ts#L1-L11

cc @Lukasz2891

9oelM commented 2 months ago

@Lukasz2891

9oelM commented 2 months ago

@Lukasz2891

Oyase-shinobi commented 1 month ago

hi @9oelM I can fix this issue