Created
July 8, 2020 09:21
-
-
Save MariusVanDerWijden/71f6ea5883b60e672f3752e6fd4b773d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Call a pure/view function | |
callOpts := &bind.CallOpts{Context: ctx, Pending: false} | |
bal, err := ctr.SeeBalance(callOpts) | |
// Call a normal function | |
tx, err := ctr.Deposit(transactOpts) | |
receipt, err := bind.WaitMined(ctx, backend, tx) | |
if receipt.Status != types.ReceiptStatusSuccessful { | |
panic("Call failed") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment