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.

IERC1400TokensSender in ERC1820 Registry

See original GitHub issue

In ERC1400Raw.sol there is an instantiation of IERC1400TokensSender by calling ERC1820Client.interfaceAddr().

address senderImplementation;
senderImplementation = interfaceAddr(from, ERC1400_TOKENS_SENDER);
if (senderImplementation != address(0)) {
    IERC1400TokensSender(senderImplementation).tokensToTransfer(msg.sig, partition, operator, from, to, value, data, operatorData);
}

In order to make this work, I suppose there should be a registration of ERC1400_TOKENS_SENDER to ERC1820 somewhere, by calling ERC1820Client.setInterfaceImplementation(ERC1400_TOKENS_SENDER, {address of contract}), but I could not find similar code in the repo.

Is there anything wrong with my understanding? Thanks.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
jasonclinxcommented, Apr 24, 2020

@victorwiebe got you! Yes ‘setHookContract()’ is the key part to make it work.

1reaction
onigiri-xcommented, Apr 24, 2020

Just to clarify and make sure we are on the same page, you dont need to run the unit tests to get the project working. That is what migrations are for if you want to deploy things automatically set up. But the unit tests show us what we can do with the token+javascript. You can call sethookcontract on your choice of provider, and environment whether it be a node.js project with ethersjs/web3, or remix, etc. You just need to call the function

The tl;dr here is method:

setHookContract(address validatorAddress, string interfaceLabel)

Read more comments on GitHub >

github_iconTop Results From Across the Web

IERC1400TokensSender in ERC1820 Registry #48 - GitHub
I am trying to keep info on the blockchain, that is why I go further and use this methods to query the ERC1820...
Read more >
Codefi ERC1400 Assessment | ConsenSys Diligence
Executive Summary This report presents the results of our engagement with Codefi to review ERC-1400. The review was conducted over the ...
Read more >
Address 0x3cc59f36f559212Fcc3BaDCe3A8a87d426E09DCb
Once this function is called: * - The address of the new smart contract is set in ERC1820 registry * - If the...
Read more >
EIP-1820: Pseudo-introspection Registry Contract
Simple Summary. This standard defines a universal registry smart contract where any address (contract or regular account) can register which ...
Read more >
Brønnøysund Captable developer documentation (beta)
All limited liability companies shall have a register of shareholders unless the company's shares ... /contracts/token/ERC1400Raw/IERC1400TokensSender.sol.
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