1

Currently, we are looking for a way to submit safe transactions using the UI programatically. It seems like using the Transaction Builder UI with a generated JSON file is the best bet.

I was wondering what the schema for this JSON file is, and what each property does. So far I have this, and it seems to work:

{
  "version": "1.0",
  "chainId": "84532",
  "meta": {
    "txBuilderVersion": "1.13.1"
  },
  "transactions": [
    {
      "to": "0x13C620d9876d341946d42727ef41E6bD60942554",
      "value": "0",
      "data": "0xe9198bf900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000002fd1cb000000000000000000000000000000000000000000000000000000000000000100000000000000000000000067832b9fc47eb3cdbf7275b95a29740ec58193d2",
      "operation": 0,
      "baseGas": "0",
      "gasPrice": "0",
      "gasToken": "0x0000000000000000000000000000000000000000",
      "refundReceiver": "0x0000000000000000000000000000000000000000",
      "nonce": 26,
      "safeTxGas": "0"
    }
  ]
}

1 Answer 1

0

While version, chainId and meta are rather self-explanatory, transactions is an array of SafeTransactionData. You can find more information about each property in the Safe{Core} SDK API Kit reference.

While you can use the transaction builder to do this, please also note that you can submit safe transactions programmatically by sending direct requests to the Safe API, or by following this Safe{Core} SDK API kit guide.

Hope it helps! Best, Louis

2
  • Appreciate the response Louis! if i understand correctly, to submit transactions, i'd need a signature? Our particular usecase prevents us from signing the tx because we have our keys in a hardware wallet. Any way around this? I've considered delegates too but it seems like we end up in the same place as creating a delegate requires a signature too.
    – ltyu
    Commented Oct 1 at 21:38
  • Happy to help! 🙌 Yes, you could use the CLI to load owners and programmatically sign a transaction: docs.safe.global/advanced/cli-reference/… Commented Oct 2 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.