@@ -379,15 +379,17 @@ var expectedERC1155Methods = fftypes.JSONAnyPtr(`{
379379type EthereumTokenContractTestSuite struct {
380380 suite.Suite
381381 testState * testState
382+ connector string
382383 contract string
383384 expectedMethods * fftypes.JSONAny
384385}
385386
386387func (suite * EthereumTokenContractTestSuite ) SetupSuite () {
387388 stack := e2e .ReadStack (suite .T ())
389+ suite .connector = stack .TokenProviders [0 ]
388390 suite .contract = "erc20/ERC20OpenZeppelin.json"
389391 suite .expectedMethods = expectedERC20Methods
390- if stack . TokenProviders [ 0 ] == "erc1155" {
392+ if suite . connector == "erc1155" {
391393 suite .contract = "erc1155/ERC1155Sample.json"
392394 suite .expectedMethods = expectedERC1155Methods
393395 }
@@ -413,7 +415,7 @@ func (suite *EthereumTokenContractTestSuite) TestTokensWithInterface() {
413415 version := contractVersion ()
414416
415417 ffi := suite .testState .client1 .GenerateFFIFromABI (suite .T (), & fftypes.FFIGenerationRequest {
416- Name : "ERC20 " ,
418+ Name : "token_contract_test " ,
417419 Version : version ,
418420 Input : fftypes .JSONAnyPtr (`{"abi":` + contractJSON .GetObjectArray ("abi" ).String () + `}` ),
419421 })
@@ -428,7 +430,7 @@ func (suite *EthereumTokenContractTestSuite) TestTokensWithInterface() {
428430 "address" : contractAddress ,
429431 },
430432 Interface : & fftypes.FFIReference {
431- Name : "ERC20 " ,
433+ Name : "token_contract_test " ,
432434 Version : version ,
433435 },
434436 }
@@ -468,4 +470,13 @@ func (suite *EthereumTokenContractTestSuite) TestTokensWithInterface() {
468470 e2e .ValidateAccountBalances (suite .T (), suite .testState .client1 , poolResp .ID , "" , map [string ]int64 {
469471 suite .testState .org1key .Value : 0 ,
470472 })
473+
474+ if suite .connector == "erc1155" {
475+ // Create another pool and pass startId/endId explicitly
476+ pool .Name = fmt .Sprintf ("pool_%s" , e2e .RandomName (suite .T ()))
477+ pool .Config ["startId" ] = "0x1" // intentionally does not match a pool generated by the factory
478+ pool .Config ["endId" ] = "0x1"
479+ poolResp = suite .testState .client1 .CreateTokenPool (suite .T (), pool , true , false )
480+ e2e .WaitForEvent (suite .T (), received1 , core .EventTypePoolConfirmed , poolResp .ID )
481+ }
471482}
0 commit comments