Questions tagged [contract]
424 questions
2
votes
1 answer
Cofoja : error: error in contract: package com.google.java.contract does not exist
I'm trying to use Cofoja, the Google library for contract programming.
I've copied/pasted the build file wich I'm able to compile my library with succesfully.
But when I start adding one annotation to specify a simple contract rule, I cannot compile…

Back Papp
- 31
- 3
2
votes
1 answer
Why is Dynamic_Predicate not working?
I started to learn Ada yesterday but I don't really understand the Dynamic_Predicate'aspect.
when declaring:
type evenInt is new Integer
with Dynamic_Predicate => evenInt mod 2 = 0;
Why is it still possible to:
anOddNum : evenInt :=…

Markus
- 93
- 6
2
votes
1 answer
Racket contract and struct issue
I am learning Racket for an Artificial Intelligence class. For the first project, the teacher gave us a file with contracts and unit tests, we are to code the functions required to make it run. I just created stubs of the functions I will need and…

gamda
- 580
- 6
- 24
2
votes
4 answers
Re-doing the same programming work as done on the job
I am a co-op at a company and I was tasked with patching Roumen Petrov's OpenSSH w/ x509 certificates patch (http://www.roumenpetrov.info/openssh/) to include one of the features in his wanted list: wildcards in Distinguished Names. On his site he…

HalfBrian
- 877
- 1
- 11
- 21
2
votes
1 answer
Java Dictionary Iterator Type issues
So I am attempting to create a LinkedHashedDictionary's Iterator member for a homework assignment, however I am having multiple issues regarding its types.
Iterator Interface:
package nhUtilities.containers2;
public interface Iterator…

Patrick
- 43
- 6
2
votes
1 answer
Android: How to Exclude Facebook Contacts from ContentResolver Query
I am pulling all of the phone's contacts using this query:
Cursor c = cr.query(ContactsContract.Data.CONTENT_URI, new String[] { ContactsContract.Contacts.PHOTO_ID, ContactsContract.Data.DISPLAY_NAME, ContactsContract.Contacts.LOOKUP_KEY },…

Jon W
- 189
- 2
- 10
1
vote
0 answers
How can I make contract with BRC20?
I'm going to develop DApp Game based on BRC20.
But I don't know how to make contract and deployment with BRC20, because BRC20 was created a few months ago.
It's very difficult for me to find out reasonable information related to BRC20, even via…

stayForward09
- 21
- 2
1
vote
0 answers
Invariant that ensures that no method throws an exception other than PreconditionError or InvariantError
I want to add two conditions in Invariant:
All Natural methods must guarantee (via PreconditionErrors or InvariantErrors) that operations resulting in an overflow are blocked
Ensure that no method throws an exception other than PreconditionError or…

Hamid Ayub
- 77
- 5
1
vote
1 answer
Aptos sdk transaction_argument
I have made a bot in python for minting, but there is one problem. When I'm sending args in payload for contract, It's sending this:
But when I do a manual mint, arguments are in string and not bytes¨
I'm using aptos_sdk

Jakub Štellner
- 106
- 8
1
vote
0 answers
EthSwap AssertionError: expected '1000000000000000000000000' to equal '999900000000000000000000'
I am trying to follow a tutorial where I'm creating a EthSwap app from scratch. I am writing a unit test where I'm trying to test the buyTokens() function.
I'm trying to check if the EthSwap balance has decreased after buying tokens.
This is the…

raybuoy
- 11
- 2
1
vote
1 answer
Invalid type for argument in function call. Invalid implicit conversion from address to address payable requested.for msg.sender and adress 0
// create the fllow to transform the ownership of the nft
//from the item owner(seller) to the contract that will transact to the buyer
IERC721(nftcontract).transferFrom(msg.sender,address(this),tokenId);
//after the marketitem is…

Mohammed tb
- 21
- 2
1
vote
0 answers
Pact vs Spring Cloud Contract vs Karate
I'm trying to figure out the best tool for the contract testing. My scenario is quite simple. I have to implement contract testing specifically for front end talking to backend APIs.(client to REST APIs). I've done a POC on PACT already and I find…

tez
- 119
- 1
- 1
- 14
1
vote
1 answer
How Can a Owner Add a Function to Already Deployed Smart Contract
I'll be frank, I made a stupid mistake. In polygon network I deployed a NFT smart contract. I forgot to add withdraw function in my smart contract. Can we add this function to my smart contract that already deployed.
You can see the smart contract…

Spaksu
- 53
- 8
1
vote
3 answers
Is it possible to burn from dead address in bsc network?
I sent my token to dead address(0x000000000000000000000000000000000000dead)
At first I was trying to burn all my token so I sent the token to the dead address using meta mask.
Now I can see the my…
user17569008
1
vote
1 answer
How do I make a Digital ERC20 Tokens with a 10% reward payout to an external Metamask address account for marketing? With an automatic paysplitter
How do I make a Digital ERC20 Tokens with a 10% reward payout to an external Metamask address account for marketing? With an automatic paysplitter via pull-payment and using Reentrancy Guards as a way to send four different private developers a…

Gabrael EL
- 21
- 1