Giter Site home page Giter Site logo

near-votingcontracts's Introduction

Near-VotingContracts

https://learnnear.club/near-live-contract-review-part-1-voting-contracts/#Structural_Overview

Do dung lượng file lớn nên để thuận tiện em đã up source code lên Drive: https://drive.google.com/drive/folders/11-EaOsojm3jMm0GAVTc7hTPfZYcsAEQ-?usp=sharing

Tổng kết kiến thức đạt được:

  • Biết xài VMWARE để giả lập ubuntu trên Win10 và cài đặt các công cụ cần thiết
  • Biết xuất ra file .wasm và deploy thành công, gọi được các hàm method của smart contract và đọc hiểu
  • Tuy không có thay đổi và sửa code nhưng đã hiểu được basic của contract và quản lí cũng như truy cập được nó

Hướng dẫn:

https://brson.github.io/2020/09/07/near-smart-contracts-rust -> LINK huong dan build ra file .wasm. Sau khi them file package.json va viet code

{

"name": "my-package",

"scripts": {

    "build": "cargo build --target wasm32-unknown-unknown --release",
    
    "postbuild": "cp target/wasm32-unknown-unknown/release/voting_contract.wasm ./res/",
    
    "test": "asp"
    
},

"devDependencies": {

    "near-sdk-as": "^3.2.3"
    
}

}

-> Va chay lenh 'npm run build' thi se xuat ra file .wasm o thu muc res ( If error thi chay lenh 'rustup target add wasm32-unknown-unknown' truoc) Sau do ta chi can chay lenh 'near deploy vietvuive.testnet voting_contract.wasm' la oke ( truoc het phai near login va 'cd res' noi chua file .wasm)

Bạn cần liện hệ hay giúp đỡ:

FB: https://www.facebook.com/viethappy/

Email: [email protected]

near-votingcontracts's People

Contributors

19522515 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.