postech-dao / cosmos Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
cosmos-colony-chain
라는 이름의 crate를 만듭니다ColonyChain
의 더미 구현체를 만듭니다. (e.g., https://github.com/postech-dao/beacon-chain/blob/main/explorer/src/dummy.rs)ColonyChain
의 구현체는 자동으로 웹서비스로 디플로이할 수 있는데, 항상 이 서비스들을 개발 사이클 내내 유지할 수 있다는 점에서 도움이 됩니다.As described here, a wasm file should be optimized before uploading a contract on the chain. However, the optimization does not work and the expected source of error is the current directory structure. The below result is obtained when the simple-counter project is separately located.
~/Desktop/repos/simple-counter/ [main] docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer-arm64:0.12.6
Info: RUSTC_WRAPPER=sccache
Info: sccache stats before build
Compile requests 0
Compile requests executed 0
Cache hits 0
Cache misses 0
Cache timeouts 0
Cache read errors 0
Forced recaches 0
Cache write errors 0
Compilation failures 0
Cache errors 0
Non-cacheable compilations 0
Non-cacheable calls 0
Non-compilation calls 0
Unsupported compiler calls 0
Average cache write 0.000 s
Average cache read miss 0.000 s
Average cache read hit 0.000 s
Failed distributed compilations 0
Cache location Local disk: "/root/.cache/sccache"
Cache size 0 bytes
Max cache size 10 GiB
Building contract in /code ...
Finished release [optimized] target(s) in 0.14s
Creating intermediate hash for simple_counter-aarch64.wasm ...
4d183fc461c608f5cc8dbf4bd76c49d10157d3cbb8f4548880877dcdf23c669c ./target/wasm32-unknown-unknown/release/simple_counter.wasm
Optimizing simple_counter-aarch64.wasm ...
Creating hashes ...
47f2c9e5f984071f893b74eedac1b3f7b267180afc7956c4d5a33a6e35d1a398 simple_counter-aarch64.wasm
Info: sccache stats after build
Compile requests 0
Compile requests executed 0
Cache hits 0
Cache misses 0
Cache timeouts 0
Cache read errors 0
Forced recaches 0
Cache write errors 0
Compilation failures 0
Cache errors 0
Non-cacheable compilations 0
Non-cacheable calls 0
Non-compilation calls 0
Unsupported compiler calls 0
Average cache write 0.000 s
Average cache read miss 0.000 s
Average cache read hit 0.000 s
Failed distributed compilations 0
Cache location Local disk: "/root/.cache/sccache"
Cache size 0 bytes
Max cache size 10 GiB
done
The below result is obtained when I run the same command in the current repository.
At simple-counter directory,
~/Desktop/repos/cosmos/simple-counter/ [main*] docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer-arm64:0.12.6
Info: RUSTC_WRAPPER=sccache
Info: sccache stats before build
Compile requests 0
Compile requests executed 0
Cache hits 0
Cache misses 0
Cache timeouts 0
Cache read errors 0
Forced recaches 0
Cache write errors 0
Compilation failures 0
Cache errors 0
Non-cacheable compilations 0
Non-cacheable calls 0
Non-compilation calls 0
Unsupported compiler calls 0
Average cache write 0.000 s
Average cache read miss 0.000 s
Average cache read hit 0.000 s
Failed distributed compilations 0
Cache location Local disk: "/root/.cache/sccache"
Cache size 0 bytes
Max cache size 10 GiB
Building contract in /code ...
Updating crates.io index
error: the lock file /code/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.
The command does not work at the root directory either. I tested it on mac M1.
We need a survey.
We should write unit tests for the current functionalities of the simple-counter implementations. The objective of this issue is to make sure that all members read the code and understand it. We are encouraged to be more familiar with building and testing Rust code by doing this.
Progress
The light client should be able to interact with other contracts such as treasury.
#1 참고
For now, you can build the simple-counter wasm binary with cargo wasm
command in the simple-counter directory. This can be added to CI.
#1 참고
디스코드 웹훅 테스트 ㅎㅎ
balhblahbalhb
As you can see here, there are two kinds of queries are defined. We should be able to send this query message to an instantiated simple-counter contract on the testnet with Rust code.
CosmWasm이 integration test 프레임워크를 지원하는지 확인하고,
만약 한다면 simple-counter에 대해 짭시다.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.