Skip to content

Instantly share code, notes, and snippets.

#include <eosiolib/eosio.hpp>
using namespace eosio;
class [[eosio::contract]] victorytoken : public eosio::contract {
public:
victorytoken(name receiver, name code, datastream<const char*> ds): contract(receiver, code, ds) {}
[[eosio::action]] void addbid(name user, int64_t price, uint64_t quantity) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
var contract_address = "0x7cd286840ce1c84ac2486ab78dbc65533d085d91";
var abi = [
{
"constant": false,
"inputs": [
{
"name": "_number",
"type": "uint256"
}
if (typeof web3 !== 'undefined') {
// how would web3 be defined?
// because of
// METAMASK (ethereum chrome extension) / MIST (ethereum browser)
//then the provider is automatically injected into the javascript context that we can use
// basically end user ethereum
// both metamask (chrome extension) and mist inject a web3 client into the DOM of every page visited.