Skip to content

Commit 3860086

Browse files
committed
The encodedFunctionCall is modified so that the createAlastriaIdentity smart contracts function is called correctly, as there are two functions with the same name and almost identical data types in the input parameter (bytes and bytes32).
1 parent d49b969 commit 3860086

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/txFactory/identityManagerTransactionFactory.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { AddressUtils } from '../utils/AddressUtils'
55
/**
66
* function delegateCall(address _destination, uint256 _value, bytes _data) public
77
* @param web3 ethereum connection
8-
* @param _destination
8+
* @param _destination
99
* @param _value
1010
* @param _data
1111
*/
@@ -65,13 +65,13 @@ export function createAlastriaIdentity(web3, publicKey) {
6565
export function createAlastriaIdentityHash(web3, publicKeyHash) {
6666
const transaction = Object.assign({}, config.basicTransaction)
6767
transaction.gasLimit = 600000
68-
const publicKeyCallData = web3.eth.abi.encodeFunctionCall(
69-
config.contractsAbi.AlastriaPublicKeyRegistry.addPublicKey,
70-
[publicKeyHash]
71-
)
7268
transaction.data = web3.eth.abi.encodeFunctionCall(
73-
config.contractsAbi.AlastriaIdentityManager.createAlastriaIdentity,
74-
[publicKeyCallData]
69+
{
70+
name: 'createAlastriaIdentity',
71+
type: 'function',
72+
inputs: [{ type: 'bytes32', name: 'publicKeyHash' }]
73+
},
74+
[publicKeyHash]
7575
)
7676
transaction.to = config.alastriaIdentityManager
7777
return transaction

0 commit comments

Comments
 (0)