Open zach-is-my-name opened 8 months ago
Not relevant? But 3.2.*
Cayenne
getlit deploy errors out
getlit deploy
[~/Projects/3-Idea/charli/apps/LitActions]$ erd LitActions ├─ .gitignore ├─ bun.lockb ├─ index.ts ├─ package.json ├─ tsconfig.json └─ lit_actions ├─ getlit.json ├─ globa.d.ts ├─ tsconfig.json ├─ utils.mjs ├─ src │ ├─ test.action.ts │ ├─ transferFrom_learner_to_controller.action.ts │ └─ transfer_controller_to_teacher.action.ts └─ test ├─ foo.t.action.mjs ├─ main.t.action.mjs ├─ test.t.action.mjs ├─ transferFrom_learner_to_controller.t.action.mjs └─ transfer_controller_to_teacher.t.action.mjs 3 directories, 17 files [~/Projects/3-Idea/charli/apps/LitActions]$ getlit deploy ? Which action do you want to deploy? (Use arrow keys) ? Which action do you want to deploy? transferFrom_learner_to_controller file:///home/zmg/.nvm/versions/node/v18.19.0/lib/node_modules/getlit/scripts/deploy.mjs:79 redLog(`\n❌ Error deploying action file at ${actionFile}\n`); ^ ReferenceError: actionFile is not defined at upload (file:///home/zmg/.nvm/versions/node/v18.19.0/lib/node_modules/getlit/scripts/deploy.mjs:79:50) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.deployFunc [as fn] (file:///home/zmg/.nvm/versions/node/v18.19.0/lib/node_modules/getlit/scripts/deploy.mjs:29:18) Node.js v18.19.0 [~/Projects/3-Idea/charli/apps/LitActions]$
Low. I'm just trying out GetLit
$ getlit init lit_actions $ getlit new transferFrom_learner_to_controller $ echo "import {ethers} from 'ethers' // let learnerAddress="0x" // let controllerAddress="0x" // let controllerPubKey="0x" // let paymentAmount=0 // let usdcContractAddress="0x" // let chainId = 1 // Above values should be dynamically passed to the Lit Action through executeJs /** * NAME: transferFrom_learner_to_controller */ (async () => { const abi = [ "function transferFrom(address sender, address recipient, uint256 amount) returns (boolean)" ]; const latestNonce = await LitActions.getLatestNonce({ address: controllerAddress, chain: "chronicle", }); const contract = new ethers.Contract(usdcContractAddress, abi); const amount = ethers.parseUnits(paymentAmount.toString(), 6); const txData = contract.interface.encodeFunctionData("transferFrom", [learnerAddress, controllerAddress, amount]); const txObject = { "to": usdcContractAddress, "nonce": parseInt(latestNonce), "chainId": chainId, "gasLimit": "50000", "from": controllerAddress, "data": txData, "type": 2, }; LitActions.setResponse({ response: JSON.stringify({ txObject }) }); const tx = ethers.Transaction.from(txObject); const serializedTx = tx.unsignedSerialized; const rlpEncodedTxn = ethers.getBytes(serializedTx); const unsignedTxn = ethers.keccak256(rlpEncodedTxn); const toSign = ethers.getBytes(unsignedTxn); const sigShare = await LitActions.signEcdsa({ toSign, publicKey: controllerPubKey, sigName: "sign_transfer_from", }); console.log('Signature for transferFrom:', sigShare); })();' > " $ getlit build $ getlit deploy
Above
No response
@zach-is-my-name the cli seems out of date rn : https://github.com/LIT-Protocol/Issues-and-Reports/issues/18#issuecomment-2096595425
Is there an existing issue for this?
SDK version
Not relevant? But 3.2.*
Lit Network
Cayenne
Description of the bug/issue
getlit deploy
errors outSeverity of the bug
Low. I'm just trying out GetLit
Steps To Reproduce
Link to code
Above
Anything else?
No response