# The Confusion of Smart Contracts

**URL:** https://forum.algorand.co/t/the-confusion-of-smart-contracts/3646
**Category:** Uncategorized
**Created:** [June 30, 2021, 2:48pm UTC](https://forum.algorand.co/t/the-confusion-of-smart-contracts/3646 "2021-06-30T14:48:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![michaelfighting](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@michaelfighting](https://forum.algorand.co/u/michaelfighting)
#### Post date: [June 30, 2021, 2:48pm UTC](https://forum.algorand.co/t/the-confusion-of-smart-contracts/3646/1 "2021-06-30T14:48:25Z")

</div>

Dear guy  
Can a smart contract write data only by using the app\_global\_put opcode in the contract? Like this  
byte “6”  
byte “00:00:00:00:00:04 1 1 1”  
app\_global\_put  
Can I write the data via sdk?  
If the function to read in data is readGlobalState, what is the function to write data in sdk

---

<div class="post-metadata">

### Author: ![JasonW](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@JasonW](https://forum.algorand.co/u/JasonW)
#### Post date: [June 30, 2021, 3:20pm UTC](https://forum.algorand.co/t/the-confusion-of-smart-contracts/3646/2 "2021-06-30T15:20:06Z")

</div>

Only stateful smart contracts can write state. The sdks do support calling stateful contracts and you can also add up to 1kb note to any transaction using the sdks.
