-
Notifications
You must be signed in to change notification settings - Fork 10
Feat-transient-base-ingestor #27
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
Feat-transient-base-ingestor #27
Conversation
Hello @christinehall I noticed the mint contract was different from the nft contract too |
Thank you for this submission!! 🥳 🙏 We've gotten a little behind on reviewing these, but will be spending some time over the next 48 hours, so look out for some feedback soon! Thank you! 🙏 |
contractAddress, | ||
mintAddress, | ||
contractMethod: 'purchase', | ||
contractParams: '["address", 1, 1, address]', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the ABI above, is this right?
Are the last properties optional? And are nftAddress
and recipient
supposed to both be the recipient's address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// nftAddress address 0x8F7F96eEc76c882C327a1b927D04C87031ED5481
// 1 tokenId uint256 1
// 2 recipient address 0xcA4700293Bd3b48E7051116635C82546F17a61e3
// 3 numberToMint uint256 1
// 4 presaleNumberCanMint uint256 0
// 5 proof bytes32[]
The above is a sample contract interaction pulled from the explorer for a successful purchase on transient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nftAddress should be the address of the nft
and yes recipient address should be address of recipient. ABI says this allows for buying for others
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit unsure of what contractParams: '["address", 1, 1, address]',
should be atm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set it to
["${contract.contractAddress}", 1, address, 1]
,
I believe it represents the structure better now
@chrismaddern I have made the necessary corrections, should be good now |
Hi @Myestery Are you able to run the tests locally? If you:
I've also just added support for simulating transactions to the tests Can you merge the floornfts/mobile-minting branch into yours? There are several failing manual tests already, but this also indicates that the constructed payload does not execute successfully onchain: Let me know if you have any questions, otherwise, making the tests pass is the right next step 😊 |
Thanks for fixing the tests, |
All local machines and CI seem to be building it okay which is odd - I'm not 100% sure what the problem is: Setup
Do you have any global TS config that could be applying? Ah, if you're having a hard time running git update-index --assume-unchanged .npmrc
rm .npmrc This will remove it locally, while preventing that change from being pushed to git |
I finally got it to work using node 20 |
@chrismaddern The tests are passing now |
chainId, | ||
contractAddress: mintAddress, | ||
contractMethod: 'purchase', | ||
contractParams: `[address, ${token_id}, address, 1, 0, []]`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you merge the latest from mobile-minting main, it will now run a simulation for you in running the tests.
This reveals that these params are incorrect.
Consulting the ABI:
{ internalType: 'address', name: 'nftAddress', type: 'address' },
{ internalType: 'uint256', name: 'tokenId', type: 'uint256' },
{ internalType: 'address', name: 'recipient', type: 'address' },
{ internalType: 'uint256', name: 'numberToMint', type: 'uint256' },
{ internalType: 'uint256', name: 'presaleNumberCanMint', type: 'uint256' },
{ internalType: 'bytes32[]', name: 'proof', type: 'bytes32[]' },
The important one is...
Param 1: This is the Address of the NFT collection, not the user
Replacing this with:
contractParams: `["${contractAddress}", "${token_id}", address, 1, 0, []]`,
fixes one part of the problem
The next is that the price wei for the test is being set to 20000000000000000
, but minting on metamask reveals it's actualy 0.00209.
The priceWei is missing the mint fee it seems.
Hopefully this helps get it across the line!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @chrismaddern !
I figured the fee some hours ago
However, I noticed there are about 4 contract types on Base Network that Transient supports today
- ERC721TL
- ERC1155TL
- ER7160TL (The contract for Kansas smile)
- Trace
I'll be adding support for them before the next review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests are passing now tho
Pls let me know if I should proceed with adding support for the remaining 3 contract types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, yes — support for all Base supported types would be extremely helpful. Particularly the 721TL is important (and I think most of their mints?)
All done @chrismaddern I added more tests to ensure the other contract types are working and fixed some minor flaws with the ingestor. |
Amazing! Could you add example URLs for each to the Currently only the one URL is being simulated in tests: Also, you can run simulations during testing locally by adding the following to your .env:
When I do this locally:
If you need to fix the blockHash at which the tests run the simulation you can do so here: Note that all test cases currently need to be able to simulate successfully at the same blockhash (i.e. have been live & available at the same time) |
I fixed the tests, I noticed a slight change with the ABI for ERC721TL and ERC7160TL contracts |
Huzzah! Will review for merge. Meanwhile, I'll DM you on the Twitter profile on your Github page with follow up for the bounty 🙂 |
@Myestery did you get the DM? 👀 |
yes, seen now |
Filled. |
Hey @chrismaddern |
It got closed some minutes ago |
You should be able to merge main now! 😊 |
Mint Ingestor: Transient
Functionality Supported
Before you submit
src/ingestors
myMintingPlatformGetContractDetails
resources
objectfix #8