anchor icon indicating copy to clipboard operation
anchor copied to clipboard

Update examples after you deprecated rpc namespace

Open 5elfle5 opened this issue 2 years ago • 4 comments

You've deprecated rpc namespace in Program<Idl> from @project-serum/anchor package, but example is not updated, and there is no documentation, I tried reading code, but could not understand what I am supposed to use instead of rpc, please update your examples

5elfle5 avatar Aug 13 '22 07:08 5elfle5

Use the method namespace. E.g., await <program>.methods.<my-method>(<...params>).rpc()

armaniferrante avatar Aug 13 '22 13:08 armaniferrante

You've deprecated rpc namespace in Program from @project-serum/anchor package, but example is not updated, and there is no documentation, I tried reading code, but could not understand what I am supposed to use instead of rpc, please update your examples

Can see sample usages here: https://github.com/openchaindev/jobs/blob/master/tests/unit-tests/applicant.ts

ohaddahan avatar Aug 18 '22 11:08 ohaddahan

the tic-tac-toe example in the anchor docs makes use of the MethodsBuilder pattern that is preferred.

callensm avatar Aug 18 '22 12:08 callensm

Major +1 to this. We love the pace at which this project is moving but it is extremely difficult for new developers to adopt currently. Keeping the examples up to date with releases seems like it should be a top priority.

ezeev avatar Aug 31 '22 19:08 ezeev