Skip to content

Commit

Permalink
Merge pull request #1 from pixelwizardsnft/codegen
Browse files Browse the repository at this point in the history
Codegen & key fixes
  • Loading branch information
josefleventon committed Mar 14, 2023
2 parents dd4b72e + e650c37 commit 8765fdc
Show file tree
Hide file tree
Showing 17 changed files with 4,479 additions and 236 deletions.
2 changes: 1 addition & 1 deletion artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1245c1db9f48da8260b6bdfa06d631abf59298d56368a9dcfbfdb9a91a4fc455 cw_wager-aarch64.wasm
bd11b728beb2161eae1709e8b2cd4ff74ea59cd37480ecf7dbe3a4c65cc8010f cw_wager-aarch64.wasm
2 changes: 1 addition & 1 deletion artifacts/checksums_intermediate.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6d46e77f98460d9011e06707a21e7d456ec700ed146e7a034eba40a1961f6421 ./target/wasm32-unknown-unknown/release/cw_wager.wasm
d1aef6e110063c00be3800d3c4227e3be93e027789e123acd46ffeb7b72decaf ./target/wasm32-unknown-unknown/release/cw_wager.wasm
Binary file modified artifacts/cw_wager-aarch64.wasm
Binary file not shown.
242 changes: 129 additions & 113 deletions schema/cw-wager.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,37 @@
"set_winner": {
"type": "object",
"required": [
"wager_key",
"winner"
"current_prices",
"prev_prices",
"wager_key"
],
"properties": {
"current_prices": {
"type": "array",
"items": [
{
"$ref": "#/definitions/Decimal"
},
{
"$ref": "#/definitions/Decimal"
}
],
"maxItems": 2,
"minItems": 2
},
"prev_prices": {
"type": "array",
"items": [
{
"$ref": "#/definitions/Decimal"
},
{
"$ref": "#/definitions/Decimal"
}
],
"maxItems": 2,
"minItems": 2
},
"wager_key": {
"type": "array",
"items": [
Expand Down Expand Up @@ -142,21 +169,6 @@
],
"maxItems": 2,
"minItems": 2
},
"winner": {
"type": "array",
"items": [
{
"$ref": "#/definitions/Addr"
},
{
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
],
"maxItems": 2,
"minItems": 2
}
},
"additionalProperties": false
Expand Down Expand Up @@ -257,32 +269,36 @@
"Currency": {
"type": "string",
"enum": [
"d_o_t",
"a_v_a_x",
"u_n_i",
"a_t_o_m",
"l_i_n_k",
"n_e_a_r",
"i_c_p",
"s_a_n_d",
"b_t_c",
"e_t_h",
"b_n_b",
"x_r_p",
"a_d_a",
"d_o_g_e",
"s_o_l",
"m_a_n_a",
"c_a_k_e",
"a_r",
"o_s_m_o",
"r_u_n_e",
"l_u_n_a",
"u_s_t_c",
"s_t_a_r_s",
"m_i_r"
"dot",
"avax",
"uni",
"atom",
"link",
"near",
"icp",
"sand",
"btc",
"eth",
"bnb",
"xrp",
"ada",
"doge",
"sol",
"mana",
"cake",
"ar",
"osmo",
"rune",
"luna",
"ustc",
"stars",
"mir"
]
},
"Decimal": {
"description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)",
"type": "string"
},
"ParamInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -567,30 +583,30 @@
"Currency": {
"type": "string",
"enum": [
"d_o_t",
"a_v_a_x",
"u_n_i",
"a_t_o_m",
"l_i_n_k",
"n_e_a_r",
"i_c_p",
"s_a_n_d",
"b_t_c",
"e_t_h",
"b_n_b",
"x_r_p",
"a_d_a",
"d_o_g_e",
"s_o_l",
"m_a_n_a",
"c_a_k_e",
"a_r",
"o_s_m_o",
"r_u_n_e",
"l_u_n_a",
"u_s_t_c",
"s_t_a_r_s",
"m_i_r"
"dot",
"avax",
"uni",
"atom",
"link",
"near",
"icp",
"sand",
"btc",
"eth",
"bnb",
"xrp",
"ada",
"doge",
"sol",
"mana",
"cake",
"ar",
"osmo",
"rune",
"luna",
"ustc",
"stars",
"mir"
]
},
"MatchmakingItemExport": {
Expand Down Expand Up @@ -767,30 +783,30 @@
"Currency": {
"type": "string",
"enum": [
"d_o_t",
"a_v_a_x",
"u_n_i",
"a_t_o_m",
"l_i_n_k",
"n_e_a_r",
"i_c_p",
"s_a_n_d",
"b_t_c",
"e_t_h",
"b_n_b",
"x_r_p",
"a_d_a",
"d_o_g_e",
"s_o_l",
"m_a_n_a",
"c_a_k_e",
"a_r",
"o_s_m_o",
"r_u_n_e",
"l_u_n_a",
"u_s_t_c",
"s_t_a_r_s",
"m_i_r"
"dot",
"avax",
"uni",
"atom",
"link",
"near",
"icp",
"sand",
"btc",
"eth",
"bnb",
"xrp",
"ada",
"doge",
"sol",
"mana",
"cake",
"ar",
"osmo",
"rune",
"luna",
"ustc",
"stars",
"mir"
]
},
"NFT": {
Expand Down Expand Up @@ -899,30 +915,30 @@
"Currency": {
"type": "string",
"enum": [
"d_o_t",
"a_v_a_x",
"u_n_i",
"a_t_o_m",
"l_i_n_k",
"n_e_a_r",
"i_c_p",
"s_a_n_d",
"b_t_c",
"e_t_h",
"b_n_b",
"x_r_p",
"a_d_a",
"d_o_g_e",
"s_o_l",
"m_a_n_a",
"c_a_k_e",
"a_r",
"o_s_m_o",
"r_u_n_e",
"l_u_n_a",
"u_s_t_c",
"s_t_a_r_s",
"m_i_r"
"dot",
"avax",
"uni",
"atom",
"link",
"near",
"icp",
"sand",
"btc",
"eth",
"bnb",
"xrp",
"ada",
"doge",
"sol",
"mana",
"cake",
"ar",
"osmo",
"rune",
"luna",
"ustc",
"stars",
"mir"
]
},
"NFT": {
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy_testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo "\nConnected to wallet '$KEY_NAME'<$KEY_TYPE> @ $KEY_ADDRESS";
echo "\n========\n";

# Instantiate message config
export INSTANTIATE_MSG="{\"max_currencies\": 3, \"amounts\": [\"100000000\", \"250000000\", \"500000000\"], \"expiries\": [600, 900, 1800], \"fee_bps\": 400, \"fairburn_bps\": 100, \"fee_address\": \"$KEY_ADDRESS\", \"collection_address\": \"stars1eljycn4sljw0da0yfqtpcfprqhrq3j27d7vwfe5spmeytls7lh8s2upw90\", \"matchmaking_expiry\": 900}";
export INSTANTIATE_MSG="{\"max_currencies\": 3, \"amounts\": [\"100000000\", \"250000000\", \"500000000\"], \"expiries\": [600, 900, 1800], \"fee_bps\": 400, \"fairburn_bps\": 100, \"fee_address\": \"$KEY_ADDRESS\", \"collection_address\": \"stars1xsag8jwxfp2crgulytm9kew9fjxafft9rxu6pz2m4w7eu74rcmjs88mmcy\", \"matchmaking_expiry\": 900}";
# echo $INSTANTIATE_MSG;

## INIT ##
Expand Down Expand Up @@ -76,4 +76,4 @@ echo "\n========\n";
echo "Fetching contract address...";
sleep 6;
export CONTRACT=$(starsd query wasm list-contract-by-code $CODE_ID --output json | jq -r '.contracts[-1]');
echo "Contract address: $fg_bold[green]$CONTRACT";
echo "Contract address: $fg_bold$CONTRACT";
Loading

0 comments on commit 8765fdc

Please sign in to comment.