Skip to content

Conversation

UrAvgDeveloper
Copy link
Contributor

@UrAvgDeveloper UrAvgDeveloper commented Jun 8, 2023

This PR covers:

  • Resolved Issue: Ethereum scripts: minor improvements #80
  • Readme updates for using scripts and cosmetic improvements
  • Fixed prompt interaction and added dependancy for it
  • Fixed deploy:all to work correctly

@UrAvgDeveloper UrAvgDeveloper requested a review from karim-en as a code owner June 8, 2023 11:21
@UrAvgDeveloper
Copy link
Contributor Author

UrAvgDeveloper commented Jun 8, 2023

@sept-en this PR doesn't solve issue

Missing function to verify user's whitelisting for the specific token:

as the trader whitelisting functionality doesn't exist in solidity contract :)

Co-authored-by: Karim <karim@aurora.dev>
UrAvgDeveloper and others added 2 commits June 9, 2023 20:41
Co-authored-by: Olga Kunyavskaya <olga.kunyavskaya@aurora.dev>
"deploy:all": "npx hardhat run scripts/deployment/deploy_testnet_bridge_with_test_tokens.js --network",
"deploy:test-tokens": "npm run compile-all && npx hardhat run scripts/deployment/deploy-test-tokens.js --network",
"deploy:bridge": "npm run compile-all && npx hardhat run scripts/deployment/deploy-bridge.js --network ",
"deploy:verify:bridge": "npm run compile-all && npx hardhat run scripts/EthErc20FastBridge/deploy_and_verify_bridge.js --network",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't work for me:

olga@olga-ThinkPad-P14s-Gen-2a:~/Aurora/spectre-bridge-protocol/eth$ yarn run deploy:verify:bridge -- goerli
yarn run v1.22.19
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ npm run compile-all && npx hardhat run scripts/EthErc20FastBridge/deploy_and_verify_bridge.js --network goerli

> project-name@1.0.0 compile-all
> npx hardhat compile --force

[
  {
    version: '0.8.11',
    settings: {
      optimizer: [Object],
      metadata: [Object],
      outputSelection: [Object]
    }
  }
]
Compiled 25 Solidity files successfully
[
  {
    version: '0.8.11',
    settings: {
      optimizer: [Object],
      metadata: [Object],
      outputSelection: [Object]
    }
  }
]
Verifing Contract
Sleeping before verification...
0x5FB5a3EED9a8C1F4a49005EeE0930F79C2f1d669
Verifying implementation: 0xdEeDfE06F6331ff22FfB9BC5647CB5cDddB7f309
[
  {
    version: '0.8.11',
    settings: {
      optimizer: [Object],
      metadata: [Object],
      outputSelection: [Object]
    }
  }
]
Nothing to compile
ProviderError: HttpProviderError
    at HttpProvider.request (/home/olga/Aurora/spectre-bridge-protocol/eth/node_modules/hardhat/src/internal/core/providers/http.ts:78:19)
    at LocalAccountsProvider.request (/home/olga/Aurora/spectre-bridge-protocol/eth/node_modules/hardhat/src/internal/core/providers/accounts.ts:181:36)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at EthersProviderWrapper.send (/home/olga/Aurora/spectre-bridge-protocol/eth/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)
Successfully submitted source code for contract
contracts/EthErc20FastBridge.sol:EthErc20FastBridge at 0xdEeDfE06F6331ff22FfB9BC5647CB5cDddB7f309
for verification on the block explorer. Waiting for verification result...

Successfully verified contract EthErc20FastBridge on Etherscan.
https://goerli.etherscan.io/address/0xdEeDfE06F6331ff22FfB9BC5647CB5cDddB7f309#code
Verifying proxy: 0x5FB5a3EED9a8C1F4a49005EeE0930F79C2f1d669
Contract at 0x5FB5a3EED9a8C1F4a49005EeE0930F79C2f1d669 already verified.
Linking proxy 0x5FB5a3EED9a8C1F4a49005EeE0930F79C2f1d669 with implementation
Successfully linked proxy to implementation.

Proxy fully verified.
bridge deployed to 0x009C78a3a755EdD77242E260f37368180bBfD0f7
bridge_implementation deployed to 0xdEeDfE06F6331ff22FfB9BC5647CB5cDddB7f309
Deployment is completed.
Verifing Contract
Sleeping before verification...
0x009C78a3a755EdD77242E260f37368180bBfD0f7
Verifying implementation: 0xdEeDfE06F6331ff22FfB9BC5647CB5cDddB7f309
[
  {
    version: '0.8.11',
    settings: {
      optimizer: [Object],
      metadata: [Object],
      outputSelection: [Object],
      libraries: {}
    }
  }
]
Compiled 25 Solidity files successfully
Implementation 0xdEeDfE06F6331ff22FfB9BC5647CB5cDddB7f309 already verified.
Verifying proxy: 0x009C78a3a755EdD77242E260f37368180bBfD0f7
Verification failed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, this function works 50/50. Sometimes it works, but sometimes returns strange errors. Looks like a race condition.

Do we really need this function? We already have a command to deploy and verify. I am not sure that it is worth to debug it. What do you think?

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