Skip to content

Commit 4fd3974

Browse files
authored
Merge pull request #51 from algorandfoundation/refactor/docs
refactor: further simplify sample contact in readme
2 parents ded0b45 + 453207b commit 4fd3974

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ beforeAll(() => {
8282
import { arc4, assert, Bytes, GlobalState, gtxn, LocalState, op, Txn, uint64, Uint64 } from '@algorandfoundation/algorand-typescript'
8383

8484
export default class VotingContract extends arc4.Contract {
85-
topic = GlobalState({ initialValue: Bytes('default_topic'), key: Bytes('topic') })
85+
topic = GlobalState({ initialValue: 'default_topic', key: Bytes('topic') })
8686
votes = GlobalState({ initialValue: Uint64(0), key: Bytes('votes') })
8787
voted = LocalState<uint64>({ key: Bytes('voted') })
8888

8989
@arc4.abimethod()
9090
public setTopic(topic: string): void {
91-
this.topic.value = Bytes(topic)
91+
this.topic.value = topic
9292
}
9393
@arc4.abimethod()
9494
public vote(pay: gtxn.PaymentTxn): boolean {

0 commit comments

Comments
 (0)