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
pub contract Entity { | |
pub let CollectionStoragePath: StoragePath | |
pub let CollectionPublicPath: PublicPath | |
pub event ElementGenerateSuccess(hex: String) | |
pub event ElementGenerateFailure(hex: String) | |
pub struct MetaFeature { | |
pub let bytes: [UInt8] | |
pub let raw: String? |
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: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
contract ICrowdFund { | |
struct Campaign { | |
address payable reciver; | |
uint numFunders; | |
uint fundAmountGoal; | |
uint totalAmount; |
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
import Principal "mo:base/Principal"; | |
import List "mo:base/List"; | |
import Array "mo:base/Array"; | |
import Int "mo:base/Int"; | |
import Iter "mo:base/Iter"; | |
import Time "mo:base/Time"; | |
shared (install) actor class TweetBox() = this { | |
type Message = { | |
content: Text; |
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
import Time "mo:base/Time"; | |
module Types { | |
public type Message = { | |
content: Text; | |
time: Time.Time; | |
}; | |
}; |
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
import Principal "mo:base/Principal"; | |
import List "mo:base/List"; | |
import Array "mo:base/Array"; | |
import Int "mo:base/Int"; | |
import Iter "mo:base/Iter"; | |
import Time "mo:base/Time"; | |
import Types "Types"; | |
shared({caller}) actor class Microblog( _owner : Principal ) { | |
type Message = Types.Message; |
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
pragma solidity>=0.4.24 <0.6.11; | |
pragma experimental ABIEncoderV2; | |
import "./Table.sol"; | |
contract TableTest { | |
event CreateResult(int256 count); | |
event InsertResult(int256 count); | |
event UpdateResult(int256 count); | |
event RemoveResult(int256 count); |
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
#include "userlist.hpp" | |
void userlist::add(std::string username, uint64_t age) { | |
userlist::user_index user_stable(_self, _code.value); | |
user_stable.emplace(_self, [&]( auto& s ) { | |
s.id = user_stable.available_primary_key(); | |
s.username = username; | |
s.age = age; | |
}); |
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
#include "userlist.hpp" | |
void userlist::add(std::string username, uint64_t age) { | |
userlist::user_index user_stable(_self, _code.value); | |
user_stable.emplace(_self, [&]( auto& s ) { | |
s.id = user_stable.available_primary_key(); | |
s.username = username; | |
s.age = age; | |
}); |
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
import Text "mo:base/Text"; | |
import Nat "mo:base/Nat"; | |
import Blob "mo:base/Blob"; | |
actor Counter { | |
stable var currentVal : Nat = 0; | |
public func increment() : async () { | |
currentVal += 1; | |
}; |
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
import com.buaa.blockchain.sdk.ChainSDK; | |
import com.buaa.blockchain.sdk.config.CryptoType; | |
import com.buaa.blockchain.sdk.model.Transaction; | |
import com.buaa.blockchain.sdk.util.HttpClientResult; | |
import com.google.common.base.Splitter; | |
import com.google.common.collect.Lists; | |
import org.junit.Assert; | |
import org.junit.Before; | |
import org.junit.Test; |
NewerOlder