stx_deployContract
Usage
import { request } from '@stacks/connect';
const result = await request('stx_deployContract', {
name: 'my-contract',
clarityCode: `
(define-public (say-hello)
(ok "hello world"))
`,
clarityVersion: 3,
network: 'mainnet',
});
console.log('Transaction ID:', result.txid);Notes
Signature
Returns
Property
Type
Description
Parameters
name (required)
clarityCode (required)
clarityVersion (optional)
address (optional)
network (optional)
fee (optional)
nonce (optional)
sponsored (optional)
postConditions (optional)
postConditionMode (optional)
Last updated
Was this helpful?