Skip to content

Commit

Permalink
feat: update mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
cdotta committed Oct 10, 2024
1 parent 55c3ce1 commit cd098c4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion subgraphs/memecoins/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ type MemePresale @entity {
targetMagicToRaise: BigInt!
presalePrice: BigInt!
magicRaised: BigInt!
totalsupply: BigInt!
totalSupply: BigInt!
graduated: Boolean!
pairCoin: Bytes
pairVault: Bytes
lpAddress: Bytes
returnForOne: BigInt!
isERC1155: Boolean!
}

type PairCoin @entity {
Expand Down
15 changes: 12 additions & 3 deletions subgraphs/memecoins/src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ export function handleMemeMade(event: MemeMade): void {
memePresale.targetMagicToRaise = params.presaleinfo.targetMagicToRaise;
memePresale.presalePrice = params.presaleinfo.presalePrice;
memePresale.magicRaised = params.presaleinfo.magicRaised;
memePresale.totalsupply = params.presaleinfo.totalsupply;
memePresale.totalSupply = params.presaleinfo.totalsupply;
memePresale.graduated = params.presaleinfo.graduated;
memePresale.pairCoin = params.presaleinfo.paircoin;
memePresale.pairVault = params.presaleinfo.pairvault;
memePresale.returnForOne = params.presaleinfo.returnForOne;
memePresale.isERC1155 = params.presaleinfo.is1155;

memePresale.save();
}
Expand All @@ -56,9 +59,12 @@ export function handleBuySell(event: BuySell): void {
memePresale.targetMagicToRaise = params.presaleinfo.targetMagicToRaise;
memePresale.presalePrice = params.presaleinfo.presalePrice;
memePresale.magicRaised = params.presaleinfo.magicRaised;
memePresale.totalsupply = params.presaleinfo.totalsupply;
memePresale.totalSupply = params.presaleinfo.totalsupply;
memePresale.graduated = params.presaleinfo.graduated;
memePresale.pairCoin = params.presaleinfo.paircoin;
memePresale.pairVault = params.presaleinfo.pairvault;
memePresale.returnForOne = params.presaleinfo.returnForOne;
memePresale.isERC1155 = params.presaleinfo.is1155;

memePresale.save();
}
Expand All @@ -72,9 +78,12 @@ export function handleGraduation(event: Graduation): void {
memePresale.targetMagicToRaise = params.presaleinfo.targetMagicToRaise;
memePresale.presalePrice = params.presaleinfo.presalePrice;
memePresale.magicRaised = params.presaleinfo.magicRaised;
memePresale.totalsupply = params.presaleinfo.totalsupply;
memePresale.totalSupply = params.presaleinfo.totalsupply;
memePresale.graduated = params.presaleinfo.graduated;
memePresale.pairCoin = params.presaleinfo.paircoin;
memePresale.pairVault = params.presaleinfo.pairvault;
memePresale.returnForOne = params.presaleinfo.returnForOne;
memePresale.isERC1155 = params.presaleinfo.is1155;
memePresale.lpAddress = params.lpaddress;

memePresale.save();
Expand Down

0 comments on commit cd098c4

Please sign in to comment.