Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes: set writer + local test environment updates #102

Merged
merged 2 commits into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ export default class SetWriter extends SolanaCommand {
execute = async () => {
const store = getContract(CONTRACT_LIST.STORE, '')
const ocr2 = getContract(CONTRACT_LIST.OCR_2, '')
const address = store.programId.toString()
const storeProgram = this.loadProgram(store.idl, address)
const ocr2Program = this.loadProgram(ocr2.idl, address)
const storeAddress = store.programId.toString()
const ocr2Address = ocr2.programId.toString()
const storeProgram = this.loadProgram(store.idl, storeAddress)
const ocr2Program = this.loadProgram(ocr2.idl, ocr2Address)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uf nice catch


const input = this.makeInput(this.flags.input)
const owner = this.wallet.payer
Expand Down
21 changes: 15 additions & 6 deletions ops/solana/solana.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,9 @@ func (d *Deployer) DeployOCR() error {

fmt.Println("Step 6: Init OCR 2 Feed")
input = map[string]interface{}{
"minAnswer": "0",
"maxAnswer": "10000000000",
"minAnswer": "0",
"maxAnswer": "10000000000",
"transmissions": d.Account[OCRTransmissions],
}

jsonInput, err = json.Marshal(input)
Expand All @@ -270,7 +271,6 @@ func (d *Deployer) DeployOCR() error {
err = d.gauntlet.ExecCommand(
"ocr2:initialize",
d.gauntlet.Flag("network", d.network),
d.gauntlet.Flag("transmissions", d.Account[OCRTransmissions]),
d.gauntlet.Flag("requesterAccessController", d.Account[RequesterAccessController]),
d.gauntlet.Flag("billingAccessController", d.Account[BillingAccessController]),
d.gauntlet.Flag("link", d.Account[LINK]),
Expand Down Expand Up @@ -474,13 +474,22 @@ func (d Deployer) InitOCR(keys []opsChainlink.NodeKeys) error {
return errors.Wrap(err, "setting OCR 2 billing failed")
}

input = map[string]interface{}{
"transmissions": d.Account[OCRTransmissions],
"store": d.Account[StoreAccount],
}

jsonInput, err = json.Marshal(input)
if err != nil {
return err
}

fmt.Println("Add writer to feed")
err = d.gauntlet.ExecCommand(
"store:set_writer",
d.gauntlet.Flag("network", d.network),
d.gauntlet.Flag("state", d.Account[StoreAccount]),
d.gauntlet.Flag("feed", d.Account[OCRTransmissions]),
d.gauntlet.Flag("storeAuthority", d.Account[StoreAuthority]),
d.gauntlet.Flag("ocrState", d.Account[OCRFeed]),
d.gauntlet.Flag("input", string(jsonInput)),
)

if err != nil {
Expand Down