コード例 #1
0
        private static bool CheckCommittee()
        {
            ECPoint[] committees            = NEO.GetCommittee();
            UInt160   committeeMultiSigAddr = Contract.CreateMultisigAccount(committees.Length - (committees.Length - 1) / 2, committees);

            return(Runtime.CheckWitness(committeeMultiSigAddr));
        }
コード例 #2
0
        //[{"type":"Hash160","value":"0xf621168b1fce3a89c33a5f6bcf7e774b4657031c"},{"type":"PublicKey","value":"0222d8515184c7d62ffa99b829aeb4938c4704ecb0dd7e340e842e9df121826343"}]
        public static void NeoCall(UInt160 account, ECPoint publicKey)
        {
            OnNotify(NEO.Name);

            OnNotify(NEO.Symbol);

            OnNotify(NEO.Decimals);

            OnNotify(NEO.TotalSupply());

            OnNotify(NEO.BalanceOf(account));

            OnNotify(NEO.UnclaimedGas(account, Blockchain.GetHeight()));

            OnNotify(NEO.GetCandidates());

            OnNotify(NEO.GetCommittee());

            OnNotify(NEO.GetNextBlockValidators());

            OnNotify(NEO.RegisterCandidate(publicKey));

            OnNotify(NEO.UnregisterCandidate(publicKey));

            OnNotify(NEO.Vote(account, publicKey));

            OnNotify(NEO.Transfer((UInt160)account, Owner, 1000));

            OnNotify(NEO.GetGasPerBlock());

            OnNotify(NEO.SetGasPerBlock(300000000));

            OnNotify(NEO.GetGasPerBlock());
        }