Skip to content

Instantly share code, notes, and snippets.

View nsjames's full-sized avatar

Nathan James nsjames

View GitHub Profile
class InjectedObject {
// Check here for required fields: https://get-scatter.com/docs/requirable-fields
getIdentity(requiredFields){
//.. open your authentication popup, return:
return {
accounts:[{blockchain:'eos', name:'thename', authority:'active'}]
}
}
async onboard(){
this.onboardingError = '';
switch(this.onboarding){
case ONBOARD.START:
if(!await this.scatter.suggestNetwork(network)){
this.onboardingError = 'You must accept the Test Network in your Scatter.';
return false;
} else {
@nsjames
nsjames / acchascode.cpp
Created August 26, 2018 11:02
Account Has Code - Basic EOS oracle for checking if an account has code on it.
#include <eosiolib/eosio.hpp>
#include <eosiolib/singleton.hpp>
using namespace eosio;
class acchascode : contract {
private:
// @abi table trustees
struct Trustee {