Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Developing Smart Contracts from Scratch with LINE Blockchain

Developing Smart Contracts from Scratch with LINE Blockchain

Shiki Takahashi (LINE / Blockchain Engineering Team / Software Engineer)

https://tech-verse.me/ja/sessions/76
https://tech-verse.me/en/sessions/76
https://tech-verse.me/ko/sessions/76

Tech-Verse2022

November 17, 2022
Tweet

More Decks by Tech-Verse2022

Other Decks in Technology

Transcript

  1. Agenda - Road to smart contract - How to develop

    smart contract - Let’s start first contract - Summary
  2. Road to smart contract Gas fee Wallet Crypto currency What

    problems do you face when developing services on the blockchain?
  3. Road to smart contract Gas fee Wallet Crypto currency You

    can use LINE Blockchain to reach 1 million* wallet with your services *The number of wallets includes wallets that received NFT grants through the NFT Free Distribution Campaign and LINK Rewards.
  4. Can Mint Burn Transfer...etc Basic operations related to tokens Cannot

    Escrow Auction...etc Application-specific business logic for that token Road to smart contract What LINE Blockchain Developers(LBD) can and cannot do
  5. Road to smart contract We will be release a smart

    contract feature to implement business logic on-chain. Smart contract VM Deploy Call Blockchain Developer Development Code Users Related session ”How to Find Bugs in CosmWasm Smart Contract?”
  6. Road to smart contract Only LINE Blockchain Developers(LBD) Use Smart

    contract LINE Blockchain Mainnet LBD (Token) Application (Business logic) Users Business logic Token Users
  7. Generate template How to develop smart contract cargo generate --git

    https://github.com/CosmWasm/cw-template.git --name <project name> init project
  8. Define message How to develop smart contract Instantiate Query Execute

    Initialize smart contract Get data from smart contract Run contract with smart contract msg.rs
  9. Define state How to develop smart contract Define the information

    you want to store in the smart contract in state.rs state.rs
  10. Implement contract logic How to develop smart contract Now Let’s

    write the code that handles the business logic!
  11. Submessages / Reply How to develop smart contract Retrieve and

    use the results of the processing of the contract to which you are calling
  12. How to develop smart contract How to use ”Dynamic Link”

    to call other smart contract Related session ” Dynamic Link: Smart Contract Interaction Method Developed by LINE”
  13. Let’s start first contract You want to create an NFT

    auction service Seller Bidder Auction NFT ① Mint ② Listing ③ Bid ④ Withdraw https://github.com/shiki-tak/line-blockchain-auction
  14. Summary › Add smart contract functionality to LINE Blockchain to

    allow business logic to be implemented on-chain. › Our smart contract can be developed without using any unique technology. › Contract is implemented in a message-driven format. › In the case of call another contract, it will be possible to implement it like any other platform contract.
  15. Summary › Add smart contract functionality to LINE Blockchain to

    allow business logic to be implemented on-chain. › Our smart contract can be developed without using any unique technology. › Contract is implemented in a message-driven format. › In the case of call another contract, it will be possible to implement it like any other platform contract.
  16. Summary › Add smart contract functionality to LINE Blockchain to

    allow business logic to be implemented on-chain. › Our smart contract can be developed without using any unique technology. › Contract is implemented in a message-driven format. › In the case of call another contract, it will be possible to implement it like any other platform contract.