Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Madjarx committed Oct 8, 2023
0 parents commit accd401
Show file tree
Hide file tree
Showing 178 changed files with 44,187 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
artifacts
cache
node_modules
test
*.log
.contract
.wallet

# TODO: must replace this key strategy
#.env

hardhat-template
77 changes: 77 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
INFURA_ID=000000000000000000000000000000

########################################################################
# Keys
########################################################################
AVALANCHE_PRIVATE_KEY="0000000000000000000000000000000000000000000000000000000000000000"
BINANCE_PRIVATE_KEY="0000000000000000000000000000000000000000000000000000000000000000"
FANTOM_PRIVATE_KEY="0000000000000000000000000000000000000000000000000000000000000000"
########################################################################
# Networks
########################################################################
HARDHAT_FORK_URL="https://api.avax.network/ext/bc/C/rpc"
HARDHAT_CHAIN_ID=431337
LOCALFORK_URL="http://localfork:8545"
LOCALFORK_PRIVATE_KEY=
LOCALFORK_CHAIN_ID=431337
AVALANCHE_MAINNET_URL="https://api.avax.network/ext/bc/C/rpc"
AVALANCHE_CHAIN_ID=431337
BINANCE_MAINNET_URL="https://bsc-dataseed.binance.org/"
FANTOM_MAINNET_URL="https://rpc.ftm.tools/"
########################################################################
# Payroll
########################################################################
PAYROLL_ADDRESS_AVAX_MICHAEL="0x"
PAYROLL_ADDRESS_AVAX_MATT="0x"
PAYROLL_ADDRESS_AVAX_MUKHTAR="0x9a5e5fe1450d8accbcaaa6a2b15ae66d578a72c8"
PAYROLL_ADDRESS_AVAX_DAN="0xdaa057d7b58816c40328fb36a67c614e8ac1bc96"
########################################################################
# Contracts
########################################################################
RUBYMINE_CONTRACT_ADDRESS="0x31A226acD218fe1FD2E6b26767E670e868b6E65f"
COOKEDRICE_CONTRACT_ADDRESS="0x446BFC36541cC6b4832408Cc7E75A4e2D17CDC15"
BAKEDBEANS_CONTRACT_ADDRESS="0xE2D26507981A4dAaaA8040bae1846C14E0Fb56bF"
LUCKYCAT_CONTRACT_ADDRESS="0xb50e74A6b82F59c4058b5D798E3D9C9D9B8c6e16"
SPOOKYMINER_CONTRACT_ADDRESS="0x99f07e573A962E489bA0EB9042bDa9f0B4be91cF"
MONEYLAUNDRY_CONTRACT_ADDRESS="0xA366C1E80642Abcaa190Ed4Fd7C9bA642228053b"
SPOOKEDBEANS_CONTRACT_ADDRESS="0x63690090B52B1E6E685b88Ca365596b8edb0F379"
########################################################################
# Flows
########################################################################
# ---------- FLOW 01 --- strategy when GRAPE over $2
# Not yet implemented

# ---------- FLOW 02 --- strategy when GRAPE price between $1.00-$1.99
# FLOW 02 TASK 01: Enter the ecosystem (purchase MIM from AVAX, purchase GRAPE from MIM)
# Not yet implemented

# FLOW 02 TASK 02: Stake GRAPE-MIM-LP tokens into the GRAPE-MIM pool in the Vineyard
FLOW_02_TASK_02_MIN_AMOUNT_OF_GRAPE_MIM_LP_TO_START=1
FLOW_02_TASK_02_DO_WE_STAKE_ALL=TRUE
FLOW_02_TASK_02_AMOUNT_OF_GRAPE_MIM_LP_TO_STAKE=1

# FLOW 02 TASK 03: Stake WINE rewards in the Winery
FLOW_02_TASK_03_MIN_AMOUNT_OF_WINE_TO_START=1
FLOW_02_TASK_03_DO_WE_STAKE_ALL=TRUE
FLOW_02_TASK_03_AMOUNT_OF_WINE_TO_STAKE=1

# FLOW 02 TASK 04: stake GRAPE or combine GRAPE with WINE into GRAPE-WINE-LP
FLOW_02_TASK_04_MIN_AMOUNT_OF_GRAPE_TO_START=1
FLOW_02_TASK_04_PERCENTAGE_OF_GRAPE_TO_STAKE=50
FLOW_02_TASK_04_PERCENTAGE_OF_GRAPE_TO_COMBINE=50

# ---------- FLOW 03 --- GRAPE BELOW $1
# Not yet implemented

# ---------- FLOW 04 --- Claim WINE and Deposit 50-50 to WINE-GRAPE-LP and MIM-WINE-LP
# FLOW 04 TASK 01: Claim WINE and stake into WINE-GRAPE-LP and WINE-MIM-LP
FLOW_04_TASK_01_MIN_AMOUNT_OF_MIM_TO_START="0"
FLOW_04_TASK_01_MIN_AMOUNT_OF_WINE_REWARDS_TO_START="1"
FLOW_04_TASK_01_MIN_AMOUNT_OF_WINE_IN_WALLET="0.25"
FLOW_04_TASK_01_PERCENTAGE_OF_WINE_TO_STAKE_INTO_WINE_GRAPE_LP="33"
FLOW_04_TASK_01_PERCENTAGE_OF_WINE_TO_STAKE_INTO_WINE_MIM_LP="33"

# ---------- FLOW 05
FLOW_05_RUN_ID="1"
FLOW_05_MIN_GRAPE_CLAIMABLE="1"
FLOW_05_MIN_WINE_CLAIMABLE="0.01"
55 changes: 55 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
*.swp

pids
logs
results
tmp

# Build
public/css/main.css

# Coverage reports
coverage


# Dependency directory
node_modules
bower_components
**/node_modules

# Editors
.idea
*.iml

# OS metadata
.DS_Store
Thumbs.db

# Ignore built ts files
dist/**/*

**/.DS_Store

#Hardhat files
cache
artifacts
typechain
.contract
.wallet

# API keys and secrets
.env
**/.env
.env.keys

transaction-history/*
yarn.lock
hardhat-template
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.17.6
1 change: 1 addition & 0 deletions ABI/BakedBeans.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"beanRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ref","type":"address"}],"name":"buyEggs","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"contractBalance","type":"uint256"}],"name":"calculateEggBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eth","type":"uint256"}],"name":"calculateEggBuySimple","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eggs","type":"uint256"}],"name":"calculateEggSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"getEggsSinceLastHatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"getMyEggs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"getMyMiners","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ref","type":"address"}],"name":"hatchEggs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seedMarket","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"sellEggs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
1 change: 1 addition & 0 deletions ABI/CookedRice.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"contractBalance","type":"uint256"}],"name":"calculateEggBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eth","type":"uint256"}],"name":"calculateEggBuySimple","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eggs","type":"uint256"}],"name":"calculateRiceSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ref","type":"address"}],"name":"cookRice","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"eatRice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"getEggsSinceLastHatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"getMyMiners","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"getMyRice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ref","type":"address"}],"name":"reCookRice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IBEP20","name":"tokenAddress","type":"address"}],"name":"recoverWrongTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"riceRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seedMarket","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
222 changes: 222 additions & 0 deletions ABI/ERC20.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "balance",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "owner",
"type": "address"
},
{
"indexed": true,
"name": "spender",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
]
Loading

0 comments on commit accd401

Please sign in to comment.