question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proxy | Call | example

See original GitHub issue

Could you please help me to recreate this behavior via code ?

image

I’m wondering what to use as Call parameter:

api.tx.proxy.proxy(primaryAccount, null, 'Call Parameter')

My code, without the proxy involved, looks like:

const extrinsic = api.tx.identity.provideJudgement(registrarIndex,target,judgement)
const txHash = await extrinsic.signAndSend(registrarAccount)

Maybe something like this ?

const callIndex = api.tx.identity.provideJudgement.callIndex
const extrinsic = api.tx.proxy.proxy(primaryAccount, null, { callIndex, args:[registrarIndex,target,judgement] })
const txHash = await extrinsic.signAndSend(proxyAccount)

Thanks !

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jacogrcommented, Oct 27, 2020

Yes, SubmittableExrinsic can be passed - there are specific construction checks to allow them so it is easier to use, so you can pass a Call to a submittable or vice-versa. aka you don’t need to manually construct like in your example above, this is simpler and cleaner -

const reg = api.tx.identity.provideJudgement(registrarIndex, target, judgement)
const extrinsic = api.tx.proxy.proxy(primaryAccount, null, reg)
const txHash = await extrinsic.signAndSend(proxyAccount)
0reactions
polkadot-js-botcommented, Jun 3, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Voice Proxy? | Twilio
Voice Proxy, also known as Masked Calling, is the technique used to protect users' private information by providing an intermediary number so that...
Read more >
Proxy - JavaScript - MDN Web Docs
For example, this code creates a proxy for the target object. ... use Reflect methods within a proxy trap, and the Reflect method...
Read more >
Step 8: Deploy and call a sample proxy - Apigee - Google Cloud
Click API Proxies in the main view. From the Select Environment drop-down list, select an environment. Click Create new. Click Reverse proxy (most...
Read more >
Understanding APIs and API proxies | Apigee Edge
API proxies decouple the app-facing API from your backend services, shielding those apps from backend code changes. As you make backend changes ...
Read more >
What Is an API Proxy? | heynode.com
A proxy is something that acts on behalf of something else. Sitting between your application and your backend, API proxies provide an interface...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found