FeedProjects
Developers
Settings
🎉 A new chapter begins: Boardroom has joined Agora
Learn more
protocol logo
Explore / Projects
TheGraphCouncil

Proposals

Members

Information

Create Proposal

TheGraphCouncil

ProposalsMembersInformation
Proposal
Back to Proposals
closedEnded 5 years ago · Snapshot (Offchain)

GGP 0005: Batch GNS transactions

By 0x4530...7ebA9A

GGP: 0005 Scope: Smart Contracts Created: 2021-09-07 GIPs-Repo-Latest-Commit: 329e92fb3c897f68bddbd93abf12278167116266

GIPs

GIP: 0014 Title: Batch GNS transactions Authors: Ariel Barmat ariel@edgeandnode.com Created: 2021-09-07 Stage: Candidate Discussions-To: https://forum.thegraph.com/t/batch-gns-transactions/2285

Motivation

One of the issues brought by the community is that sometimes a subgraph publisher would want to publish a new subgraph and deposit the initial tokens. Today, that’s only possible by using a Multisig or any other contract to batch those transactions.

This proposal allows batching transactions on the GNS, based on the Multicall pattern seen in Uniswap (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/base/Multicall.sol) and recently implemented in OpenZeppelin (https://docs.openzeppelin.com/contracts/4.x/api/utils#Multicall)

Implementation

A new contract called MultiCall is introduced, inspired by the one used by Uniswap. The payable keyword was removed from the multicall() as the protocol does not deal with ETH. Additionally, it is insecure in some instances if the contract relies on msg.value.

The GNS inherits from MultiCall that expose a public multicall(bytes[] calldata data) function that receives an array of payloads to send to the contract itself. This allows to batch ANY publicly callable contract function. Client-side one can build such payloads like:

// Build payloads const tx1 = await gns.populateTransaction.publishNewSubgraph( , , , , ) const tx2 = await gns.populateTransaction.mintNSignal( , , , , )

// Send batch await gns.multicall([tx1.data, tx2.data])

References

Implementation: https://etherscan.io/address/0x8F0031C8A936e3f78Db1E0670135CCad27E5b689#code Audit: https://github.com/graphprotocol/contracts/blob/40a2a721e1b8441a76a8f7105ffd9577cd163fc6/audits/OpenZeppelin/the-graph-gns-audit-2021-08.pdf


Graph Governance Proposal-0005

Batch GNS transactions

This proposal is to upgrade The Graph’s protocol smart contracts running on Ethereum mainnet with the changes described in Graph Improvement Proposal (GIP) 0014, including the motivation and scope of the changes described in this proposal.

The code deployed that implements GIP-0014 must correspond to the commit hash included in the front matter of this governance proposal.

Following a successful “yes” vote, the protocol upgrade should be carried out at the earliest convenience using The Graph Council’s Gnosis Multisig.

Continue Reading
Connect Wallet to Add Note
0
Votes 6
VoterCast PowerVote & Rationale
0xFe46...474dc2
1

Yes

0xE0FA...6ce639
1

Yes

0xd201...0722aA
1

Yes

0x7EbE...280385
1

Yes

0x4530...7ebA9A
1

Yes

SHOW MORE
VOTE POWER
0
Connect Wallet
Proposal Status
  • Wed September 08 2021, 11:00 amVoting Period Starts
  • Wed September 15 2021, 11:00 amEnd Voting Period
Current Results

1-Yes

6

DocumentationBrandingContact Us
Home
This Project is Currently Disabled

If you would like to enable it, please checkout below.

Boardroom Subscription

Sign up for an individual subscription (access all projects on the platform)

Subscribe
Enable Project

Enable the entire project for every user

Enable Project
Contact Us