Skip to content

Instantly share code, notes, and snippets.

@ambethia
Last active December 10, 2017 20:31
Show Gist options
  • Save ambethia/187771bfc5f135e786532fb947a96c90 to your computer and use it in GitHub Desktop.
Save ambethia/187771bfc5f135e786532fb947a96c90 to your computer and use it in GitHub Desktop.
using Neo.SmartContract.Framework;
using Neo.SmartContract.Framework.Services.Neo;
using Neo.SmartContract.Framework.Services.System;
using System.Numerics;
namespace RandomNumbers
{
public class Contract : SmartContract
{
public static void Main()
{
Header header = Blockchain.GetHeader(Blockchain.GetHeight());
ulong randomNumber = header.ConsensusData;
Runtime.Notify("A random number:", randomNumber);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment