Skip to content

Commit

Permalink
Merge branch 'develop' into add-observation
Browse files Browse the repository at this point in the history
  • Loading branch information
vilenarios authored May 9, 2024
2 parents c20467b + c9b736f commit f1f5095
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
files: ./coverage/coverage_report.out
files: ./coverage/coverage_report.out,./coverage/luacov.stats.out
token: ${{ secrets.CODECOV_TOKEN }}

deploy:
Expand Down
4 changes: 3 additions & 1 deletion ar-io-ao-0.1-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ source = {
}
dependencies = {
"busted >= 2.2.0",
"luacov >= 0.15.0"
"luacov >= 0.15.0",
"luacheck >= 1.1.2",
"luacov-html >=1.0.0"
}
test = {
type = "busted",
Expand Down
32 changes: 32 additions & 0 deletions experiments/ao-connect/buy-record.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import {
createDataItemSigner,
connect,
} from "@permaweb/aoconnect";

import fs from 'fs'
import path from 'path'

const processId = 'Wq0LrvyY9tqRtQcxQcKAYfa0F1Yp9Uomkio4PrUlugE'
const jwk = JSON.parse(fs.readFileSync(path.join(__dirname, 'wallet.json')).toString())

const main = async () => {
const { message, result } = await connect(jwk)
const messageTxId = await message({
process: processId,
tags: [
{ name: 'ProcessId', value: processId},
{ name: 'Action', value: 'BuyRecord' },
{ name: 'Name', value: 'dylan' },
{ name: 'PurchaseType', value: 'lease'},
],
signer: createDataItemSigner(jwk),
});
console.log('Sent data to process', messageTxId)
const res = await result({
message: messageTxId,
process: processId
})
console.log('Result:', res)
}

main()
30 changes: 30 additions & 0 deletions experiments/ao-connect/deploy-process.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import {
createDataItemSigner,
connect,
spawn,
} from "@permaweb/aoconnect";

import fs from 'fs'
import path from 'path'

const jwk = JSON.parse(fs.readFileSync(path.join(__dirname, 'wallet.json')).toString())

const main = async () => {
const module = 'GRqfUmY_2QnqgmG9s3C9P3uSy01GRWjaPstNWwVEfJ8'
const scheduler = 'uW1Qm8BRsfj-tjip0BkVV-CHy6sBPF0Db0H8b15rsD8'
const processId = await spawn({
// The Arweave TXID of the ao Module
module: module,
// The Arweave wallet address of a Scheduler Unit
scheduler: scheduler,
tags: [
{ name: "Memory-Limit", value: "500-mb" },
{ name: "Compute-Limit", value: "9000000000000" },
],
// A signer function containing your wallet
signer: createDataItemSigner(jwk),
});
console.log(processId)
}

main()

0 comments on commit f1f5095

Please sign in to comment.