---
eip: 5247
label: ERC-5247
title: Smart Contract Executable Proposal Interface
status: Review
type: Standards Track
category: ERC
created: 2022-07-13
official: https://eips.ethereum.org/EIPS/eip-5247
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-5247.md
canonical: https://eips.huatuo.xyz/eip-5247/
lang: en
tldr: "A minimal interface for onchain proposals: record a batch of contract calls (targets, values, gas limits, calldata) now and execute them later, independent of how approval or voting happens."
tags: [governance, dao, proposals, execution]
---

# ERC-5247: Smart Contract Executable Proposal Interface

> An interface to create and execute proposals.

**TL;DR:** A minimal interface for onchain proposals: record a batch of contract calls (targets, values, gas limits, calldata) now and execute them later, independent of how approval or voting happens.

## What problem does it solve?

Often the code you want to run is agreed on separately from when it runs. A DAO drafts a proposal, members vote, and only then is it executed. A trustee or delegate prepares a set of actions for someone else to approve. One party makes an "offer" as a ready-to-run transaction bundle that the other can accept by executing it.

Governance frameworks each have their own proposal format, tangled up with their voting logic. ERC-5247 pulls the **proposal** part out on its own, originally split off from the voting standard [ERC-1202](/eip-1202/), so proposals can be created, stored and executed the same way regardless of how approval works.

## How it works

Two functions and two events:

- `createProposal(proposalId, targets[], values[], gasLimits[], calldatas[], extraParams)` records a list of calls. Each index `i` describes one call: send `values[i]` wei with `calldatas[i]` to `targets[i]`, using up to `gasLimits[i]` gas. It returns a `registeredProposalId`, letting each implementation choose its own ID scheme. Emits `ProposalCreated`.
- `executeProposal(proposalId, extraParams)` runs the recorded calls. Emits `ProposalExecuted`.
- `extraParams` is free-form bytes for implementation-specific data, such as signatures or vote references.

Arrays let one proposal bundle any number of calls. Who may execute, and when, is left to the implementation (a vote result, a multisig, a timelock, the counterparty of an offer…).

## Sample code

Creating and executing a two-call proposal (ethers v6):

```ts
import { Contract, Interface } from "ethers";

const nft = new Interface(["function mint(address to, uint256 id)"]);
const calls = [
  nft.encodeFunctionData("mint", [recipient, 1]),
  nft.encodeFunctionData("mint", [recipient, 2]),
];

const registry = new Contract(registryAddress, [
  "function createProposal(uint256,address[],uint256[],uint256[],bytes[],bytes) returns (uint256)",
  "function executeProposal(uint256,bytes)",
], signer);

await (await registry.createProposal(
  0,                         // proposer-chosen id
  [nftAddress, nftAddress],  // targets
  [0, 0],                    // ETH values
  [0, 0],                    // gas limits (0 = no explicit limit in this example)
  calls,
  "0x",                      // extraParams
)).wait();

// later, once approved by whatever process the registry enforces
await (await registry.executeProposal(0, "0x")).wait();
```

## Things to know

- **Status: Review.** The interface may still change, and its Security Considerations section just says "Needs discussion".
- The standard does not define authorisation. The reference code shown in the spec lets anyone execute and never marks a proposal as executed, so a real deployment must add access control, approval checks and replay protection.
- That code also does not apply the `gasLimits` it stores. If you depend on per-call gas limits, check your implementation honours them.
- Executing arbitrary calls from a contract that holds funds or privileges is exactly as powerful as it sounds; treat the executor like an admin key.
- Mature DAO frameworks offer a similar targets/values/calldatas model; ERC-5247 standardises it as a standalone interface.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-5247
