From 4a3613b7e6e853c6c83c57c830fd78b2a49830b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20Jelavi=C4=87?= <116341045+mj52951@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:57:22 +0200 Subject: [PATCH] chore: Update version of Substrate pallet (#377) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matija Petrunić --- e2e/evm/evm_test.go | 33 --------------------------------- e2e/substrate/util.go | 2 +- example/docker-compose.yml | 2 +- 3 files changed, 2 insertions(+), 35 deletions(-) diff --git a/e2e/evm/evm_test.go b/e2e/evm/evm_test.go index f1f63d15..0f937792 100644 --- a/e2e/evm/evm_test.go +++ b/e2e/evm/evm_test.go @@ -242,39 +242,6 @@ func (s *IntegrationTestSuite) Test_Erc721Deposit() { s.Equal(dstAddr.String(), owner.String()) } -func (s *IntegrationTestSuite) Test_GenericDeposit() { - transactor1 := signAndSend.NewSignAndSendTransactor(s.fabric1, s.gasPricer1, s.client1) - transactor2 := signAndSend.NewSignAndSendTransactor(s.fabric2, s.gasPricer2, s.client2) - - bridgeContract1 := bridge.NewBridgeContract(s.client1, s.config1.BridgeAddr, transactor1) - assetStoreContract2 := centrifuge.NewAssetStoreContract(s.client2, s.config2.AssetStoreAddr, transactor2) - - byteArrayToHash, _ := substrateTypes.NewI64(int64(rand.Int())).MarshalJSON() - hash := substrateTypes.NewHash(byteArrayToHash) - - handlerBalanceBefore, err := s.client1.BalanceAt(context.TODO(), s.config1.BasicFeeHandlerAddr, nil) - s.Nil(err) - - genericDepositData := evm.ConstructGenericDepositData(hash[:]) - depositTxHash, err := bridgeContract1.ExecuteTransaction("deposit", transactor.TransactOptions{Value: s.config1.BasicFee}, uint8(2), s.config1.GenericResourceID, genericDepositData, []byte{}) - - s.Nil(err) - - _, _, err = s.client1.TransactionByHash(context.Background(), *depositTxHash) - s.Nil(err) - - err = evm.WaitForProposalExecuted(s.client2, s.config2.BridgeAddr) - s.Nil(err) - // Asset hash sent is stored in centrifuge asset store contract - exists, err := assetStoreContract2.IsCentrifugeAssetStored(hash) - s.Nil(err) - s.Equal(true, exists) - - handlerBalanceAfter, err := s.client1.BalanceAt(context.TODO(), s.config1.BasicFeeHandlerAddr, nil) - s.Nil(err) - s.Equal(handlerBalanceAfter, big.NewInt(0).Add(handlerBalanceBefore, s.config1.BasicFee)) -} - func (s *IntegrationTestSuite) Test_PermissionlessGenericDeposit() { transactor1 := signAndSend.NewSignAndSendTransactor(s.fabric1, s.gasPricer1, s.client1) transactor2 := signAndSend.NewSignAndSendTransactor(s.fabric2, s.gasPricer2, s.client2) diff --git a/e2e/substrate/util.go b/e2e/substrate/util.go index c844ca7c..a12d0b94 100644 --- a/e2e/substrate/util.go +++ b/e2e/substrate/util.go @@ -40,7 +40,7 @@ const ( type USDCAsset struct{} func (a USDCAsset) Encode(encoder scale.Encoder) error { - _ = encoder.Write([]byte{0, 1, 3, 0, 81, 31, 6, 5, 115, 121, 103, 109, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4, 117, 115, 100, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}) + _ = encoder.Write([]byte{0, 1, 3, 0, 85, 31, 6, 5, 115, 121, 103, 109, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4, 117, 115, 100, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}) return nil } diff --git a/example/docker-compose.yml b/example/docker-compose.yml index 97cabe14..9658c976 100644 --- a/example/docker-compose.yml +++ b/example/docker-compose.yml @@ -48,7 +48,7 @@ services: substrate-pallet: container_name: substrate-pallet - image: "ghcr.io/sygmaprotocol/sygma-substrate-pallets:e2e-v0.2.1" + image: "ghcr.io/sygmaprotocol/sygma-substrate-pallets:e2e-v0.3.1" ports: - "9944:9944" - "9933:9933"