Contracts: remove the stale contract_setup RPC stubs and tidy the README

The separate contract_setup API was dropped in favor of contract_new/contract_sign.
Remove the two commented-out contract_setup stubs left in the owner RPC trait and
impl, and drop the README action-list items they (and earlier fixes) resolved: the
'remove setup API/CLI' item, the make_outputs-nanogrins item (now done), and the
move-test-utilities item (the per-scenario contract_*.rs tests already cover it).

Addresses PR #754 review (owner_rpc.rs, README.md).
This commit is contained in:
jwinterm
2026-06-10 17:55:56 -04:00
parent 2106c08625
commit 178deac700
2 changed files with 0 additions and 29 deletions
-26
View File
@@ -524,16 +524,6 @@ pub trait OwnerRpc {
*/
fn init_send_tx(&self, token: Token, args: InitTxArgs) -> Result<VersionedSlate, Error>;
/**
TODO: Implement
*/
// fn contract_setup(
// &self,
// token: Token,
// slate: VersionedSlate,
// args: ContractSetupArgsAPI,
// ) -> Result<VersionedSlate, Error>;
/**
TODO: Full docs once API has stabilised
*/
@@ -2169,22 +2159,6 @@ where
VersionedSlate::into_version(slate, version)
}
// fn contract_setup(
// &self,
// token: Token,
// in_slate: VersionedSlate,
// args: ContractSetupArgsAPI,
// ) -> Result<VersionedSlate, Error> {
// let slate = Owner::contract_setup(
// self,
// (&token.keychain_mask).as_ref(),
// &Slate::from(in_slate),
// &args,
// )?;
// let version = SlateVersion::V4;
// VersionedSlate::into_version(slate, version)
// }
fn contract_sign(
&self,
token: Token,
-3
View File
@@ -33,7 +33,6 @@ Separating side effects until the 'save_step' part would make these functions mu
#### TODOs
- for payjoins, instead of doing Some("any"), find an actual input and put the actual commitment in --use-inputs (only do that if none is added). Think about how to do that in a way that would be nice also for the API. Maybe the API should just take "any" which gets transformed into one of the random inputs. Maybe the "any" is ok. It seems to work fine, might be better if we selected the input though.
- make_outputs api should receive nanogrins rather than grin. We have to make the conversion before calling the API
- sometimes the slatepack outputs with a \n for some reason which makes pasting it register \n as the end of paste and crashes?
- remove casting decimals, we should accept value in nanogrins (including --make-outputs option), never as 0.1 Grin through the interface. Casting should be left to the gui wallet logic
- separate side-effects out from the main computations
@@ -54,8 +53,6 @@ Separating side effects until the 'save_step' part would make these functions mu
- what happens if you call contract sign on some slate that was not initiated as a contract slate and has different context values?
- make sure you handle all the flows with coinbase outputs as well
- check if they can trick you by providing a slate with different inputs/outputs that are yours
- remove 'setup' API/CLI
- move the contract test utilities to a separate contract_utilities file instead of having it in 'common/mod.rs'
- we have --add-outputs, but we should also lock if we use the --use-inputs param
- check if contract_accounts_switch.rs is a legit scenario. It might need to return an error if the wallet is trying to sign with a different account