Skip to content

Commit

Permalink
Merge pull request #29 from tallycash/earn-contract-interaction
Browse files Browse the repository at this point in the history
Earn contract interaction
  • Loading branch information
jagodarybacka committed Mar 30, 2022
2 parents 58934fd + c1c462a commit eda6dfb
Show file tree
Hide file tree
Showing 17 changed files with 1,808 additions and 275 deletions.
1 change: 1 addition & 0 deletions .env.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ HIDE_IMPORT_LEDGER=false
GAS_PRICE_POOLING_FREQUENCY=120
ETHEREUM_NETWORK=mainnet
PERSIST_UI_LOCATION=false
EARN_COMING_SOON=true
WEBSITE_ORIGIN=https://tally.cash
USE_MAINNET_FORK=false
MAINNET_FORK_URL="http://127.0.0.1:8545"
Expand Down
2 changes: 2 additions & 0 deletions background/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ export const DAY = 24 * HOUR
export const COMMUNITY_MULTISIG_ADDRESS =
"0x99b36fDbC582D113aF36A21EBa06BFEAb7b9bE12"

export const doggoTokenDecimalDigits = 18

export * from "./currencies"
export * from "./networks"
1 change: 1 addition & 0 deletions background/features/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export const HIDE_CREATE_PHRASE = process.env.HIDE_CREATE_PHRASE === "true"
export const HIDE_IMPORT_LEDGER = process.env.HIDE_IMPORT_LEDGER === "true"
export const PERSIST_UI_LOCATION = process.env.PERSIST_UI_LOCATION === "true"
export const USE_MAINNET_FORK = process.env.USE_MAINNET_FORK === "true"
export const EARN_COMING_SOON = process.env.EARN_COMING_SOON === "true"
162 changes: 162 additions & 0 deletions background/lib/approvalTarget.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
const APPROVAL_TARGET_ABI = [
{
inputs: [],
stateMutability: "nonpayable",
type: "constructor",
},
{
inputs: [],
name: "DOMAIN_SEPARATOR",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "PERMIT_AND_TRANSFER_FROM_TYPEHASH",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "cachedChainId",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "cachedDomainSeparator",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "nonces",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "erc20",
type: "address",
},
{
internalType: "address",
name: "owner",
type: "address",
},
{
internalType: "address",
name: "recipient",
type: "address",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "uint256",
name: "deadline",
type: "uint256",
},
{
internalType: "uint8",
name: "v",
type: "uint8",
},
{
internalType: "bytes32",
name: "r",
type: "bytes32",
},
{
internalType: "bytes32",
name: "s",
type: "bytes32",
},
],
name: "permitAndTransferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "typeHashDigest",
type: "bytes32",
},
{
internalType: "uint8",
name: "v",
type: "uint8",
},
{
internalType: "bytes32",
name: "r",
type: "bytes32",
},
{
internalType: "bytes32",
name: "s",
type: "bytes32",
},
],
name: "recoverFromTypeHashSignature",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
]

export default APPROVAL_TARGET_ABI

0 comments on commit eda6dfb

Please sign in to comment.