Skip to content

Commit

Permalink
Merge pull request #3 from GuiGou12358/main
Browse files Browse the repository at this point in the history
Add the method to verify the winning numbers for a raffle
  • Loading branch information
GuiGou12358 authored May 5, 2024
2 parents f55a857 + 0ae4f98 commit d3132ee
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 151 deletions.
2 changes: 1 addition & 1 deletion phat/artifacts/lotto_draw.contract

Large diffs are not rendered by default.

148 changes: 17 additions & 131 deletions phat/artifacts/lotto_draw.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": {
"hash": "0x7034113d0af945c4dda714c7b34a206c45cba7027c0e73bf19425fe1d8a62e61",
"hash": "0x5922ca3cb0603eb045e2f2e9985a783467b3561b840c5f1549ef9cd5870fa08a",
"language": "ink! 4.3.0",
"compiler": "rustc 1.76.0",
"build_info": {
Expand All @@ -15,7 +15,7 @@
},
"contract": {
"name": "lotto_draw",
"version": "0.1.0",
"version": "0.1.1",
"authors": [
"GuiGou"
]
Expand Down Expand Up @@ -50,7 +50,7 @@
"displayName": [
"Balance"
],
"type": 34
"type": 32
},
"blockNumber": {
"displayName": [
Expand All @@ -62,20 +62,20 @@
"displayName": [
"ChainExtension"
],
"type": 37
"type": 35
},
"hash": {
"displayName": [
"Hash"
],
"type": 35
"type": 33
},
"maxEventTopics": 4,
"timestamp": {
"displayName": [
"Timestamp"
],
"type": 36
"type": 34
}
},
"events": [],
Expand Down Expand Up @@ -428,34 +428,6 @@
],
"type": 25
}
}
],
"default": false,
"docs": [
" Simulate and return numbers for the lotto_draw (admin only - for dev purpose)"
],
"label": "get_numbers",
"mutates": false,
"payable": false,
"returnType": {
"displayName": [
"ink",
"MessageResult"
],
"type": 29
},
"selector": "0x6e2df655"
},
{
"args": [
{
"label": "draw_num",
"type": {
"displayName": [
"u32"
],
"type": 23
}
},
{
"label": "numbers",
Expand All @@ -469,19 +441,19 @@
],
"default": false,
"docs": [
" Simulate and return the winners (admin only - for dev purpose)"
" Verify if the winning numbers for a raffle id is valid (admin only)"
],
"label": "get_winners",
"label": "verify_numbers",
"mutates": false,
"payable": false,
"returnType": {
"displayName": [
"ink",
"MessageResult"
],
"type": 31
"type": 29
},
"selector": "0xc51514c9"
"selector": "0x810aabee"
}
]
},
Expand Down Expand Up @@ -1585,7 +1557,7 @@
{
"fields": [
{
"type": 26
"type": 31
}
],
"index": 0,
Expand All @@ -1606,7 +1578,7 @@
"params": [
{
"name": "T",
"type": 26
"type": 31
},
{
"name": "E",
Expand All @@ -1622,106 +1594,20 @@
"id": 31,
"type": {
"def": {
"variant": {
"variants": [
{
"fields": [
{
"type": 32
}
],
"index": 0,
"name": "Ok"
},
{
"fields": [
{
"type": 6
}
],
"index": 1,
"name": "Err"
}
]
}
},
"params": [
{
"name": "T",
"type": 32
},
{
"name": "E",
"type": 6
}
],
"path": [
"Result"
]
}
},
{
"id": 32,
"type": {
"def": {
"variant": {
"variants": [
{
"fields": [
{
"type": 33
}
],
"index": 0,
"name": "Ok"
},
{
"fields": [
{
"type": 13
}
],
"index": 1,
"name": "Err"
}
]
}
},
"params": [
{
"name": "T",
"type": 33
},
{
"name": "E",
"type": 13
}
],
"path": [
"Result"
]
}
},
{
"id": 33,
"type": {
"def": {
"sequence": {
"type": 0
}
"primitive": "bool"
}
}
},
{
"id": 34,
"id": 32,
"type": {
"def": {
"primitive": "u128"
}
}
},
{
"id": 35,
"id": 33,
"type": {
"def": {
"composite": {
Expand All @@ -1741,15 +1627,15 @@
}
},
{
"id": 36,
"id": 34,
"type": {
"def": {
"primitive": "u64"
}
}
},
{
"id": 37,
"id": 35,
"type": {
"def": {
"variant": {}
Expand Down
Binary file modified phat/artifacts/lotto_draw.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion phat/contracts/lotto_draw/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lotto_draw"
version = "0.1.0"
version = "0.1.1"
authors = ["GuiGou"]
edition = "2021"

Expand Down
Loading

0 comments on commit d3132ee

Please sign in to comment.