Browse Source

docs: opts > options

feat/stacks-js-updates
Alexander Graebe 5 years ago
parent
commit
1b83f045ee
  1. 8
      src/pages/smart-contracts/signing-transactions.md

8
src/pages/smart-contracts/signing-transactions.md

@ -34,7 +34,7 @@ import { openContractCall } from '@blockstack/connect';
// Here's an example of options: // Here's an example of options:
const myStatus = 'hey there'; const myStatus = 'hey there';
const opts = { const options = {
contractAddress: 'ST22T6ZS7HVWEMZHHFK77H4GTNDTWNPQAX8WZAKHJ', contractAddress: 'ST22T6ZS7HVWEMZHHFK77H4GTNDTWNPQAX8WZAKHJ',
contractName: 'status', contractName: 'status',
functionName: 'write-status!', functionName: 'write-status!',
@ -55,7 +55,7 @@ const opts = {
}, },
}; };
await openContractCall(opts); await openContractCall(options);
``` ```
There are some required parameters needed when calling `openContractCall`. Here is the exact interface which describes what options you have: There are some required parameters needed when calling `openContractCall`. Here is the exact interface which describes what options you have:
@ -222,10 +222,10 @@ const MyComponent = () => {
const { doContractCall } = useConnect(); const { doContractCall } = useConnect();
const onClick = async () => { const onClick = async () => {
const opts = { const options = {
/** See examples above */ /** See examples above */
}; };
await doContractCall(opts); await doContractCall(options);
}; };
return <span onClick={onClick}>Call my contract</span>; return <span onClick={onClick}>Call my contract</span>;

Loading…
Cancel
Save