Skip to content

Commit

Permalink
Merge pull request #12 from srdarkseer/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
srdarkseer authored Apr 22, 2024
2 parents 6753a56 + 2e391d3 commit b69cbe2
Show file tree
Hide file tree
Showing 3 changed files with 319 additions and 145 deletions.
7 changes: 6 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
BASE_URL: YOUR_BASE_URL
BASE_URL= YOUR_BASE_URL
NEXT_PUBLIC_APP_ID= YOUR_APP_ID
NEXT_PUBLIC_SERVER_URL= YOUR_SERVER_URL
MORALIS_API_KEY= YOUR_MORALIS_API_KEY
INFURA_API_KEY= YOUR_INFURA_API_KEY
SAI_CONTRACT_ADDRESS= YOUR_CONTRACT_ADDRESS
359 changes: 287 additions & 72 deletions src/lib/contractABI.ts
Original file line number Diff line number Diff line change
@@ -1,72 +1,287 @@
export default function contractABI() {
const abi = [
// Dummy Contract ABI
{
inputs: [
{
internalType: "string",
name: "_name",
type: "string",
},
{
internalType: "uint256",
name: "_age",
type: "uint256",
},
],
name: "createPerson",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_personAddress",
type: "address",
},
],
name: "getPerson",
outputs: [
{
internalType: "string",
name: "name",
type: "string",
},
{
internalType: "uint256",
name: "age",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "personAddress",
type: "address",
},
{
indexed: false,
internalType: "string",
name: "name",
type: "string",
},
{
indexed: false,
internalType: "uint256",
name: "age",
type: "uint256",
},
],
name: "PersonCreated",
type: "event",
},
];
}
export const saiContractABI = [
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "owner",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "spender",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "previousOwner",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "newOwner",
type: "address",
},
],
name: "OwnershipTransferred",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "from",
type: "address",
},
{ indexed: true, internalType: "address", name: "to", type: "address" },
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "Transfer",
type: "event",
},
{
inputs: [{ internalType: "address", name: "wallet", type: "address" }],
name: "addExcludedWallet",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "owner", type: "address" },
{ internalType: "address", name: "spender", type: "address" },
],
name: "allowance",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "approve",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "account", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "buyTax",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "uint256", name: "newBuyTax", type: "uint256" },
{ internalType: "uint256", name: "newSellTax", type: "uint256" },
],
name: "changeTax",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "maxTxAmount",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "openTrading",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "removeLimits",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "sellTax",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "pure",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "recipient", type: "address" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "transfer",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "sender", type: "address" },
{ internalType: "address", name: "recipient", type: "address" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "transferFrom",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{ stateMutability: "payable", type: "receive" },
];

export const dummyABI = [
{
inputs: [
{
internalType: "string",
name: "_name",
type: "string",
},
{
internalType: "uint256",
name: "_age",
type: "uint256",
},
],
name: "createPerson",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_personAddress",
type: "address",
},
],
name: "getPerson",
outputs: [
{
internalType: "string",
name: "name",
type: "string",
},
{
internalType: "uint256",
name: "age",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "personAddress",
type: "address",
},
{
indexed: false,
internalType: "string",
name: "name",
type: "string",
},
{
indexed: false,
internalType: "uint256",
name: "age",
type: "uint256",
},
],
name: "PersonCreated",
type: "event",
},
];
Loading

0 comments on commit b69cbe2

Please sign in to comment.