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:
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 typecell
for the contract to consume, becausecell
is the type of the data that can be understood byprocess_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-L11But 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 intocell
.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