-
Notifications
You must be signed in to change notification settings - Fork 9
/
call.go
57 lines (52 loc) · 1.16 KB
/
call.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package bridge
import (
"math/big"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/core/types"
"github.com/incognitochain/bridge-eth/vault"
)
func withdraw(v *vault.Vault, auth *bind.TransactOpts, proof *decodedProof) (*types.Transaction, error) {
auth.GasPrice = big.NewInt(20000000000)
tx, err := v.Withdraw(
auth,
proof.Instruction,
proof.BeaconHeight,
proof.BeaconInstPath,
proof.BeaconInstPathIsLeft,
proof.BeaconInstPathLen,
proof.BeaconInstRoot,
proof.BeaconBlkData,
proof.BeaconSignerSig,
proof.BeaconNumR,
proof.BeaconXs,
proof.BeaconYs,
proof.BeaconRIdxs,
proof.BeaconNumSig,
proof.BeaconSigIdxs,
proof.BeaconRp,
proof.BeaconRpx,
proof.BeaconRpy,
proof.BeaconR,
proof.BridgeHeight,
proof.BridgeInstPath,
proof.BridgeInstPathIsLeft,
proof.BridgeInstPathLen,
proof.BridgeInstRoot,
proof.BridgeBlkData,
proof.BridgeSignerSig,
proof.BridgeNumR,
proof.BridgeXs,
proof.BridgeYs,
proof.BridgeRIdxs,
proof.BridgeNumSig,
proof.BridgeSigIdxs,
proof.BridgeRp,
proof.BridgeRpx,
proof.BridgeRpy,
proof.BridgeR,
)
if err != nil {
return nil, err
}
return tx, nil
}