Skip to content

Commit

Permalink
e2e: regenerate anchor-go + fix set billing
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 committed Mar 9, 2022
1 parent f375ed0 commit b506d01
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 22 deletions.
65 changes: 61 additions & 4 deletions contracts/generated/ocr2/SetBilling.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions contracts/generated/ocr2/WithdrawFunds.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions contracts/generated/ocr2/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions tests/e2e/solclient/ocr2.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ func (m *OCRv2) SetBilling(observationPayment uint32, transmissionPayment uint32
if err != nil {
return nil
}
vaultAuth, err := m.AuthorityAddr("vault")
if err != nil {
return err
}
va, err := solana.PublicKeyFromBase58(vaultAuth)
if err != nil {
return err
}
err = m.Client.TXAsync(
"Set billing",
[]solana.Instruction{
Expand All @@ -270,6 +278,9 @@ func (m *OCRv2) SetBilling(observationPayment uint32, transmissionPayment uint32
m.Client.Accounts.OCR.PublicKey(),
m.Client.Accounts.Owner.PublicKey(),
billingACPubKey,
m.Client.Accounts.OCRVaultAssociatedPubKey, // token vault
va, // vault authority
solana.TokenProgramID, // token program
).Build(),
},
func(key solana.PublicKey) *solana.PrivateKey {
Expand Down

0 comments on commit b506d01

Please sign in to comment.