From 7852ceb5dc9c6dff76dbc1558decc8dc53279fbc Mon Sep 17 00:00:00 2001 From: Dan Oved Date: Fri, 8 Mar 2024 11:04:10 -0800 Subject: [PATCH] fix readme for protocol-sdk for premint to reflect the possibility of having an account as an argument (#237) ## Description The protocol-sdk readme doesnt take into consideration the fact that the account could be an `Account` and not just an `Address` - so this updates the readme to reflect this ## Motivation and Context ## Does this change the ABI/API? - [ ] This changes the ABI/API ## What tests did you add/modify to account for these changes ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New module / feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) ## Checklist: - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] i added a changeset to account for this change ## Reviewer Checklist: - [ ] My review includes a symposis of the changes and potential issues - [ ] The code style is enforced - [ ] There are no risky / concerning changes / additions to the PR --- packages/protocol-sdk/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/protocol-sdk/README.md b/packages/protocol-sdk/README.md index eebec05e2..b697e7f7e 100644 --- a/packages/protocol-sdk/README.md +++ b/packages/protocol-sdk/README.md @@ -235,7 +235,7 @@ async function createForFree({ // public client that will simulate the transaction publicClient: PublicClient; // address of the token contract - creatorAccount: Address; + creatorAccount: Account | Address; }) { const premintClient = createPremintClient({ chain: walletClient.chain!, @@ -250,7 +250,7 @@ async function createForFree({ checkSignature: true, // collection info of collection to create collection: { - contractAdmin: creatorAccount, + contractAdmin: typeof creatorAccount === "string" ? creatorAccount : creatorAccount.address, contractName: "Testing Contract", contractURI: "ipfs://bafkreiainxen4b4wz4ubylvbhons6rembxdet4a262nf2lziclqvv7au3e",