the contract to store and give data about the scores users have accomplished in the game repository
change in Forc.toml under entry
v1: Current HighScore Only: high_score.sw & a_player.sw
v2: Full all games for user: race_board.sw & ...
- work, test and do your thing on the develop branch !
git clone
, use ssh if you don't have account password (for Bitbucket)fuelup --version
should give you a verison- use cargo for testing
forc build
to build contracts for testing
- Read and use forc wallet
- check that you have at least 1 address.
forc-wallet accounts
- if not create using
forc-wallet new
- first time ever? please install
cargo install cargo-generate
(a tool for testing) - no test file in project? make one with:
cargo generate --init fuellabs/sway templates/sway-test-rs --name game-score-contracts
- write your tests in /tests/harness.rs
cargo test
to run test script(s) (make sure to useforc build
to have latest changes from smart contract before running tests). For displayingprintln!("{:?}", obj);
run:cargo test -- --nocapture
- first get some free gas money Faucet test tokens
- build contracts via
forc build
- deploy using
forc deploy --testnet
and follow prompt