You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Derive/read ProtocolParameters, obtain its configured collateral definition,
and supply canonical CLOCK_01 internally.
Preserve the seven IDL accounts in exact order:
owner
Position
Vault
user collateral holding
collateral definition
protocol parameters
CLOCK_01
Preserve all IDL signer/writable/init metadata. Owner and user collateral
holding are the two signers.
Verify both signer accounts are public and controlled by the active wallet
before submission.
Preflight protocol initialization/frozen state, configured collateral
definition, source-holding definition/program ownership, and absence of
initialized Position/Vault state when the wallet/indexer surface permits it.
Goal
Expose the fee-aware
open_positioninstruction rebuilt by #341 as anopenPositiontransaction method instablecoin_module.Scope
Add a typed
stablecoin_ffiplanner forInstruction::OpenPosition { position_nonce, initial_collateral_amount }.Add
openPosition(request)toStablecoinModuleImpl, accepting:ownerIdpositionNonceinitialCollateralAmountuserCollateralHoldingIdDerive Position and Vault PDAs internally from the stablecoin program ID,
owner, and nonce, reusing Expose stablecoin position resolution and decoding #325.
Derive/read
ProtocolParameters, obtain its configured collateral definition,and supply canonical
CLOCK_01internally.Preserve the seven IDL accounts in exact order:
CLOCK_01Preserve all IDL signer/writable/init metadata. Owner and user collateral
holding are the two signers.
Verify both signer accounts are public and controlled by the active wallet
before submission.
Preflight protocol initialization/frozen state, configured collateral
definition, source-holding definition/program ownership, and absence of
initialized Position/Vault state when the wallet/indexer surface permits it.
Submit through the shared transaction path introduced for Expose permissionless stablecoin poke transactions #328 and return the
same stable
{status,error,transactionId}result shape.Reject fractional, negative, floating-point, malformed, and out-of-range
nonce/amount inputs without submitting.
Acceptance criteria
Instruction::OpenPosition { position_nonce, initial_collateral_amount }.signer/writable/init flags, program ID, and instruction encoding.
wallet nonces.
configured collateral definition, wrong source-holding definition/program,
existing Position/Vault state, missing signer control, transport failure,
transaction rejection, and successful transaction ID mapping.
u64nonce andu128collateral values cross theRust/C++/Logos boundary without precision loss.
collateral_amountencoding remains in the newplanner or public method.
logoscoresmoketests, and
nix build .#stablecoin-modulepass.