Hello World ABI Contract
Description
Section titled “Description”Example source from examples/hello-world-abi/contract.algo.ts.
Prerequisites
Section titled “Prerequisites”LocalNet running (algokit localnet start)
Run This Example
Section titled “Run This Example”From the repository’s examples directory:
cd examples
npx tsx hello-world-abi/contract.algo.ts
import { arc4, log } from '@algorandfoundation/algorand-typescript'
abstract class Intermediate extends arc4.Contract {
@arc4.abimethod({ allowActions: ['NoOp'], readonly: true })
public sayBananas(): string {
const result = `Bananas`
log(result)
return result
}
}
export default class HelloWorldContract extends Intermediate {
public sayHello(firstName: string, lastName: string): string {
const result = `Hello ${firstName} ${lastName}`
log(result)
return result
}
}
Other examples
Section titled “Other examples”- ARC4 Simple Voting Contract
- Auction
- Calculator Contract
- Hello World Contract
- Hello World ABI Contract
- Htlc Logicsig Signature
- Local Storage Contract
- Marketplace Contract
- Precompiled Precompiled Apps
- Precompiled Precompiled Factory
- Precompiled Precompiled Typed
- Proof Of Attendance Contract
- Scratch Storage Contract
- Simple Voting
- Tealscript Example
- Tealscript Teal Script Base
- Voting Contract
- ZK Whitelist