Skip to content

Commit 397ffe9

Browse files
authored
Multichain registry: Differentiate between imports and direct deployments (#275)
* Differentiate between imports and direct deployments * Return plain metadataURI in Deployment struct
1 parent f2c98c8 commit 397ffe9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

contracts/TWMultichainRegistry.sol

+5-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ contract TWMultichainRegistry is ITWMultichainRegistry, Multicall, ERC2771Contex
8080
address[] memory deploymentAddrs = deployments[_deployer][chainId].values();
8181

8282
for (uint256 k = 0; k < len; k += 1) {
83-
allDeployments[idx] = Deployment({ deploymentAddress: deploymentAddrs[k], chainId: chainId });
83+
allDeployments[idx] = Deployment({
84+
deploymentAddress: deploymentAddrs[k],
85+
chainId: chainId,
86+
metadataURI: addressToMetadataUri[chainId][deploymentAddrs[k]]
87+
});
8488
idx += 1;
8589
}
8690
}

contracts/interfaces/ITWMultichainRegistry.sol

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ interface ITWMultichainRegistry {
55
struct Deployment {
66
address deploymentAddress;
77
uint256 chainId;
8+
string metadataURI;
89
}
910

1011
event Added(address indexed deployer, address indexed deployment, uint256 indexed chainId, string metadataUri);

0 commit comments

Comments
 (0)