Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix errors #32

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- [🔗 Moonbeam Subgraph Playground](https://thegraph.com/hosted-service/subgraph/bulla-network/bulla-contracts-moonbeam)
- [🔗 Arbitrum Subgraph Playground](https://thegraph.com/hosted-service/subgraph/bulla-network/bulla-contracts-arbitrum)
- [🔗 BNB Chain Subgraph Playground](https://thegraph.com/hosted-service/subgraph/bulla-network/bulla-contracts-bnb-chain)
- [🔗 Sepolia Subgraph Playground](https://thegraph.com/hosted-service/subgraph/bulla-network/bulla-contracts-sepolia)
- [🔗 Sepolia Subgraph Playground](https://thegraph.com/studio/subgraph/bulla-contracts-sepolia/playground)

### Available commands:

Expand All @@ -43,4 +43,4 @@
- Moonbeam: `https://api.thegraph.com/subgraphs/name/bulla-network/bulla-contracts-moonbeam`
- Arbitrum: `https://api.thegraph.com/subgraphs/name/bulla-network/bulla-contracts-arbitrum`
- BNB Chain: `https://api.thegraph.com/subgraphs/name/bulla-network/bulla-contracts-bnb-chain`
- Sepolia: `https://api.thegraph.com/subgraphs/name/bulla-network/bulla-contracts-sepolia`
- Sepolia: `https://api.studio.thegraph.com/query/70345/bulla-contracts-sepolia/v.0.2.0`
2 changes: 1 addition & 1 deletion bulla-contracts/config/sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"bullaFinance": { "address": "0xB219ecd037E8A5410d2e8839586D9F3996685cfB", "startBlock": 5096555 },
"frendLend": { "address": "0x3E058834CE20A54F0755889c008D3fF62D33cE85", "startBlock": 5096555 },
"instantPayment": { "address": "0x1cD1A83C2965CB7aD55d60551877Eb390e9C3d7A", "startBlock": 5096555 },
"bullaFactoring": { "address": "0xbdefcafade1d86b451e5aa44b896ef29432dce76", "startBlock": 5532095 }
"bullaFactoring": { "address": "0xc6cEad7081eb60E8b2ffBE1EDD897690Db64dFC9", "startBlock": 5532095 }
}
2 changes: 1 addition & 1 deletion bulla-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"deploy:fuse": "yarn prep:fuse && graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs bulla-network/bulla-contracts-fuse",
"deploy:optimism": "yarn prep:optimism && graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs bulla-network/bulla-contracts-optimism",
"deploy:bnb_chain": "yarn prep:bnb_chain && graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs bulla-network/bulla-contracts-bnb-chain",
"deploy:sepolia": "yarn prep:sepolia && graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs bulla-network/bulla-contracts-sepolia"
"deploy:sepolia": "yarn prep:sepolia && graph deploy --studio bulla-contracts-sepolia "
},
"devDependencies": {
"@graphprotocol/graph-cli": "0.49.0",
Expand Down
4 changes: 0 additions & 4 deletions bulla-contracts/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ type InvoiceUnfactoredEvent implements IEventLog @entity {

type DepositMadeEvent implements IEventLog @entity {
id: ID!
invoiceId: String!
depositor: Bytes! #address
assets: BigInt!
sharesIssued: BigInt!
Expand All @@ -215,7 +214,6 @@ type DepositMadeEvent implements IEventLog @entity {

type DepositMadeWithAttachmentEvent implements IEventLog @entity {
id: ID!
invoiceId: String!
depositor: Bytes! #address
assets: BigInt!
sharesIssued: BigInt!
Expand All @@ -230,7 +228,6 @@ type DepositMadeWithAttachmentEvent implements IEventLog @entity {

type SharesRedeemedEvent implements IEventLog @entity {
id: ID!
invoiceId: String!
redeemer: Bytes! #address
assets: BigInt!
shares: BigInt!
Expand All @@ -244,7 +241,6 @@ type SharesRedeemedEvent implements IEventLog @entity {

type SharesRedeemedWithAttachmentEvent implements IEventLog @entity {
id: ID!
invoiceId: String!
redeemer: Bytes! #address
assets: BigInt!
shares: BigInt!
Expand Down
8 changes: 4 additions & 4 deletions bulla-contracts/src/functions/BullaFactoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,29 @@ export const createInvoiceUnfactoredEvent = (underlyingTokenId: BigInt, event: I

export const getDepositMadeEventId = (event: ethereum.Event): string => {
const poolAddress = event.address;
return "DepositMade-" + poolAddress.toString() + "-" + event.transaction.hash.toHexString() + "-" + event.logIndex.toString();
return "DepositMade-" + poolAddress.toHexString() + "-" + event.transaction.hash.toHexString() + "-" + event.logIndex.toString();
};

export const createDepositMadeEvent = (event: DepositMade): DepositMadeEvent => new DepositMadeEvent(getDepositMadeEventId(event));

export const getDepositMadeWithAttachmentEventId = (event: ethereum.Event): string => {
const poolAddress = event.address;
return "DepositMadeWithAttachment-" + poolAddress.toString() + "-" + event.transaction.hash.toHexString() + "-" + event.logIndex.toString();
return "DepositMadeWithAttachment-" + poolAddress.toHexString() + "-" + event.transaction.hash.toHexString() + "-" + event.logIndex.toString();
};

export const createDepositMadeWithAttachmentEvent = (event: DepositMadeWithAttachment): DepositMadeWithAttachmentEvent =>
new DepositMadeWithAttachmentEvent(getDepositMadeWithAttachmentEventId(event));

export const getSharesRedeemedEventId = (event: ethereum.Event): string => {
const poolAddress = event.address;
return "SharesRedeemed-" + poolAddress.toString() + "-" + event.transaction.hash.toHexString() + "-" + event.logIndex.toString();
return "SharesRedeemed-" + poolAddress.toHexString() + "-" + event.transaction.hash.toHexString() + "-" + event.logIndex.toString();
};

export const createSharesRedeemedEvent = (event: SharesRedeemed): SharesRedeemedEvent => new SharesRedeemedEvent(getSharesRedeemedEventId(event));

export const getSharesRedeemedWithAttachmentEventId = (event: ethereum.Event): string => {
const poolAddress = event.address;
return "SharesRedeemedWithAttachment-" + poolAddress.toString() + "-" + event.transaction.hash.toHexString() + "-" + event.logIndex.toString();
return "SharesRedeemedWithAttachment-" + poolAddress.toHexString() + "-" + event.transaction.hash.toHexString() + "-" + event.logIndex.toString();
};

export const createSharesRedeemedWithAttachmentEvent = (event: SharesRedeemedWithAttachment): SharesRedeemedWithAttachmentEvent =>
Expand Down
Loading