Skip to content

Instantly share code, notes, and snippets.

@aaroncox
aaroncox / nginx.conf
Last active August 25, 2018 19:00
nodeosd / nginx configuration
user www-data;
worker_processes auto;
worker_rlimit_nofile 65535;
pid /run/nginx.pid;
# include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 10000;
@aaroncox
aaroncox / unsigned.json
Created August 13, 2018 05:00
unsigned transaction format
{
"contract": {
"account": "ridlridlcoin",
"abi": {
"version": "eosio::abi/1.0",
"types": [
{
"new_type_name": "account_name",
"type": "name"
}
@aaroncox
aaroncox / Dockerfile
Created July 4, 2019 06:09
Ubuntu 16.04 eos-voter build
FROM ubuntu:16.04
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get update \
&& apt-get install -y build-essential g++ gcc git curl python make libusb-dev libudev-dev libusb-1.0-0-dev \
&& apt-get -y autoclean
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 8.16.0
@aaroncox
aaroncox / authorityprovider.js
Last active March 15, 2024 14:57
Using a custom authority provider within eosjs for Greymass Fuel
// A custom cosigner AuthorityProvider for EOSJS v2
// This provider overrides the checks on all keys,
// allowing a partially signed transaction to be
// broadcast to the API node.
class CosignAuthorityProvider {
async getRequiredKeys(args) {
const { transaction } = args;
// Iterate over the actions and authorizations
transaction.actions.forEach((action, ti) => {
action.authorization.forEach((auth, ai) => {
@aaroncox
aaroncox / cosign_noop.js
Created December 11, 2019 01:19
The first action to include in a transaction to use Greymass Fuel
const cosign_noop = {
account: 'greymassnoop',
name: 'noop',
authorization: [
{
actor: 'greymassfuel',
permission: 'cosign',
}
],
data: {}