Skip to content

Commit

Permalink
Merge branch 'nounsDAO:master' into descriptor-v2-upgrade-trait-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
EricDevito authored Oct 9, 2024
2 parents 0036df6 + 1a0c178 commit 4d10388
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/nouns-assets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nouns/assets",
"version": "0.8.0",
"version": "0.9.0",
"description": "Nouns run-length encoded image data",
"author": "Nounders",
"homepage": "https://nouns.wtf",
Expand Down
4 changes: 4 additions & 0 deletions packages/nouns-assets/src/image-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -1946,6 +1946,10 @@
{
"filename": "head-shrimp-tempura",
"data": "0x00031b1505090004ce100005ce0e0002e704ce0f0004e705ce0c0006e7010004ce010002e7010002e7050002e7015102e7060007e7030002e7015102e7060003e7015105e7010007e7050002e7015103e701510ae7040008e7015102e7010005e7050008e7015101e7010007e7050011e7010002e701000be7010014e7010019e701510ee7015103e7020002e7015104e7015101e7025104e7015102e7040008e7015109e706000ee70a0004e7010005e70600"
},
{
"filename": "head-green-snake",
"data": "0x00031a1606090002aa05c00d00012401c601c002aa03c00c0003c0012401c603c00c0007c001aa0800015601000256062301c001aa090002560600012302c01100012302c0050001c002aa08c002aa03c0040001c001aa04c001aa05c001aa03c0040006c002aa08c004001023020004c001aa06c002aa05c001aa010004c002aa05c001aa05c002aa01001323020002aa0ac001aa06c0010001aa04c003aa04c002aa04c001aa010011c002aa010002c01123010002c0130001c01100"
}
],
"glasses": [
Expand Down
2 changes: 1 addition & 1 deletion packages/nouns-webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@lingui/macro": "3.13.3",
"@lingui/react": "3.13.3",
"@netlify/functions": "^0.7.2",
"@nouns/assets": "^0.8.0",
"@nouns/assets": "^0.9.0",
"@nouns/sdk": "^0.4.0",
"@reduxjs/toolkit": "^1.6.0",
"@testing-library/jest-dom": "^5.11.4",
Expand Down
14 changes: 7 additions & 7 deletions packages/nouns-webapp/src/wrappers/nounsDao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -842,15 +842,16 @@ export const useCastVoteWithReason = () => {

export const useCastRefundableVote = () => {
const { library } = useEthers();
const functionSig = 'castRefundableVote(uint256,uint8)';
const { send: castRefundableVote, state: castRefundableVoteState } = useContractFunction(
nounsDaoContract,
'castRefundableVote',
functionSig
);

return {
castRefundableVote: async (...args: any[]): Promise<void> => {
const contract = connectContractToSigner(nounsDaoContract, undefined, library);
const gasLimit = await contract.estimateGas.castRefundableVote(...args);
const gasLimit = await contract.estimateGas[functionSig](...args);
return castRefundableVote(...args, {
gasLimit: gasLimit.add(30_000), // A 30,000 gas pad is used to avoid 'Out of gas' errors
});
Expand All @@ -862,15 +863,14 @@ export const useCastRefundableVote = () => {
export const useCastRefundableVoteWithReason = () => {
const { library } = useEthers();
// prettier-ignore
const { send: castRefundableVoteWithReason, state: castRefundableVoteWithReasonState } = useContractFunction(
nounsDaoContract,
'castRefundableVoteWithReason',
);
const functionSig = 'castRefundableVoteWithReason(uint256,uint8,string)';
const { send: castRefundableVoteWithReason, state: castRefundableVoteWithReasonState } =
useContractFunction(nounsDaoContract, functionSig);

return {
castRefundableVoteWithReason: async (...args: any[]): Promise<void> => {
const contract = connectContractToSigner(nounsDaoContract, undefined, library);
const gasLimit = await contract.estimateGas.castRefundableVoteWithReason(...args);
const gasLimit = await contract.estimateGas[functionSig](...args);
return castRefundableVoteWithReason(...args, {
gasLimit: gasLimit.add(30_000), // A 30,000 gas pad is used to avoid 'Out of gas' errors
});
Expand Down

0 comments on commit 4d10388

Please sign in to comment.