Skip to main content
Notice removed Draw attention by CommunityBot
Bounty Ended with Bal Gu's answer chosen by CommunityBot
deleted 8 characters in body
Source Link
forhas
  • 825
  • 1
  • 10
  • 30

In my smart contract I have some methods that get a struct as an input:

contract MyContract {

  MyStruct {
    uint[] arr;
    address[] addresses; 
  }

  function myFunction(MyStruct[] structs) external {
  }
}

I called this function and on Etherscan although my contract is verified it seems to show the function selector (first 4 bytes of the encoded function signature) and not the function name. Is there a way to overcome this and show the function name?

enter image description here


UPDATE


Following this answer I have managed to match between my function signature and the right function selector. As far as I understood from the documentation I should be able to use the method-registry contract in order to register my method.

I have registered my function over the SignatureReg contract but I can't see any change in the names of the functions over etherscan. I was expecting etherscan to listen to this contract (or something like thatto query it) and update the method name accordingly once it is registered but I guess this is not how this thing worksthings work. Still looking for a solution.

In my smart contract I have some methods that get a struct as an input:

contract MyContract {

  MyStruct {
    uint[] arr;
    address[] addresses; 
  }

  function myFunction(MyStruct[] structs) external {
  }
}

I called this function and on Etherscan although my contract is verified it seems to show the function selector (first 4 bytes of the encoded function signature) and not the function name. Is there a way to overcome this and show the function name?

enter image description here


UPDATE


Following this answer I have managed to match between my function signature and the right function selector. As far as I understood from the documentation I should be able to use the method-registry contract in order to register my method.

I have registered my function over the SignatureReg contract but I can't see any change in the names of the functions over etherscan. I was expecting etherscan to listen to this contract (or something like that) and update the method name accordingly once it is registered but I guess this is not how this thing works. Still looking for a solution.

In my smart contract I have some methods that get a struct as an input:

contract MyContract {

  MyStruct {
    uint[] arr;
    address[] addresses; 
  }

  function myFunction(MyStruct[] structs) external {
  }
}

I called this function and on Etherscan although my contract is verified it seems to show the function selector (first 4 bytes of the encoded function signature) and not the function name. Is there a way to overcome this and show the function name?

enter image description here


UPDATE


Following this answer I have managed to match between my function signature and the right function selector. As far as I understood from the documentation I should be able to use the method-registry contract in order to register my method.

I have registered my function over the SignatureReg contract but I can't see any change in the names of the functions over etherscan. I was expecting etherscan to listen to this contract (or to query it) and update the method name accordingly once it is registered but I guess this is not how this things work. Still looking for a solution.

added 107 characters in body
Source Link
forhas
  • 825
  • 1
  • 10
  • 30

In my smart contract I have some methods that get a struct as an input:

contract MyContract {

  MyStruct {
    uint[] arr;
    address[] addresses; 
  }

  function myFunction(MyStructMyStruct[] structstructs) external {
  }
}

I called this function and on Etherscan although my contract is verified it seems to show the function selector (first 4 bytes of the encoded function signature) and not the function name. Is there a way to overcome this and show the function name?

enter image description here


UPDATE


Following this answer I have managed to match between my function signature and the right function selector. As far as I understood from the documentation I should be able to use the method-registry contract in order to register my method.

I have done it (over Rinkeby since this is whereregistered my contract is currently deployed), should this dofunction over the trick? ISignatureReg contract but I can't see any change in the names of transactions from the past, perhapsfunctions over etherscan. I should trywas expecting etherscan to execute new oneslisten to this contract (or something like that) and update the method name accordingly once it is registered but I guess this is not how this thing works. To be continued Still looking for a solution.

In my smart contract I have some methods that get a struct as an input:

contract MyContract {

  MyStruct {
    uint[] arr;
    address[] addresses; 
  }

  function myFunction(MyStruct struct) external {
  }
}

I called this function and on Etherscan although my contract is verified it seems to show the function selector (first 4 bytes of the encoded function signature) and not the function name. Is there a way to overcome this and show the function name?

enter image description here


UPDATE


Following this answer I have managed to match between my function signature and the right function selector. As far as I understood from the documentation I should be able to use the method-registry contract in order to register my method.

I have done it (over Rinkeby since this is where my contract is currently deployed), should this do the trick? I can't see any change in the names of transactions from the past, perhaps I should try to execute new ones. To be continued

In my smart contract I have some methods that get a struct as an input:

contract MyContract {

  MyStruct {
    uint[] arr;
    address[] addresses; 
  }

  function myFunction(MyStruct[] structs) external {
  }
}

I called this function and on Etherscan although my contract is verified it seems to show the function selector (first 4 bytes of the encoded function signature) and not the function name. Is there a way to overcome this and show the function name?

enter image description here


UPDATE


Following this answer I have managed to match between my function signature and the right function selector. As far as I understood from the documentation I should be able to use the method-registry contract in order to register my method.

I have registered my function over the SignatureReg contract but I can't see any change in the names of the functions over etherscan. I was expecting etherscan to listen to this contract (or something like that) and update the method name accordingly once it is registered but I guess this is not how this thing works. Still looking for a solution.

added 752 characters in body
Source Link
forhas
  • 825
  • 1
  • 10
  • 30

In my smart contract I have some methods that get a struct as an input:

contract MyContract {

  MyStruct {
    uint[] arr;
    address[] addresses; 
  }

  function myFunction(MyStruct struct) external {
  }
}

I called this function and on Etherscan although my contract is verified it seems to show the function selector (first 4 bytes of the encoded function signature) and not the function name. Is there a way to overcome this and show the function name?

enter image description here


UPDATE


Following this answer I have managed to match between my function signature and the right function selector. As far as I understood from the documentation I should be able to use the method-registry contract in order to register my method.

I have done it (over Rinkeby since this is where my contract is currently deployed), should this do the trick? I can't see any change in the names of transactions from the past, perhaps I should try to execute new ones. To be continued

In my smart contract I have some methods that get a struct as an input:

contract MyContract {

  MyStruct {
    uint[] arr;
    address[] addresses; 
  }

  function myFunction(MyStruct struct) external {
  }
}

I called this function and on Etherscan although my contract is verified it seems to show the function selector (first 4 bytes of the encoded function signature) and not the function name. Is there a way to overcome this and show the function name?

enter image description here

In my smart contract I have some methods that get a struct as an input:

contract MyContract {

  MyStruct {
    uint[] arr;
    address[] addresses; 
  }

  function myFunction(MyStruct struct) external {
  }
}

I called this function and on Etherscan although my contract is verified it seems to show the function selector (first 4 bytes of the encoded function signature) and not the function name. Is there a way to overcome this and show the function name?

enter image description here


UPDATE


Following this answer I have managed to match between my function signature and the right function selector. As far as I understood from the documentation I should be able to use the method-registry contract in order to register my method.

I have done it (over Rinkeby since this is where my contract is currently deployed), should this do the trick? I can't see any change in the names of transactions from the past, perhaps I should try to execute new ones. To be continued

added 33 characters in body
Source Link
forhas
  • 825
  • 1
  • 10
  • 30
Loading
Notice added Draw attention by forhas
Bounty Started worth 50 reputation by forhas
Source Link
forhas
  • 825
  • 1
  • 10
  • 30
Loading