{"id":25081113,"url":"https://github.com/odegnome/cosmwasm-demo","last_synced_at":"2025-04-01T07:59:06.947Z","repository":{"id":170894498,"uuid":"500368760","full_name":"odegnome/cosmwasm-demo","owner":"odegnome","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-17T17:59:42.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T04:42:40.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/odegnome.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-06T09:25:00.000Z","updated_at":"2022-06-06T09:26:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"246f03fa-2aed-478c-af1c-397db446cc5a","html_url":"https://github.com/odegnome/cosmwasm-demo","commit_stats":null,"previous_names":["coder-rg/cosmwasm-demo","odegnome/cosmwasm-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odegnome%2Fcosmwasm-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odegnome%2Fcosmwasm-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odegnome%2Fcosmwasm-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odegnome%2Fcosmwasm-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/odegnome","download_url":"https://codeload.github.com/odegnome/cosmwasm-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246604614,"owners_count":20804100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-07T04:36:41.320Z","updated_at":"2025-04-01T07:59:06.922Z","avatar_url":"https://github.com/odegnome.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cosmwasm demo\n\nDesign of smart contract is as follows:\n\n\u003e A person can upload a contract with some funding requirement(similar to crowdfunding).\n\u003e Anyone can send the money to fulfill this contract.\n\u003e If the tokens are less than the required amount, it fails.\n\u003e Else the money is forwarded to the 'owner'/'recipient'.\n\n\n```sh\n$ source \u003c(curl -sSL https://raw.githubusercontent.com/CosmWasm/testnets/master/malaga-420/defaults.env)\n\n$ wasmd keys add wallet\n\n$ wasmd keys add wallet2\n\n$ JSON=$(jq -n --arg addr $(wasmd keys show -a wallet) '{\"denom\":\"umlg\",\"address\":$addr}') \u0026\u0026 curl -X POST --header \"Content-Type: application/json\" --data \"$JSON\" https://faucet.malaga-420.cosmwasm.com/credit\n\n$ JSON=$(jq -n --arg addr $(wasmd keys show -a wallet2) '{\"denom\":\"umlg\",\"address\":$addr}') \u0026\u0026 curl -X POST --header \"Content-Type: application/json\" --data \"$JSON\" https://faucet.malaga-420.cosmwasm.com/credit\n\n$ export NODE=(--node $RPC)\n$ export TXFLAG=($NODE --chain-id $CHAIN_ID --gas-prices 0.25umlg --gas auto --gas-adjustment 1.3)\n\n$ RES=$(wasmd tx wasm store artifacts/simple-test-case-aarch64.wasm --from wallet $TXFLAG -y --output json -b block)\n\n$ CODE_ID=$(echo $RES | jq -r '.logs[0].events[-1].attributes[0].value')\n\n$ wasmd query wasm list-contract-by-code $CODE_ID $NODE --output json\n\n$ wasmd query wasm code $CODE_ID $NODE download.wasm\n\n$ diff artifacts/cw_nameservice.wasm download.wasm\n\n$ INIT='{\"capital\":100,\"end_height\":266000}'\n\n$ wasmd tx wasm instantiate $CODE_ID \"$INIT\" --from wallet --label \"First contract\" $TXFLAG -y --no-admin\n```\n\u003eError: rpc error: code = InvalidArgument desc = failed to execute message; message index: 0: Error parsing into type simple_test_case::msg::InstantiateMsg: Invalid type: instantiate wasm contract failed: invalid request","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodegnome%2Fcosmwasm-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodegnome%2Fcosmwasm-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodegnome%2Fcosmwasm-demo/lists"}