Odak modu
Practice
This is the second part of the practice that we have done before. You can either work on your practice I repo or clone it again. Working with your previous repo is a better idea to understand changes.
In this part, you need to change the smart contract while using a predecessor. After that, please build and deploy your smart contract and share with us your GitHub link which includes Task 4.
cd starter--near-sdk-as
In src/simple/assembly/index.ts
export function helloWorld(names: Array<string>): string {
return names.map<string>(name => 'hello ' + name).join(`\n`)
}
Change to,
export function helloWorld(): string {
const predecessor = Context.predecessor
return 'hello ' + predecessor
}
yarn build:release
near dev-deploy ./build/release/simple.wasm
near call $CONTRACT helloWorld --accountId <YOUR_ACCOUNT>.testnet
Output,
hello <YOUR_ACCOUNT>.testnet
At this point, upload your repo to GitHub, and please share your new repo link with us.
Congrats! You have a smart contract on web3!
Sektörde en çok aranan yazılım becerilerini kazan
Yapay zeka desteği, birebir mentörlük saatleri, canlı dersler ve senin için özel hazırlanmış içeriklerle eksiklerini tamamla, düzenli geri bildirimler al ve öğrenme sürecini en verimli hale getir.
Yunus Emre Kabakcı
Patika+ mezunuPatika+ Fullstack Web Development Bootcamp mezunumuz Yunus Emre,
3 ay içinde Katar’dan aldığı teklif ile, global bir şirket olan Pavo Group’da işe başladı!
“İçerik zenginliği, mentor desteği, ileriye dönük bir network sağlaması ve dünyada en çok tercih edilen frameworkler üzerinden bir eğitim veriyor olması Patika+’ı tercih etmemin temel sebepleri oldu!“
Yorum yapabilmek için derse kayıt olmalısın!