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 <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) { |
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
<!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> |
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
var contract_address = "0x7cd286840ce1c84ac2486ab78dbc65533d085d91"; | |
var abi = [ | |
{ | |
"constant": false, | |
"inputs": [ | |
{ | |
"name": "_number", | |
"type": "uint256" | |
} |
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
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. |