Skip to content

Fix ci#58

Merged
zjb0807 merged 7 commits intomasterfrom
fix-ci
Jul 12, 2022
Merged

Fix ci#58
zjb0807 merged 7 commits intomasterfrom
fix-ci

Conversation

@zjb0807
Copy link
Contributor

@zjb0807 zjb0807 commented Jul 8, 2022

No description provided.

@zjb0807 zjb0807 mentioned this pull request Jul 8, 2022
4 tasks
@ThunderDeliverer
Copy link
Contributor

Will AcalaNetwork/bodhi.js#484 modify the EVM precompile interface?

@zjb0807
Copy link
Contributor Author

zjb0807 commented Jul 8, 2022

Will AcalaNetwork/bodhi.js#484 modify the EVM precompile interface?

AcalaNetwork/predeploy-contracts#110
The PR add lint and modify the event fields

@Anastasia1510
Copy link

0xF981c1c0a0436268F8B4Da9Ee838AB3f72313bF4

@Anastasia1510
Copy link

_ No description provided. _

@ThunderDeliverer
Copy link
Contributor

@zjb0807 are the tests passing for you locally? They are failing for EVM example on my end

@zjb0807
Copy link
Contributor Author

zjb0807 commented Jul 10, 2022

@zjb0807 are the tests passing for you locally? They are failing for EVM example on my end

https://github.com/AcalaNetwork/bodhi.js/runs/7262955497?check_suite_focus=true
Only one case failed. How do you test it?

@shunjizhan
Copy link
Contributor

shunjizhan commented Jul 10, 2022

we can test it locally by cd hardhat-tutorials/advance-escrow && yarn && yarn test-mandala, it passed for me locally, but not sure why it failed in CI when running all tests together
AcalaNetwork/bodhi.js#484 (comment)

@ThunderDeliverer
Copy link
Contributor

I pull and build the latest evm-subql from bodhi repository and run the RPC adapter, then I use yarn && yarn test-mandala in the EVM directory. This is the output for the failing tests:

➜  EVM git:(fix-ci) yarn && yarn test-mandala
yarn install v1.22.19
[1/4] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.19s.
yarn run v1.22.19
$ hardhat test test/EVM.js --network mandala


  EVM contract
    Operation
      newContractExtraBytes()
        ✔ should return the new contract extra bytes
      storageDepositPerByte()
        ✔ should return the storage deposit
      maintainerOf()
        ✔ should return the maintainer of the contract
      developerDeposit()
        ✔ should return the developer deposit
      publicationFee()
        ✔ should return the publication fee
      transferMaintainter()
        ✔ should transfer the maintainer of the contract (2279ms)
        ✔ should emit TransferredMaintainer when maintainer role of the contract is transferred (3260ms)
        ✔ should revert if the caller is not the maintainer of the contract
        1) should revert if trying to transfer maintainer of 0x0
        2) should revert when trying to transfer maintainer to 0x0 address
      publishContract()
        ✔ should emit ContractPublished event (3247ms)
        ✔ should revert when caller is not the maintainer of the contract
        3) should revert when trying to publish 0x0 contract
      developerStatus()
        ✔ should return the status of the development account (96ms)
      developerDisable()
        ✔ should disable development mode (2240ms)
        ✔ should emit DeveloperDisabled (5566ms)
        ✔ should revert if the development account is not enabled (48ms)
      developerEnable()
        ✔ should enable development mode (2193ms)
        ✔ should emit DeveloperEnabled event (5475ms)
        ✔ should revert if the development mode is already enabled (59ms)


  17 passing (1m)
  3 failing

  1) EVM contract
       Operation
         transferMaintainter()
           should revert if trying to transfer maintainer of 0x0:
     AssertionError: Expected transaction to be reverted with EVM: the contractAddress is the zero address, but other exception was thrown: ProviderError: Error: -32603: VM Exception while processing transaction: execution revert EVM: the contract_address is the zero address: 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002d45564d3a2074686520636f6e74726163745f6164647265737320697320746865207a65726f20616464726573730000000000000000000000000…
  

  2) EVM contract
       Operation
         transferMaintainter()
           should revert when trying to transfer maintainer to 0x0 address:
     AssertionError: Expected transaction to be reverted with EVM: the newMaintainer is the zero address, but other exception was thrown: ProviderError: Error: -32603: VM Exception while processing transaction: execution revert EVM: the new_maintainer is the zero address: 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002b45564d3a20746865206e65775f6d61696e7461696e657220697320746865207a65726f206164647265737300000000000000000000000000000…
  

  3) EVM contract
       Operation
         publishContract()
           should revert when trying to publish 0x0 contract:
     AssertionError: Expected transaction to be reverted with EVM: the contractAddress is the zero address, but other exception was thrown: ProviderError: Error: -32603: VM Exception while processing transaction: execution revert EVM: the contract_address is the zero address: 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002d45564d3a2074686520636f6e74726163745f6164647265737320697320746865207a65726f20616464726573730000000000000000000000000…
  



error Command failed with exit code 3.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

So it seems like the EVM predeploy still reverts with the previous variable names.

Moved the loop utility in the AdvancedEscrow example from test to utils
in order to prevent the CI from triggering it and failing as a result.
@zjb0807
Copy link
Contributor Author

zjb0807 commented Jul 11, 2022

So it seems like the EVM predeploy still reverts with the previous variable names.

Did you try it with the new mandala node ghcr.io/acalanetwork/mandala-node:sha-0910ce3?

@shunjizhan
Copy link
Contributor

LGTM

@zjb0807
Copy link
Contributor Author

zjb0807 commented Jul 12, 2022

I'll merge the PR first

@zjb0807 zjb0807 merged commit 70bff37 into master Jul 12, 2022
@zjb0807 zjb0807 deleted the fix-ci branch July 12, 2022 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants