Skip to content

Instantly share code, notes, and snippets.

View GalloDaSballo's full-sized avatar
:electron:
Always improving

Alex The Entreprenerd GalloDaSballo

:electron:
Always improving
View GitHub Profile
import {getCartQuantity, getCartPrice} from './cart'
/**
* Given cart and selected country, return the amount of packages needed
* @param {array} cart
* @param {object} selectedCountry
*/
export const packQuantity = (cart, selectedCountry) => {
let packsNum = getCartQuantity(cart) / 24;
const Block = styled.div`
width: 100%;
position: relative;
margin-bottom: 34px;
background: #ffffff;
padding: 19px 30px 30px 30px;
box-shadow: 0 2px 4px 0 #e3e9f3;
border-radius: 3px;
line-height: 18px;
//From preceding contracts
function calcBuyAmount(uint investmentAmount, uint outcomeIndex) public view returns (uint) {
require(outcomeIndex < positionIds.length, "invalid outcome index");
uint[] memory poolBalances = getPoolBalances();
uint investmentAmountMinusFees = investmentAmount.sub(investmentAmount.mul(fee) / ONE);
uint buyTokenPoolBalance = poolBalances[outcomeIndex];
uint endingOutcomeBalance = buyTokenPoolBalance.mul(ONE);
for(uint i = 0; i < poolBalances.length; i++) {
module.exports = ({ env }) => {
if(env('NODE_ENV') === 'production'){
return {
defaultConnection: 'default',
connections: {
default: {
connector: 'bookshelf',
settings: {
client: 'postgres',
module.exports = ({ env }) => {
if(env('NODE_ENV') === 'development'){
return {
defaultConnection: 'default',
connections: {
default: {
connector: 'bookshelf',
settings: {
client: 'sqlite',
filename: env('DATABASE_FILENAME', '.tmp/data.db'),
module.exports = {
create: async (ctx) => {
console.log("Article.create")
const {
email
} = ctx.request.body
console.log("Article.create email", email)
const sent = await strapi.plugins['email'].services.email.send({
Gallos-MacBook-Pro:polymarket-sdk gallo$ cd ..
Gallos-MacBook-Pro:packages gallo$ ls
polymarket-api polymarket-neo4j polymarket-scripts
polymarket-artifacts polymarket-predictions polymarket-sdk
polymarket-browser-ganache polymarket-predictions-react polymarket-sol
polymarket-default-homepage polymarket-predictions-sol polymarket-strapi
polymarket-explorer polymarket-providers
polymarket-listener polymarket-react
Gallos-MacBook-Pro:packages gallo$ cd polymarket-sol
Gallos-MacBook-Pro:polymarket-sol gallo$ npm publish
'use strict';
/**
* Rename this cron.js and put it inside of /config/functions/cron.js to play around with components
*/
const addComponentToArticle = async () => {
console.log("Update the Component and add new one")
const article = await strapi.services.article.findOne({id: 1})
const _ = require("lodash");
const tuna = [
{ id: 6 },
{ id: 13 },
{ id: 24 },
{ id: 44 },
{ id: 46 },
{ id: 53 },
{ id: 101 },
{
"ADDRESS FOR CONTRACT ONE": {
"question": "What will the price of 1 COMP token be 1 week after being listed on Coinmarketcap.com?",
"description": "The price is defined by the USD price on coinmarketcap.com. We will monitor coinmarketcap’s recent listings page. From the day it gets listed, 8 days later the market will resolve to what the price was on the coinmarkeetcap graph, as close to 12 pm EST as possible. All dates and times are set in EST. The COMP token website must be a link to, or a subdomain of, compound.finance, or otherwise related to the project. This market has an upper bound of $3/COMP and lower of $1/COMP, and will resolve proportionally with the price of the token. For example, if the price of COMP is $2, this market will resolve at 50c for both outcome shares. If the market ends with COMP trading above $3, the market’s upside is capped at resolving at $1. Contrarily, if the market ends with COMP trading below $1, the market’s downside is capped at resolving at $0.",