-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
444 additions
and
21 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
TODO: | ||
let token = bru.setEnvVar("access_token", data.token); | ||
|
||
Redeploying dev: | ||
- Deploy entrypoints | ||
- Wait for success | ||
- rename old release to tag | ||
- update nane of new releases | ||
- get verifier, deploy with forge script | ||
- send deployment info to succinct /deployment/new | ||
- execute forge script to update functionIds | ||
- send deployment |
54 changes: 54 additions & 0 deletions
54
api/NEAR Light Client/Succinct/Deploy/Check Release Status.bru
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
meta { | ||
name: Check Release Status | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
get { | ||
url: {{succinctBaseUrl}}/projects/near/near-light-client/releases/{{release}} | ||
body: text | ||
auth: none | ||
} | ||
|
||
headers { | ||
authority: alpha.succinct.xyz | ||
accept: */* | ||
accept-language: en-GB,en;q=0.9 | ||
origin: https://alpha.succinct.xyz | ||
referer: https://alpha.succinct.xyz/near/near-light-client/releases/new | ||
sec-ch-ua: "Not A(Brand";v="99", "Brave";v="121", "Chromium";v="121" | ||
sec-ch-ua-mobile: ?0 | ||
sec-ch-ua-platform: "Linux" | ||
sec-fetch-dest: empty | ||
sec-fetch-mode: cors | ||
sec-fetch-site: same-origin | ||
sec-gpc: 1 | ||
user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 | ||
content-type: text/plain;charset=UTF-8 | ||
} | ||
|
||
vars:pre-request { | ||
release: 13 | ||
} | ||
|
||
assert { | ||
res.status: eq 200 | ||
res.body.status: eq "success" | ||
} | ||
|
||
script:pre-request { | ||
let entrypoint = bru.getProcessEnv("ENTRYPOINT") | ||
let release = bru.getEnvVar(`${entrypoint}_RELEASE_NUM_NEW`) | ||
if (release != null && entrypoint != null) { | ||
bru.setVar("release", release) | ||
} | ||
} | ||
|
||
script:post-response { | ||
let entrypoint = bru.getProcessEnv("ENTRYPOINT") | ||
if (res.body.status == "success") { | ||
bru.setEnvVar(`${entrypoint}_RELEASE_ID_OLD`, bru.getEnvVar(`${entrypoint}_RELEASE_ID`)) | ||
bru.setEnvVar(`${entrypoint}_RELEASE_NUM`, bru.getEnvVar(`${entrypoint}_RELEASE_NUM_NEW`)) | ||
bru.setEnvVar(`${entrypoint}_RELEASE_ID`, bru.getEnvVar(`${entrypoint}_RELEASE_ID_NEW`)) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
meta { | ||
name: New Entrypoint | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: {{succinctBaseUrl}}/release/new | ||
body: text | ||
auth: bearer | ||
} | ||
|
||
headers { | ||
authority: alpha.succinct.xyz | ||
accept: */* | ||
accept-language: en-GB,en;q=0.9 | ||
origin: https://alpha.succinct.xyz | ||
referer: https://alpha.succinct.xyz/near/near-light-client/releases/new | ||
sec-ch-ua: "Not A(Brand";v="99", "Brave";v="121", "Chromium";v="121" | ||
sec-ch-ua-mobile: ?0 | ||
sec-ch-ua-platform: "Linux" | ||
sec-fetch-dest: empty | ||
sec-fetch-mode: cors | ||
sec-fetch-site: same-origin | ||
sec-gpc: 1 | ||
user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 | ||
cookie: session={{succinctSession}} | ||
content-type: text/plain;charset=UTF-8 | ||
} | ||
|
||
auth:bearer { | ||
token: {{succinctAuthToken}} | ||
} | ||
|
||
body:text { | ||
{ | ||
"org_name": "near", | ||
"project_name": "near-light-client", | ||
"git_ref": "{{gitRef}}", | ||
"entrypoint": "{{entrypoint}}", | ||
"env_vars": [] | ||
} | ||
} | ||
|
||
vars:pre-request { | ||
gitRef: notused | ||
entrypoint: fake | ||
} | ||
|
||
script:pre-request { | ||
let gitRef = bru.getProcessEnv("GIT_REF") | ||
if (gitRef != null) { | ||
bru.setVar("gitRef", gitRef) | ||
} | ||
let entrypoint = bru.getProcessEnv("ENTRYPOINT") | ||
if (entrypoint != null) { | ||
bru.setVar("entrypoint", entrypoint) | ||
} | ||
} | ||
|
||
script:post-response { | ||
let entrypoint = bru.getProcessEnv("ENTRYPOINT") | ||
bru.setEnvVar(`${entrypoint}_RELEASE_ID_NEW`, res.body.release_id) | ||
bru.setEnvVar(`${entrypoint}_RELEASE_NUM_NEW`, res.body.release_number) | ||
bru.setVar(`${entrypoint}_RELEASE_ID_NEW`, res.body.release_id) | ||
bru.setVar(`${entrypoint}_RELEASE_NUM_NEW`, res.body.release_number) | ||
} | ||
|
||
assert { | ||
res.status: eq 200 | ||
} |
44 changes: 44 additions & 0 deletions
44
api/NEAR Light Client/Succinct/Deploy/Pull Verifying Key.bru
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
meta { | ||
name: Pull Verifying Key | ||
type: http | ||
seq: 4 | ||
} | ||
|
||
get { | ||
url: {{succinctBaseUrl}}/release/{{releaseId}}/download/FunctionVerifier.sol | ||
body: text | ||
auth: none | ||
} | ||
|
||
headers { | ||
authority: alpha.succinct.xyz | ||
accept: */* | ||
accept-language: en-GB,en;q=0.9 | ||
origin: https://alpha.succinct.xyz | ||
referer: https://alpha.succinct.xyz/near/near-light-client/releases/new | ||
sec-ch-ua: "Not A(Brand";v="99", "Brave";v="121", "Chromium";v="121" | ||
sec-ch-ua-mobile: ?0 | ||
sec-ch-ua-platform: "Linux" | ||
sec-fetch-dest: empty | ||
sec-fetch-mode: cors | ||
sec-fetch-site: same-origin | ||
sec-gpc: 1 | ||
user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 | ||
content-type: text/plain;charset=UTF-8 | ||
} | ||
|
||
vars:pre-request { | ||
releaseId: c2829278-6849-4487-ba5f-96ce503837d5 | ||
} | ||
|
||
assert { | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
let entrypoint = bru.getProcessEnv("ENTRYPOINT") | ||
let releaseId = bru.getEnvVar(`${entrypoint}_RELEASE_ID_NEW`) | ||
if (releaseId != null && entrypoint != null) { | ||
bru.setVar("releaseId", releaseId) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
meta { | ||
name: Update name | ||
type: http | ||
seq: 3 | ||
} | ||
|
||
patch { | ||
url: {{succinctBaseUrl}}/release/{{releaseNum}}/name | ||
body: json | ||
auth: none | ||
} | ||
|
||
headers { | ||
authority: alpha.succinct.xyz | ||
accept: */* | ||
accept-language: en-GB,en;q=0.9 | ||
content-type: application/json | ||
origin: https://alpha.succinct.xyz | ||
referer: https://alpha.succinct.xyz/near/near-light-client/releases/17 | ||
sec-ch-ua: "Not A(Brand";v="99", "Brave";v="121", "Chromium";v="121" | ||
sec-ch-ua-mobile: ?0 | ||
sec-ch-ua-platform: "Linux" | ||
sec-fetch-dest: empty | ||
sec-fetch-mode: cors | ||
sec-fetch-site: same-origin | ||
sec-gpc: 1 | ||
user-agent: Mozilla/5.0 (X11; Linux x86_64) AppMozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 | ||
cookie: session={{succinctSession}} | ||
} | ||
|
||
body:json { | ||
{"name":"{{version}}"} | ||
} | ||
|
||
vars:pre-request { | ||
releaseNum: noop | ||
version: dev | ||
} | ||
|
||
assert { | ||
res.body.status: eq success | ||
res.status: eq 200 | ||
} | ||
|
||
script:pre-request { | ||
let entrypoint = bru.getProcessEnv("ENTRYPOINT") | ||
let releaseNum = bru.getEnvVar(`${entrypoint}_RELEASE_ID`) | ||
if (releaseNum != null && entrypoint != null) { | ||
bru.setVar("releaseNum", releaseNum) | ||
} | ||
|
||
let version = bru.getProcessEnv("VERSION") | ||
if (version != null) { | ||
bru.setVar("version", version) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
meta { | ||
name: Deployment new test | ||
type: http | ||
seq: 11 | ||
} | ||
|
||
post { | ||
url: {{succinctBaseUrl}}/deployment/new | ||
body: json | ||
auth: none | ||
} | ||
|
||
headers { | ||
authority: alpha.succinct.xyz | ||
accept: */* | ||
accept-language: en-GB,en;q=0.9 | ||
content-type: text/plain;charset=UTF-8 | ||
origin: https://alpha.succinct.xyz | ||
referer: https://alpha.succinct.xyz/near/near-light-client/deployments/new | ||
sec-ch-ua: "Not A(Brand";v="99", "Brave";v="121", "Chromium";v="121" | ||
sec-ch-ua-mobile: ?0 | ||
sec-ch-ua-platform: "Linux" | ||
sec-fetch-dest: empty | ||
sec-fetch-mode: cors | ||
sec-fetch-site: same-origin | ||
sec-gpc: 1 | ||
user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 | ||
~cookie: session=Qa84UBz81dNmH6kV7DTW_de8TtSdeYZExnnngHJoMH8 | ||
} | ||
|
||
body:json { | ||
{ | ||
"release_id": "{{release_id}}", | ||
"contract_address": "{{contract_address}}", | ||
"gateway_address": "{{gateway_address}}", | ||
"chain_id": {{chain_id}}, | ||
"function_id": "0x{{function_id}}", | ||
"salt": "0x{{salt}}", | ||
"tx_hash": "0x{{tx_hash}}" | ||
} | ||
} | ||
|
||
body:text { | ||
{"release_id":"870e6490-2a30-4703-9958-646f3945da9c","contract_address":"0x395C22aEC73F7960245afBf6eDD77E086bf908C5","gateway_address":"0x6c7a05e0AE641c6559fD76ac56641778B6eCd776","chain_id":421614,"function_id":"0xf7dc8cfca607134de24309d606b91a4c071b7f6b2a7cf8535da65cef25db520f","salt":"0xd4f4fed64865db8ba82177c0c4528a9eb7ec47ec4fb0ddaf8d56dd7b79537597","tx_hash":"0x5ff9a3899f4716dbe63d21f2dfd1c13ece08ac9751f6509761ca1a510719c2b2"} | ||
} | ||
|
||
vars:pre-request { | ||
salt: d4f4fed64865db8ba82177c0c4528a9eb7ec47ec4fb0ddaf8d56dd7b79537597 | ||
chain_id: 421614 | ||
function_id: | ||
tx_hash: | ||
} | ||
|
||
script:pre-request { | ||
let entrypoint = bru.getProcessEnv("ENTRYPOINT") | ||
let release = bru.getEnvVar(`${entrypoint}_RELEASE_ID`) | ||
let functionId = bru.getEnvVar(`${entrypoint}_FUNCTION_ID`) | ||
let chainId = bru.getProcessEnv("CHAIN_ID") | ||
let salt = bru.getEnvVar(`${entrypoint}_SALT`) | ||
let txHash = bru.getEnvVar(`${entrypoint}_TX_HASH`) | ||
|
||
if (release != null && entrypoint != null) { | ||
bru.setVar("release_id", release) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
meta { | ||
name: Get Deployments | ||
type: http | ||
seq: 6 | ||
seq: 8 | ||
} | ||
|
||
get { | ||
url: {{succintBaseUrl}}/deployments/near/near-light-client | ||
url: {{succinctBaseUrl}}/deployments/near/near-light-client | ||
body: none | ||
auth: none | ||
} |
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
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
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
Oops, something went wrong.