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
use near_sdk::collections::UnorderedMap; | |
use near_sdk::near_bindgen; | |
use near_sdk::{ | |
borsh::{self, BorshDeserialize, BorshSerialize}, | |
AccountId, BorshStorageKey}; | |
use near_sdk::log; | |
// 1 Ⓝ in yoctoNEAR | |
// const PRIZE_AMOUNT: u128 = 5_000_000_000_000_000_000_000_000; | |
const NANOSECONDS: u64 = 1_000_000_000; |
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
use near_sdk::collections::UnorderedMap; | |
use near_sdk::near_bindgen; | |
use near_sdk::{ | |
borsh::{self, BorshDeserialize, BorshSerialize}, | |
AccountId, PanicOnDefault}; | |
use near_sdk::log; | |
// 1 Ⓝ in yoctoNEAR | |
// const PRIZE_AMOUNT: u128 = 5_000_000_000_000_000_000_000_000; |
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
use near_sdk::collections::UnorderedMap; | |
use near_sdk::near_bindgen; | |
use near_sdk::{ | |
borsh::{self, BorshDeserialize, BorshSerialize}, | |
AccountId, PanicOnDefault}; | |
use near_sdk::log; | |
// 1 Ⓝ in yoctoNEAR | |
// const PRIZE_AMOUNT: u128 = 5_000_000_000_000_000_000_000_000; |
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
//SPDX-License-Identifier: Unlicense | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/utils/math/SafeMath.sol"; | |
import "@openzeppelin/contracts/utils/Address.sol"; | |
contract Donate { | |
using SafeMath for uint256; | |
address public owner; | |
mapping(address => uint256) public listDonations; |