Skip to content

Commit

Permalink
Renamed simple lambda 3 to ACI_Executor
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshpw committed Nov 4, 2024
1 parent c4bae0a commit 7d58fc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ const AppConfig = {
ARBITRARY_CONTRACT_INTERACTION: "arbitrary_contract_interaction"
},
ACI: {
EXECUTOR_FUNCTION_NAME: "simple_lambda_3",
EXECUTOR_FUNCTION_NAME: "aci_executor",
EXECUTOR_LAMBDA: {
code: `(Left (Left (Pair (Pair { UNPAIR; UNPAIR; SWAP; UNPACK (pair (lambda %code (pair (pair (map %handler_storage string bytes) (bytes %packed_argument)) (pair %proposal_info (address %from) (nat %frozen_token) (bytes %proposal_metadata))) (pair (pair (option %guardian address) (map %handler_storage string bytes)) (list %operations operation))) (bytes %packed_argument)); ASSERT_SOME; UNPAIR; DIP{ SWAP; PAIR; PAIR}; SWAP; EXEC} {DROP; UNIT}) "simple_lambda_3")))`,
code: `(Left (Left (Pair (Pair { UNPAIR; UNPAIR; SWAP; UNPACK (pair (lambda %code (pair (pair (map %handler_storage string bytes) (bytes %packed_argument)) (pair %proposal_info (address %from) (nat %frozen_token) (bytes %proposal_metadata))) (pair (pair (option %guardian address) (map %handler_storage string bytes)) (list %operations operation))) (bytes %packed_argument)); ASSERT_SOME; UNPAIR; DIP{ SWAP; PAIR; PAIR}; SWAP; EXEC} {DROP; UNIT}) "aci_executor")))`,
type: `(or (or (pair %add_handler (pair (lambda %code (pair (pair (map %handler_storage string bytes) (bytes %packed_argument)) (pair %proposal_info (address %from) (nat %frozen_token) (bytes %proposal_metadata))) (pair (pair (option %guardian address) (map %handler_storage string bytes)) (list %operations operation))) (lambda %handler_check (pair bytes (map string bytes)) unit)) (string %name)) (pair %execute_handler (string %handler_name) (bytes %packed_argument))) (string %remove_handler))`
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const aciLambda = {
}

const executionLambda = {
code: (hash: string, executionLambdaName = "simple_lambda_3") =>
code: (hash: string, executionLambdaName = "aci_executor") =>
`(Left (Right (Pair "${executionLambdaName}" 0x${hash})))`,
type: "(or (or (pair %add_handler (pair (lambda %code (pair (pair (map %handler_storage string bytes) (bytes %packed_argument)) (pair %proposal_info (address %from) (nat %frozen_token) (bytes %proposal_metadata))) (pair (pair (option %guardian address) (map %handler_storage string bytes)) (list %operations operation))) (lambda %handler_check (pair bytes (map string bytes)) unit)) (string %name)) (pair %execute_handler (string %handler_name) (bytes %packed_argument))) (string %remove_handler))"
}
Expand Down Expand Up @@ -80,11 +80,11 @@ async function prepareContractData(tezos: TezosToolkit, lambdaCode: string, lamb
// console.log("ACILambdaCode", lambdaCode, packedBaseAci)

const packedLambdaBytes = await packLambda(tezos, `Pair ${lambdaCode} 0x`, lambdaType)
const execLambdaCode = executionLambda.code(packedLambdaBytes, "simple_lambda_3")
const execLambdaCode = executionLambda.code(packedLambdaBytes, "aci_executor")
const execLambdaType = executionLambda.type
const finalPackedDataBytes = await packLambda(tezos, execLambdaCode, execLambdaType)

// const finalPackedData = await packLambda(tezos, executionLambda.code(packedLambda, "simple_lambda_3"), executionLambda.type)
// const finalPackedData = await packLambda(tezos, executionLambda.code(packedLambda, "aci_executor"), executionLambda.type)

// const contract = await getContract(tezos, daoAddress)

Expand Down

0 comments on commit 7d58fc5

Please sign in to comment.