mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Update test ethclient, rename rollup var
This commit is contained in:
@@ -690,7 +690,7 @@ func (c *Client) addBatch(args *eth.RollupForgeBatchArgs) (*types.Transaction, e
|
||||
}
|
||||
|
||||
// RollupAddToken is the interface to call the smart contract function
|
||||
func (c *Client) RollupAddToken(tokenAddress ethCommon.Address) (tx *types.Transaction, err error) {
|
||||
func (c *Client) RollupAddToken(tokenAddress ethCommon.Address, feeAddToken *big.Int) (tx *types.Transaction, err error) {
|
||||
c.rw.Lock()
|
||||
defer c.rw.Unlock()
|
||||
cpy := c.nextBlock().copy()
|
||||
@@ -704,6 +704,9 @@ func (c *Client) RollupAddToken(tokenAddress ethCommon.Address) (tx *types.Trans
|
||||
if _, ok := r.State.TokenMap[tokenAddress]; ok {
|
||||
return nil, fmt.Errorf("Token %v already registered", tokenAddress)
|
||||
}
|
||||
if feeAddToken.Cmp(r.Vars.FeeAddToken) != 0 {
|
||||
return nil, fmt.Errorf("Expected fee: %v but got: %v", r.Vars.FeeAddToken, feeAddToken)
|
||||
}
|
||||
|
||||
r.State.TokenMap[tokenAddress] = true
|
||||
r.State.TokenList = append(r.State.TokenList, tokenAddress)
|
||||
|
||||
Reference in New Issue
Block a user