-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from hideyour-cash/HYC-49-wl
Hyc 49 wl
- Loading branch information
Showing
9 changed files
with
480 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,5 @@ | ||
<img src="https://avatars.githubusercontent.com/u/104990779?s=200&v=4"> | ||
# Requirements | ||
|
||
# NEAR Hackachain Monorepo | ||
# Setup | ||
|
||
This is how a real application structure should look like for near projects using react and rust smart contracts | ||
|
||
## Contents | ||
|
||
Here inside this project we have configured | ||
|
||
- Github Actions | ||
- Commitlint | ||
- ESLint | ||
- EditorConfig | ||
- Prettier | ||
- Typescript | ||
- React Vite Web App + Tailwind + Zustand + Near | ||
- Smart Contract Written in Rust + Rust Tests + Lib Contract Integration Tests | ||
|
||
## Contributing | ||
|
||
To Contribute fork this repo and send us a pull request following the patterns! | ||
# Deployment |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use near_bigint::U256; | ||
use near_sdk::json_types::{Base58CryptoHash, U128, U64}; | ||
use near_sdk::serde_json::json; | ||
use near_sdk::{log, AccountId}; | ||
|
||
const STANDARD_NAME: &str = "hyde_your_cash"; | ||
const STANDARD_VERSION: &str = "1.0.0"; | ||
|
||
fn log_basic_event_format(standard: &str, version: &str, event_type: &str, data_vec: Vec<&str>) { | ||
log!( | ||
"EVENT_JSON:{}", | ||
&json!({ | ||
"standard": standard, | ||
"version": version, | ||
"event": event_type, | ||
"data": data_vec | ||
}) | ||
.to_string() | ||
) | ||
} | ||
/// New account was added to whitelist | ||
pub fn event_new_white_list(index: U64, value: U256) { | ||
let event_type = "new_white_list"; | ||
let event_data = &json!({ | ||
"index": index, | ||
"value": value, | ||
}) | ||
.to_string(); | ||
log_basic_event_format( | ||
STANDARD_NAME, | ||
STANDARD_VERSION, | ||
event_type, | ||
vec![event_data], | ||
); | ||
} |
Oops, something went wrong.