anchor
anchor copied to clipboard
Update examples after you deprecated rpc namespace
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
Use the method
namespace. E.g., await <program>.methods.<my-method>(<...params>).rpc()
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
the tic-tac-toe example in the anchor docs makes use of the MethodsBuilder
pattern that is preferred.
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.