omni / tokenbridge-contracts

Smart contracts for TokenBridge
http://docs.tokenbridge.net
GNU General Public License v3.0
228 stars 227 forks source link

Initialization of Bridge Mediator fails #640

Closed maxrobot closed 2 years ago

maxrobot commented 2 years ago

Hi, I am following the instructions to deploy an AMB and then ERC677-to-ERC677 bridge instructions here -https://docs.tokenbridge.net/amb-bridge/arbitrary-message-bridge-deployment.

The deployment of the AMB seems to go fine.

However, when I try to deploy the ERC-ERC contract it fails at the following point with the following error:

Foreign part of ERC677-to-ERC677 bridge deployed

[Home] Initializing Bridge Mediator with following parameters:

    AMB contract: 0xd3940973a3173E48f3ace3A1928bB24d08aDEaF4, 
    Mediator contract: 0xCE62e414C77d680684f93D1989330812D70b9607, 
    Token contract: 0xDB9c1b988709D957072649AAfee6654d17FE25Ac,
    DAILY_LIMIT : 100000000000000000000000 which is 100000 in eth,
    MAX_AMOUNT_PER_TX: 10000000000000000000000 which is 10000 in eth,
    MIN_AMOUNT_PER_TX: 10000000000000000 which is 0.01 in eth,
    EXECUTION_DAILY_LIMIT : 500000000000000000000000 which is 500000 in eth,
    EXECUTION_MAX_AMOUNT_PER_TX: 100000000000000000000000 which is 100000 in eth,
    FOREIGN_TO_HOME_DECIMAL_SHIFT: 0,
    MEDIATOR_REQUEST_GAS_LIMIT : 100000000000, 
    OWNER: 0xfB3Ce1611272f443B406BcE2e2dd1eEA85Ad340E

Error: web3 RPC failed: {"message":"VM Exception while processing transaction: revert","code":-32000,
"data":{"stack":"c: VM Exception while processing transaction: revert\n 

Just for info I have tried to deploy both using docker and the node scripts with the identical error.

Any halp appreciated :)

maxrobot commented 2 years ago

solved myself as clearly the gas restrictions were setup incorrectly.