File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1023,6 +1023,23 @@ describe('GNS', () => {
1023
1023
await expect ( tx ) . revertedWith ( 'Caller must be Controller governor' )
1024
1024
} )
1025
1025
1026
+ it ( 'should revert if batching a call to initialize' , async function ( ) {
1027
+ // Call a forbidden function
1028
+ const tx1 = await gns . populateTransaction . initialize ( me . address , me . address , me . address )
1029
+
1030
+ // Create a subgraph
1031
+ const tx2 = await gns . populateTransaction . publishNewSubgraph (
1032
+ me . address ,
1033
+ subgraph0 . subgraphDeploymentID ,
1034
+ subgraph0 . versionMetadata ,
1035
+ subgraph0 . subgraphMetadata ,
1036
+ )
1037
+
1038
+ // Batch send transaction
1039
+ const tx = gns . connect ( me . signer ) . multicall ( [ tx1 . data , tx2 . data ] )
1040
+ await expect ( tx ) . revertedWith ( 'Caller must be the implementation' )
1041
+ } )
1042
+
1026
1043
it ( 'should revert if trying to call a private function' , async function ( ) {
1027
1044
// Craft call a private function
1028
1045
const hash = ethers . utils . id ( '_setOwnerTaxPercentage(uint32)' )
You can’t perform that action at this time.
0 commit comments