Skip to content

Commit

Permalink
Added new events, updated ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemKolodko committed Dec 1, 2024
1 parent 67c3234 commit 4657517
Show file tree
Hide file tree
Showing 5 changed files with 369 additions and 19 deletions.
181 changes: 166 additions & 15 deletions src/abi/TokenFactory.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,24 @@
},
{
"internalType": "address",
"name": "_uniswapV2Router",
"name": "_uniswapV3Factory",
"type": "address"
},
{
"internalType": "address",
"name": "_uniswapV2Factory",
"name": "_nonfungiblePositionManager",
"type": "address"
},
{
"internalType": "address",
"name": "_bondingCurve",
"type": "address"
},
{
"internalType": "address",
"name": "_weth",
"type": "address"
},
{
"internalType": "uint256",
"name": "_feePercent",
Expand Down Expand Up @@ -127,6 +132,25 @@
"name": "BurnTokenAndMintWinner",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "competitionId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"name": "NewCompetitionStarted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
Expand Down Expand Up @@ -266,14 +290,32 @@
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount0In",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount0Out",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"name": "TokenLiqudityAdded",
"name": "TokenSell",
"type": "event"
},
{
Expand All @@ -282,25 +324,49 @@
{
"indexed": true,
"internalType": "address",
"name": "token",
"name": "tokenAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "tokenCreator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "pool",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount0In",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint128",
"name": "liquidity",
"type": "uint128"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount0Out",
"name": "amount0",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fee",
"name": "amount1",
"type": "uint256"
},
{
Expand All @@ -310,7 +376,7 @@
"type": "uint256"
}
],
"name": "TokenSell",
"name": "WinnerLiquidityAdded",
"type": "event"
},
{
Expand Down Expand Up @@ -378,6 +444,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "UNISWAP_FEE",
"outputs": [
{
"internalType": "uint24",
"name": "",
"type": "uint24"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "bondingCurve",
Expand Down Expand Up @@ -554,6 +633,53 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "nonfungiblePositionManager",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "onERC721Received",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
Expand Down Expand Up @@ -698,18 +824,30 @@
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"name": "",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"name": "tokensCreators",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "uniswapV2Factory",
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "tokensPools",
"outputs": [
{
"internalType": "address",
Expand All @@ -720,9 +858,22 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "uniswapV2Router",
"name": "uniswapV3Factory",
"outputs": [
{
"internalType": "address",
Expand Down
33 changes: 33 additions & 0 deletions src/entities/competition.entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import {
Column,
CreateDateColumn,
Entity,
PrimaryGeneratedColumn,
} from 'typeorm';
import { ApiProperty } from '@nestjs/swagger';
@Entity({ name: 'competitions' })
export class CompetitionEntity {
@ApiProperty()
@PrimaryGeneratedColumn('uuid')
id: string;

@ApiProperty()
@Column()
txnHash: string;

@ApiProperty()
@Column({ type: 'integer' })
blockNumber: number;

@ApiProperty()
@Column({ type: 'bigint' })
competitionId: number;

@ApiProperty()
@Column({ type: 'bigint' })
timestamp: number;

@ApiProperty()
@CreateDateColumn({ name: 'createdAt' })
createdAt: Date;
}
20 changes: 18 additions & 2 deletions src/entities/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { TokenBalance } from './token.balances.entity';
import { TokenWinner } from './token.winner.entity';
import { SignInRequestEntity } from './signin.entity';
import { TokenBurn } from './token.burn.entity';
import { LiquidityProvision } from './liquidity.provision.entity';
import { CompetitionEntity } from './competition.entity';

const entities = [
UserAccount,
Expand All @@ -17,8 +19,22 @@ const entities = [
TokenBalance,
TokenWinner,
SignInRequestEntity,
TokenBurn
TokenBurn,
LiquidityProvision,
CompetitionEntity
];

export { UserAccount, Token, IndexerState, Trade, Comment, TokenBalance, TokenWinner, SignInRequestEntity, TokenBurn };
export {
UserAccount,
Token,
IndexerState,
Trade,
Comment,
TokenBalance,
TokenWinner,
SignInRequestEntity,
TokenBurn,
LiquidityProvision,
CompetitionEntity
};
export default entities;
Loading

0 comments on commit 4657517

Please sign in to comment.