Hackathon
The storage operation on blockchain just like operation on Relational Database
curl --proto '=https' --tlsv1.2 -sSf \ https://sh.rustup.rs | sh
setup rust defualt nightly-2021-11-27 rustup default nightly-2021-11-27
cargo install cargo-sewup
cargo sewup init --mode=auto
features = [ "rdb" ]
All lower case
(CRUD handlers)
All upper case (Functional sig)
#[Table] Instance { field: usize }
InstanceWrapper { id: usize, field: Option<usize> }
add id filed
Help the struct become a record
#[Table] Instance { field: usize }
instance::Protocol { select_fields: Option<HashSet<String>>, filter: bool, records: Vec<Wrapper> }
use for communicate with handler
Handler
Table on Chain
Protocol: return multiple records
Wrapper: a unique record for storage
let p = instance::protocol(i);
#[Table] Instance { field: usize }
Transfer object to protocol
let i = Instance { field: 1}
let mut expected = p .clone()
expected.set_id(1);
Transfer object to protocol
Database Backup Icons (PSD & PNG) from tw.365psd.com
The expected behavior is that only the owner can modify the todotask.
There are also help want issues and good first issues