---
title: "write"
description: "Sends a transaction to a contract method that modifies the state"
source: https://docs.genlayer.com/api-references/genlayer-cli/contracts/write
last_updated: 2026-03-27
---

# write

Sends a transaction to a contract method that modifies the state

### Usage

`$ genlayer write [options] <contractAddress> <method>`

### Arguments

- `<contractAddress>`
- `<method>`

### Options

| Short | Long | Description | Required | Default |
| --- | --- | --- | :---: | --- |
|  | --rpc &lt;rpcUrl&gt; | RPC URL for the network | No |  |
| -h | --help | display help for command | No |  |
