Skip to content

Commit

Permalink
Also needs salt
Browse files Browse the repository at this point in the history
  • Loading branch information
connorwstein committed Dec 13, 2024
1 parent 8bc5127 commit fc95440
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions deployment/common/changeset/transfer_to_mcms_with_timelock.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package changeset

import (
"encoding/binary"
"fmt"
"math/big"
"time"
Expand Down Expand Up @@ -178,7 +179,9 @@ func TransferToDeployer(e deployment.Environment, cfg TransferToDeployerConfig)
Value: big.NewInt(0),
},
}
tx, err = tls.Timelock.ScheduleBatch(e.Chains[cfg.ChainSel].DeployerKey, calls, [32]byte{}, [32]byte{}, big.NewInt(0))
var salt [32]byte
binary.BigEndian.PutUint32(salt[:], uint32(time.Now().Unix()))
tx, err = tls.Timelock.ScheduleBatch(e.Chains[cfg.ChainSel].DeployerKey, calls, [32]byte{}, salt, big.NewInt(0))
if _, err = deployment.ConfirmIfNoError(e.Chains[cfg.ChainSel], tx, err); err != nil {
return deployment.ChangesetOutput{}, err
}
Expand All @@ -188,7 +191,7 @@ func TransferToDeployer(e deployment.Environment, cfg TransferToDeployerConfig)
return deployment.ChangesetOutput{}, fmt.Errorf("error creating timelock executor proxy: %w", err)
}
tx, err = timelockExecutorProxy.ExecuteBatch(
e.Chains[cfg.ChainSel].DeployerKey, calls, [32]byte{}, [32]byte{})
e.Chains[cfg.ChainSel].DeployerKey, calls, [32]byte{}, salt)
if err != nil {
return deployment.ChangesetOutput{}, fmt.Errorf("error executing batch: %w", err)
}
Expand Down

0 comments on commit fc95440

Please sign in to comment.